);
diff --git a/apps/dokploy/components/shared/code-editor.tsx b/apps/dokploy/components/shared/code-editor.tsx
index 8fe583339..c060f75dd 100644
--- a/apps/dokploy/components/shared/code-editor.tsx
+++ b/apps/dokploy/components/shared/code-editor.tsx
@@ -4,12 +4,14 @@ import {
type CompletionContext,
type CompletionResult,
} from "@codemirror/autocomplete";
+import { css } from "@codemirror/lang-css";
import { json } from "@codemirror/lang-json";
import { yaml } from "@codemirror/lang-yaml";
import { StreamLanguage } from "@codemirror/language";
import { properties } from "@codemirror/legacy-modes/mode/properties";
import { shell } from "@codemirror/legacy-modes/mode/shell";
-import { EditorView } from "@codemirror/view";
+import { search, searchKeymap } from "@codemirror/search";
+import { EditorView, keymap } from "@codemirror/view";
import { githubDark, githubLight } from "@uiw/codemirror-theme-github";
import CodeMirror, { type ReactCodeMirrorProps } from "@uiw/react-codemirror";
import { useTheme } from "next-themes";
@@ -130,7 +132,7 @@ function dockerComposeComplete(
interface Props extends ReactCodeMirrorProps {
wrapperClassName?: string;
disabled?: boolean;
- language?: "yaml" | "json" | "properties" | "shell";
+ language?: "yaml" | "json" | "properties" | "shell" | "css";
lineWrapping?: boolean;
lineNumbers?: boolean;
}
@@ -155,13 +157,17 @@ export const CodeEditor = ({
}}
theme={resolvedTheme === "dark" ? githubDark : githubLight}
extensions={[
+ search(),
+ keymap.of(searchKeymap),
language === "yaml"
? yaml()
: language === "json"
? json()
- : language === "shell"
- ? StreamLanguage.define(shell)
- : StreamLanguage.define(properties),
+ : language === "css"
+ ? css()
+ : language === "shell"
+ ? StreamLanguage.define(shell)
+ : StreamLanguage.define(properties),
props.lineWrapping ? EditorView.lineWrapping : [],
language === "yaml"
? autocompletion({
diff --git a/apps/dokploy/components/shared/drawer-logs.tsx b/apps/dokploy/components/shared/drawer-logs.tsx
index bc383cb19..38f8b5db4 100644
--- a/apps/dokploy/components/shared/drawer-logs.tsx
+++ b/apps/dokploy/components/shared/drawer-logs.tsx
@@ -60,7 +60,11 @@ export const DrawerLogs = ({ isOpen, onClose, filteredLogs }: Props) => {
{" "}
{filteredLogs.length > 0 ? (
filteredLogs.map((log: LogLine, index: number) => (
-
diff --git a/apps/dokploy/components/shared/logo.tsx b/apps/dokploy/components/shared/logo.tsx
index a1c3acb7e..2c316e22f 100644
--- a/apps/dokploy/components/shared/logo.tsx
+++ b/apps/dokploy/components/shared/logo.tsx
@@ -8,6 +8,7 @@ interface Props {
export const Logo = ({ className = "size-14", logoUrl }: Props) => {
if (logoUrl) {
return (
+ // biome-ignore lint/performance/noImgElement: this is for dynamic logo loading
-
{children}
+
+ {children}
+
);
@@ -412,7 +414,7 @@ const SidebarContent = React.forwardRef<
ref={ref}
data-sidebar="content"
className={cn(
- "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-y-auto",
className,
)}
{...props}
diff --git a/apps/dokploy/drizzle/0144_odd_gunslinger.sql b/apps/dokploy/drizzle/0144_odd_gunslinger.sql
new file mode 100644
index 000000000..f9c872f44
--- /dev/null
+++ b/apps/dokploy/drizzle/0144_odd_gunslinger.sql
@@ -0,0 +1,8 @@
+ALTER TYPE "public"."notificationType" ADD VALUE 'teams';--> statement-breakpoint
+CREATE TABLE "teams" (
+ "teamsId" text PRIMARY KEY NOT NULL,
+ "webhookUrl" text NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "notification" ADD COLUMN "teamsId" text;--> statement-breakpoint
+ALTER TABLE "notification" ADD CONSTRAINT "notification_teamsId_teams_teamsId_fk" FOREIGN KEY ("teamsId") REFERENCES "public"."teams"("teamsId") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0145_remarkable_titania.sql b/apps/dokploy/drizzle/0145_remarkable_titania.sql
new file mode 100644
index 000000000..6ff75972d
--- /dev/null
+++ b/apps/dokploy/drizzle/0145_remarkable_titania.sql
@@ -0,0 +1,17 @@
+CREATE TYPE "public"."patchType" AS ENUM('create', 'update', 'delete');--> statement-breakpoint
+CREATE TABLE "patch" (
+ "patchId" text PRIMARY KEY NOT NULL,
+ "type" "patchType" DEFAULT 'update' NOT NULL,
+ "filePath" text NOT NULL,
+ "enabled" boolean DEFAULT true NOT NULL,
+ "content" text NOT NULL,
+ "createdAt" text NOT NULL,
+ "updatedAt" text,
+ "applicationId" text,
+ "composeId" text,
+ CONSTRAINT "patch_filepath_application_unique" UNIQUE("filePath","applicationId"),
+ CONSTRAINT "patch_filepath_compose_unique" UNIQUE("filePath","composeId")
+);
+--> statement-breakpoint
+ALTER TABLE "patch" ADD CONSTRAINT "patch_applicationId_application_applicationId_fk" FOREIGN KEY ("applicationId") REFERENCES "public"."application"("applicationId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "patch" ADD CONSTRAINT "patch_composeId_compose_composeId_fk" FOREIGN KEY ("composeId") REFERENCES "public"."compose"("composeId") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0146_bumpy_morg.sql b/apps/dokploy/drizzle/0146_bumpy_morg.sql
new file mode 100644
index 000000000..d2c98c1ae
--- /dev/null
+++ b/apps/dokploy/drizzle/0146_bumpy_morg.sql
@@ -0,0 +1 @@
+ALTER TABLE "application" ALTER COLUMN "dockerfile" SET DEFAULT 'Dockerfile';
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0147_right_lake.sql b/apps/dokploy/drizzle/0147_right_lake.sql
new file mode 100644
index 000000000..3ad09f200
--- /dev/null
+++ b/apps/dokploy/drizzle/0147_right_lake.sql
@@ -0,0 +1,6 @@
+ALTER TABLE "session_temp" RENAME TO "session";--> statement-breakpoint
+ALTER TABLE "session" DROP CONSTRAINT "session_temp_token_unique";--> statement-breakpoint
+ALTER TABLE "session" DROP CONSTRAINT "session_temp_user_id_user_id_fk";
+--> statement-breakpoint
+ALTER TABLE "session" ADD CONSTRAINT "session_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "session" ADD CONSTRAINT "session_token_unique" UNIQUE("token");
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0148_futuristic_bullseye.sql b/apps/dokploy/drizzle/0148_futuristic_bullseye.sql
new file mode 100644
index 000000000..a8bfcd339
--- /dev/null
+++ b/apps/dokploy/drizzle/0148_futuristic_bullseye.sql
@@ -0,0 +1 @@
+ALTER TABLE "webServerSettings" ADD COLUMN "whitelabelingConfig" jsonb DEFAULT '{"appName":null,"appDescription":null,"logoUrl":null,"faviconUrl":null,"customCss":null,"loginLogoUrl":null,"supportUrl":null,"docsUrl":null,"errorPageTitle":null,"errorPageDescription":null,"metaTitle":null,"footerText":null}'::jsonb;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0149_rare_radioactive_man.sql b/apps/dokploy/drizzle/0149_rare_radioactive_man.sql
new file mode 100644
index 000000000..fcf195427
--- /dev/null
+++ b/apps/dokploy/drizzle/0149_rare_radioactive_man.sql
@@ -0,0 +1,31 @@
+CREATE TABLE "organization_role" (
+ "id" text PRIMARY KEY NOT NULL,
+ "organization_id" text NOT NULL,
+ "role" text NOT NULL,
+ "permission" text NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ "updated_at" timestamp
+);
+--> statement-breakpoint
+CREATE TABLE "audit_log" (
+ "id" text PRIMARY KEY NOT NULL,
+ "organization_id" text,
+ "user_id" text,
+ "user_email" text NOT NULL,
+ "user_role" text NOT NULL,
+ "action" text NOT NULL,
+ "resource_type" text NOT NULL,
+ "resource_id" text,
+ "resource_name" text,
+ "metadata" text,
+ "created_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "organization_role" ADD CONSTRAINT "organization_role_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "audit_log" ADD CONSTRAINT "audit_log_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "audit_log" ADD CONSTRAINT "audit_log_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+CREATE INDEX "organizationRole_organizationId_idx" ON "organization_role" USING btree ("organization_id");--> statement-breakpoint
+CREATE INDEX "organizationRole_role_idx" ON "organization_role" USING btree ("role");--> statement-breakpoint
+CREATE INDEX "auditLog_organizationId_idx" ON "audit_log" USING btree ("organization_id");--> statement-breakpoint
+CREATE INDEX "auditLog_userId_idx" ON "audit_log" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "auditLog_createdAt_idx" ON "audit_log" USING btree ("created_at");
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0150_nappy_blue_blade.sql b/apps/dokploy/drizzle/0150_nappy_blue_blade.sql
new file mode 100644
index 000000000..92a53d53a
--- /dev/null
+++ b/apps/dokploy/drizzle/0150_nappy_blue_blade.sql
@@ -0,0 +1,5 @@
+ALTER TABLE "apikey" ALTER COLUMN "user_id" DROP NOT NULL;--> statement-breakpoint
+ALTER TABLE "apikey" ADD COLUMN "config_id" text DEFAULT 'default' NOT NULL;--> statement-breakpoint
+ALTER TABLE "apikey" ADD COLUMN "reference_id" text;--> statement-breakpoint
+UPDATE "apikey" SET "reference_id" = "user_id" WHERE "reference_id" IS NULL;--> statement-breakpoint
+ALTER TABLE "apikey" ALTER COLUMN "reference_id" SET NOT NULL;
diff --git a/apps/dokploy/drizzle/0151_modern_sunfire.sql b/apps/dokploy/drizzle/0151_modern_sunfire.sql
new file mode 100644
index 000000000..cefab1a30
--- /dev/null
+++ b/apps/dokploy/drizzle/0151_modern_sunfire.sql
@@ -0,0 +1,4 @@
+ALTER TABLE "apikey" DROP CONSTRAINT "apikey_user_id_user_id_fk";
+--> statement-breakpoint
+ALTER TABLE "apikey" ADD CONSTRAINT "apikey_reference_id_user_id_fk" FOREIGN KEY ("reference_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "apikey" DROP COLUMN "user_id";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0144_snapshot.json b/apps/dokploy/drizzle/meta/0144_snapshot.json
new file mode 100644
index 000000000..aa4f58ebd
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0144_snapshot.json
@@ -0,0 +1,7336 @@
+{
+ "id": "50c73964-11f8-41d6-a282-780e38bdddd9",
+ "prevId": "c03ebeca-bf0f-4d72-8b4f-9a4dccb9f143",
+ "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
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": true
+ },
+ "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
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": {},
+ "foreignKeys": {
+ "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.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "invitation_organization_id_organization_id_fk": {
+ "name": "invitation_organization_id_organization_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_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.member": {
+ "name": "member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteEnvironments": {
+ "name": "canDeleteEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateEnvironments": {
+ "name": "canCreateEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accessedEnvironments": {
+ "name": "accessedEnvironments",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "member_organization_id_organization_id_fk": {
+ "name": "member_organization_id_organization_id_fk",
+ "tableFrom": "member",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "member_user_id_user_id_fk": {
+ "name": "member_user_id_user_id_fk",
+ "tableFrom": "member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization": {
+ "name": "organization",
+ "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": false
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_id": {
+ "name": "owner_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "organization_owner_id_user_id_fk": {
+ "name": "organization_owner_id_user_id_fk",
+ "tableFrom": "organization",
+ "tableTo": "user",
+ "columnsFrom": [
+ "owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "organization_slug_unique": {
+ "name": "organization_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.two_factor": {
+ "name": "two_factor",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "backup_codes": {
+ "name": "backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "two_factor_user_id_user_id_fk": {
+ "name": "two_factor_user_id_user_id_fk",
+ "tableFrom": "two_factor",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.application": {
+ "name": "application",
+ "schema": "",
+ "columns": {
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewEnv": {
+ "name": "previewEnv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildArgs": {
+ "name": "previewBuildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildSecrets": {
+ "name": "previewBuildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLabels": {
+ "name": "previewLabels",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewWildcard": {
+ "name": "previewWildcard",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewPort": {
+ "name": "previewPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "previewHttps": {
+ "name": "previewHttps",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "previewPath": {
+ "name": "previewPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewRequireCollaboratorPermissions": {
+ "name": "previewRequireCollaboratorPermissions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "buildArgs": {
+ "name": "buildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildSecrets": {
+ "name": "buildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildPath": {
+ "name": "buildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBuildPath": {
+ "name": "gitlabBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBuildPath": {
+ "name": "bitbucketBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBuildPath": {
+ "name": "customGitBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerfile": {
+ "name": "dockerfile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerContextPath": {
+ "name": "dockerContextPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerBuildStage": {
+ "name": "dockerBuildStage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dropBuildPath": {
+ "name": "dropBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "buildType": {
+ "name": "buildType",
+ "type": "buildType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'nixpacks'"
+ },
+ "railpackVersion": {
+ "name": "railpackVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0.15.4'"
+ },
+ "herokuVersion": {
+ "name": "herokuVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'24'"
+ },
+ "publishDirectory": {
+ "name": "publishDirectory",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createEnvFile": {
+ "name": "createEnvFile",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackRegistryId": {
+ "name": "rollbackRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildRegistryId": {
+ "name": "buildRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "application",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_registryId_registry_registryId_fk": {
+ "name": "application_registryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "registryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_rollbackRegistryId_registry_registryId_fk": {
+ "name": "application_rollbackRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "rollbackRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_environmentId_environment_environmentId_fk": {
+ "name": "application_environmentId_environment_environmentId_fk",
+ "tableFrom": "application",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_githubId_github_githubId_fk": {
+ "name": "application_githubId_github_githubId_fk",
+ "tableFrom": "application",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_gitlabId_gitlab_gitlabId_fk": {
+ "name": "application_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "application",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_serverId_server_serverId_fk": {
+ "name": "application_serverId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_buildServerId_server_serverId_fk": {
+ "name": "application_buildServerId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_buildRegistryId_registry_registryId_fk": {
+ "name": "application_buildRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "buildRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "application_appName_unique": {
+ "name": "application_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.backup": {
+ "name": "backup",
+ "schema": "",
+ "columns": {
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "database": {
+ "name": "database",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "backup_destinationId_destination_destinationId_fk": {
+ "name": "backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_postgresId_postgres_postgresId_fk": {
+ "name": "backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mongoId_mongo_mongoId_fk": {
+ "name": "backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_userId_user_id_fk": {
+ "name": "backup_userId_user_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bitbucket": {
+ "name": "bitbucket",
+ "schema": "",
+ "columns": {
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bitbucketUsername": {
+ "name": "bitbucketUsername",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketEmail": {
+ "name": "bitbucketEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "appPassword": {
+ "name": "appPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketWorkspaceName": {
+ "name": "bitbucketWorkspaceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "bitbucket",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.certificate": {
+ "name": "certificate",
+ "schema": "",
+ "columns": {
+ "certificateId": {
+ "name": "certificateId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificateData": {
+ "name": "certificateData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificatePath": {
+ "name": "certificatePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "autoRenew": {
+ "name": "autoRenew",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "certificate_organizationId_organization_id_fk": {
+ "name": "certificate_organizationId_organization_id_fk",
+ "tableFrom": "certificate",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "certificate_serverId_server_serverId_fk": {
+ "name": "certificate_serverId_server_serverId_fk",
+ "tableFrom": "certificate",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "certificate_certificatePath_unique": {
+ "name": "certificate_certificatePath_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "certificatePath"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.compose": {
+ "name": "compose",
+ "schema": "",
+ "columns": {
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeFile": {
+ "name": "composeFile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceTypeCompose",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "composeType": {
+ "name": "composeType",
+ "type": "composeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'docker-compose'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "composePath": {
+ "name": "composePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'./docker-compose.yml'"
+ },
+ "suffix": {
+ "name": "suffix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "randomize": {
+ "name": "randomize",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeployment": {
+ "name": "isolatedDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeploymentsVolume": {
+ "name": "isolatedDeploymentsVolume",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "composeStatus": {
+ "name": "composeStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "compose",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_environmentId_environment_environmentId_fk": {
+ "name": "compose_environmentId_environment_environmentId_fk",
+ "tableFrom": "compose",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "compose_githubId_github_githubId_fk": {
+ "name": "compose_githubId_github_githubId_fk",
+ "tableFrom": "compose",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_gitlabId_gitlab_gitlabId_fk": {
+ "name": "compose_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "compose",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_serverId_server_serverId_fk": {
+ "name": "compose_serverId_server_serverId_fk",
+ "tableFrom": "compose",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.deployment": {
+ "name": "deployment",
+ "schema": "",
+ "columns": {
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "deploymentStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'running'"
+ },
+ "logPath": {
+ "name": "logPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isPreviewDeployment": {
+ "name": "isPreviewDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "deployment_applicationId_application_applicationId_fk": {
+ "name": "deployment_applicationId_application_applicationId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_composeId_compose_composeId_fk": {
+ "name": "deployment_composeId_compose_composeId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_serverId_server_serverId_fk": {
+ "name": "deployment_serverId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
+ "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "volume_backup",
+ "columnsFrom": [
+ "volumeBackupId"
+ ],
+ "columnsTo": [
+ "volumeBackupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_buildServerId_server_serverId_fk": {
+ "name": "deployment_buildServerId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.destination": {
+ "name": "destination",
+ "schema": "",
+ "columns": {
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessKey": {
+ "name": "accessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secretAccessKey": {
+ "name": "secretAccessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bucket": {
+ "name": "bucket",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region": {
+ "name": "region",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "destination_organizationId_organization_id_fk": {
+ "name": "destination_organizationId_organization_id_fk",
+ "tableFrom": "destination",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.domain": {
+ "name": "domain",
+ "schema": "",
+ "columns": {
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domainType": {
+ "name": "domainType",
+ "type": "domainType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'application'"
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "domain_composeId_compose_composeId_fk": {
+ "name": "domain_composeId_compose_composeId_fk",
+ "tableFrom": "domain",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_applicationId_application_applicationId_fk": {
+ "name": "domain_applicationId_application_applicationId_fk",
+ "tableFrom": "domain",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "domain",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.environment": {
+ "name": "environment",
+ "schema": "",
+ "columns": {
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isDefault": {
+ "name": "isDefault",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "environment_projectId_project_projectId_fk": {
+ "name": "environment_projectId_project_projectId_fk",
+ "tableFrom": "environment",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.git_provider": {
+ "name": "git_provider",
+ "schema": "",
+ "columns": {
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerType": {
+ "name": "providerType",
+ "type": "gitProviderType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "git_provider_organizationId_organization_id_fk": {
+ "name": "git_provider_organizationId_organization_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "git_provider_userId_user_id_fk": {
+ "name": "git_provider_userId_user_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "giteaInternalUrl": {
+ "name": "giteaInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github": {
+ "name": "github",
+ "schema": "",
+ "columns": {
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "githubAppName": {
+ "name": "githubAppName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubAppId": {
+ "name": "githubAppId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientId": {
+ "name": "githubClientId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientSecret": {
+ "name": "githubClientSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubInstallationId": {
+ "name": "githubInstallationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubPrivateKey": {
+ "name": "githubPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubWebhookSecret": {
+ "name": "githubWebhookSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "github_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "github",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitlab": {
+ "name": "gitlab",
+ "schema": "",
+ "columns": {
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "gitlabUrl": {
+ "name": "gitlabUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitlab.com'"
+ },
+ "gitlabInternalUrl": {
+ "name": "gitlabInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitlab",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mariadb": {
+ "name": "mariadb",
+ "schema": "",
+ "columns": {
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mariadb_environmentId_environment_environmentId_fk": {
+ "name": "mariadb_environmentId_environment_environmentId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mariadb_serverId_server_serverId_fk": {
+ "name": "mariadb_serverId_server_serverId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mariadb_appName_unique": {
+ "name": "mariadb_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mongo": {
+ "name": "mongo",
+ "schema": "",
+ "columns": {
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicaSets": {
+ "name": "replicaSets",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mongo_environmentId_environment_environmentId_fk": {
+ "name": "mongo_environmentId_environment_environmentId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mongo_serverId_server_serverId_fk": {
+ "name": "mongo_serverId_server_serverId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mongo_appName_unique": {
+ "name": "mongo_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mount": {
+ "name": "mount",
+ "schema": "",
+ "columns": {
+ "mountId": {
+ "name": "mountId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "mountType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "mountPath": {
+ "name": "mountPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mount_applicationId_application_applicationId_fk": {
+ "name": "mount_applicationId_application_applicationId_fk",
+ "tableFrom": "mount",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_postgresId_postgres_postgresId_fk": {
+ "name": "mount_postgresId_postgres_postgresId_fk",
+ "tableFrom": "mount",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mariadbId_mariadb_mariadbId_fk": {
+ "name": "mount_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mongoId_mongo_mongoId_fk": {
+ "name": "mount_mongoId_mongo_mongoId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mysqlId_mysql_mysqlId_fk": {
+ "name": "mount_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_redisId_redis_redisId_fk": {
+ "name": "mount_redisId_redis_redisId_fk",
+ "tableFrom": "mount",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_composeId_compose_composeId_fk": {
+ "name": "mount_composeId_compose_composeId_fk",
+ "tableFrom": "mount",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mysql": {
+ "name": "mysql",
+ "schema": "",
+ "columns": {
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mysql_environmentId_environment_environmentId_fk": {
+ "name": "mysql_environmentId_environment_environmentId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mysql_serverId_server_serverId_fk": {
+ "name": "mysql_serverId_server_serverId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mysql_appName_unique": {
+ "name": "mysql_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.custom": {
+ "name": "custom",
+ "schema": "",
+ "columns": {
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "headers": {
+ "name": "headers",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.discord": {
+ "name": "discord",
+ "schema": "",
+ "columns": {
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.email": {
+ "name": "email",
+ "schema": "",
+ "columns": {
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "smtpServer": {
+ "name": "smtpServer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "smtpPort": {
+ "name": "smtpPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gotify": {
+ "name": "gotify",
+ "schema": "",
+ "columns": {
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appToken": {
+ "name": "appToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.lark": {
+ "name": "lark",
+ "schema": "",
+ "columns": {
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "notificationId": {
+ "name": "notificationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appDeploy": {
+ "name": "appDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "appBuildError": {
+ "name": "appBuildError",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "databaseBackup": {
+ "name": "databaseBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "volumeBackup": {
+ "name": "volumeBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dokployRestart": {
+ "name": "dokployRestart",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerCleanup": {
+ "name": "dockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "serverThreshold": {
+ "name": "serverThreshold",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "notificationType": {
+ "name": "notificationType",
+ "type": "notificationType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_slackId_slack_slackId_fk": {
+ "name": "notification_slackId_slack_slackId_fk",
+ "tableFrom": "notification",
+ "tableTo": "slack",
+ "columnsFrom": [
+ "slackId"
+ ],
+ "columnsTo": [
+ "slackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_telegramId_telegram_telegramId_fk": {
+ "name": "notification_telegramId_telegram_telegramId_fk",
+ "tableFrom": "notification",
+ "tableTo": "telegram",
+ "columnsFrom": [
+ "telegramId"
+ ],
+ "columnsTo": [
+ "telegramId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_discordId_discord_discordId_fk": {
+ "name": "notification_discordId_discord_discordId_fk",
+ "tableFrom": "notification",
+ "tableTo": "discord",
+ "columnsFrom": [
+ "discordId"
+ ],
+ "columnsTo": [
+ "discordId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_emailId_email_emailId_fk": {
+ "name": "notification_emailId_email_emailId_fk",
+ "tableFrom": "notification",
+ "tableTo": "email",
+ "columnsFrom": [
+ "emailId"
+ ],
+ "columnsTo": [
+ "emailId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_resendId_resend_resendId_fk": {
+ "name": "notification_resendId_resend_resendId_fk",
+ "tableFrom": "notification",
+ "tableTo": "resend",
+ "columnsFrom": [
+ "resendId"
+ ],
+ "columnsTo": [
+ "resendId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_gotifyId_gotify_gotifyId_fk": {
+ "name": "notification_gotifyId_gotify_gotifyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "gotify",
+ "columnsFrom": [
+ "gotifyId"
+ ],
+ "columnsTo": [
+ "gotifyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_ntfyId_ntfy_ntfyId_fk": {
+ "name": "notification_ntfyId_ntfy_ntfyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "ntfy",
+ "columnsFrom": [
+ "ntfyId"
+ ],
+ "columnsTo": [
+ "ntfyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_customId_custom_customId_fk": {
+ "name": "notification_customId_custom_customId_fk",
+ "tableFrom": "notification",
+ "tableTo": "custom",
+ "columnsFrom": [
+ "customId"
+ ],
+ "columnsTo": [
+ "customId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_larkId_lark_larkId_fk": {
+ "name": "notification_larkId_lark_larkId_fk",
+ "tableFrom": "notification",
+ "tableTo": "lark",
+ "columnsFrom": [
+ "larkId"
+ ],
+ "columnsTo": [
+ "larkId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_pushoverId_pushover_pushoverId_fk": {
+ "name": "notification_pushoverId_pushover_pushoverId_fk",
+ "tableFrom": "notification",
+ "tableTo": "pushover",
+ "columnsFrom": [
+ "pushoverId"
+ ],
+ "columnsTo": [
+ "pushoverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_teamsId_teams_teamsId_fk": {
+ "name": "notification_teamsId_teams_teamsId_fk",
+ "tableFrom": "notification",
+ "tableTo": "teams",
+ "columnsFrom": [
+ "teamsId"
+ ],
+ "columnsTo": [
+ "teamsId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_organizationId_organization_id_fk": {
+ "name": "notification_organizationId_organization_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ntfy": {
+ "name": "ntfy",
+ "schema": "",
+ "columns": {
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topic": {
+ "name": "topic",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "accessToken": {
+ "name": "accessToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 3
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pushover": {
+ "name": "pushover",
+ "schema": "",
+ "columns": {
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userKey": {
+ "name": "userKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "retry": {
+ "name": "retry",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expire": {
+ "name": "expire",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.resend": {
+ "name": "resend",
+ "schema": "",
+ "columns": {
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.slack": {
+ "name": "slack",
+ "schema": "",
+ "columns": {
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.teams": {
+ "name": "teams",
+ "schema": "",
+ "columns": {
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.telegram": {
+ "name": "telegram",
+ "schema": "",
+ "columns": {
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "botToken": {
+ "name": "botToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "chatId": {
+ "name": "chatId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.port": {
+ "name": "port",
+ "schema": "",
+ "columns": {
+ "portId": {
+ "name": "portId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "publishedPort": {
+ "name": "publishedPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "publishMode": {
+ "name": "publishMode",
+ "type": "publishModeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'host'"
+ },
+ "targetPort": {
+ "name": "targetPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "protocolType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "port_applicationId_application_applicationId_fk": {
+ "name": "port_applicationId_application_applicationId_fk",
+ "tableFrom": "port",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.postgres": {
+ "name": "postgres",
+ "schema": "",
+ "columns": {
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "postgres_environmentId_environment_environmentId_fk": {
+ "name": "postgres_environmentId_environment_environmentId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "postgres_serverId_server_serverId_fk": {
+ "name": "postgres_serverId_server_serverId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "postgres_appName_unique": {
+ "name": "postgres_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preview_deployments": {
+ "name": "preview_deployments",
+ "schema": "",
+ "columns": {
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestId": {
+ "name": "pullRequestId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestNumber": {
+ "name": "pullRequestNumber",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestURL": {
+ "name": "pullRequestURL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestTitle": {
+ "name": "pullRequestTitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestCommentId": {
+ "name": "pullRequestCommentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previewStatus": {
+ "name": "previewStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preview_deployments_applicationId_application_applicationId_fk": {
+ "name": "preview_deployments_applicationId_application_applicationId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "preview_deployments_domainId_domain_domainId_fk": {
+ "name": "preview_deployments_domainId_domain_domainId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "domain",
+ "columnsFrom": [
+ "domainId"
+ ],
+ "columnsTo": [
+ "domainId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "preview_deployments_appName_unique": {
+ "name": "preview_deployments_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_organizationId_organization_id_fk": {
+ "name": "project_organizationId_organization_id_fk",
+ "tableFrom": "project",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redirect": {
+ "name": "redirect",
+ "schema": "",
+ "columns": {
+ "redirectId": {
+ "name": "redirectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "regex": {
+ "name": "regex",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "replacement": {
+ "name": "replacement",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permanent": {
+ "name": "permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redirect_applicationId_application_applicationId_fk": {
+ "name": "redirect_applicationId_application_applicationId_fk",
+ "tableFrom": "redirect",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redis": {
+ "name": "redis",
+ "schema": "",
+ "columns": {
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redis_environmentId_environment_environmentId_fk": {
+ "name": "redis_environmentId_environment_environmentId_fk",
+ "tableFrom": "redis",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "redis_serverId_server_serverId_fk": {
+ "name": "redis_serverId_server_serverId_fk",
+ "tableFrom": "redis",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "redis_appName_unique": {
+ "name": "redis_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.registry": {
+ "name": "registry",
+ "schema": "",
+ "columns": {
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "registryName": {
+ "name": "registryName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "imagePrefix": {
+ "name": "imagePrefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selfHosted": {
+ "name": "selfHosted",
+ "type": "RegistryType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'cloud'"
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "registry_organizationId_organization_id_fk": {
+ "name": "registry_organizationId_organization_id_fk",
+ "tableFrom": "registry",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_id_fk": {
+ "name": "schedule_userId_user_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security": {
+ "name": "security",
+ "schema": "",
+ "columns": {
+ "securityId": {
+ "name": "securityId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "security_applicationId_application_applicationId_fk": {
+ "name": "security_applicationId_application_applicationId_fk",
+ "tableFrom": "security",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "security_username_applicationId_unique": {
+ "name": "security_username_applicationId_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "username",
+ "applicationId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.server": {
+ "name": "server",
+ "schema": "",
+ "columns": {
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ipAddress": {
+ "name": "ipAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'root'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverStatus": {
+ "name": "serverStatus",
+ "type": "serverStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "serverType": {
+ "name": "serverType",
+ "type": "serverType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'deploy'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "server_organizationId_organization_id_fk": {
+ "name": "server_organizationId_organization_id_fk",
+ "tableFrom": "server",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "server_sshKeyId_ssh-key_sshKeyId_fk": {
+ "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "server",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "sshKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_temp": {
+ "name": "session_temp",
+ "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
+ },
+ "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
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_temp_user_id_user_id_fk": {
+ "name": "session_temp_user_id_user_id_fk",
+ "tableFrom": "session_temp",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_temp_token_unique": {
+ "name": "session_temp_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh-key": {
+ "name": "ssh-key",
+ "schema": "",
+ "columns": {
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "publicKey": {
+ "name": "publicKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lastUsedAt": {
+ "name": "lastUsedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh-key_organizationId_organization_id_fk": {
+ "name": "ssh-key_organizationId_organization_id_fk",
+ "tableFrom": "ssh-key",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_provider": {
+ "name": "sso_provider",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_config": {
+ "name": "oidc_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "saml_config": {
+ "name": "saml_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sso_provider_user_id_user_id_fk": {
+ "name": "sso_provider_user_id_user_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "sso_provider_organization_id_organization_id_fk": {
+ "name": "sso_provider_organization_id_organization_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "sso_provider_provider_id_unique": {
+ "name": "sso_provider_provider_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "provider_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "firstName": {
+ "name": "firstName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "lastName": {
+ "name": "lastName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "two_factor_enabled": {
+ "name": "two_factor_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableEnterpriseFeatures": {
+ "name": "enableEnterpriseFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "licenseKey": {
+ "name": "licenseKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isValidEnterpriseLicense": {
+ "name": "isValidEnterpriseLicense",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "trustedOrigins": {
+ "name": "trustedOrigins",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_email_unique": {
+ "name": "user_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webServerSettings": {
+ "name": "webServerSettings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "raw"
+ ]
+ },
+ "public.deploymentStatus": {
+ "name": "deploymentStatus",
+ "schema": "public",
+ "values": [
+ "running",
+ "done",
+ "error",
+ "cancelled"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.gitProviderType": {
+ "name": "gitProviderType",
+ "schema": "public",
+ "values": [
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea"
+ ]
+ },
+ "public.mountType": {
+ "name": "mountType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "public.serviceType": {
+ "name": "serviceType",
+ "schema": "public",
+ "values": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "public.notificationType": {
+ "name": "notificationType",
+ "schema": "public",
+ "values": [
+ "slack",
+ "telegram",
+ "discord",
+ "email",
+ "resend",
+ "gotify",
+ "ntfy",
+ "pushover",
+ "custom",
+ "lark",
+ "teams"
+ ]
+ },
+ "public.protocolType": {
+ "name": "protocolType",
+ "schema": "public",
+ "values": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "public.publishModeType": {
+ "name": "publishModeType",
+ "schema": "public",
+ "values": [
+ "ingress",
+ "host"
+ ]
+ },
+ "public.RegistryType": {
+ "name": "RegistryType",
+ "schema": "public",
+ "values": [
+ "selfHosted",
+ "cloud"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.serverType": {
+ "name": "serverType",
+ "schema": "public",
+ "values": [
+ "deploy",
+ "build"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0145_snapshot.json b/apps/dokploy/drizzle/meta/0145_snapshot.json
new file mode 100644
index 000000000..5f45baafa
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0145_snapshot.json
@@ -0,0 +1,7459 @@
+{
+ "id": "ec86a5ad-8776-483e-a003-346d32f65089",
+ "prevId": "50c73964-11f8-41d6-a282-780e38bdddd9",
+ "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
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": true
+ },
+ "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
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": {},
+ "foreignKeys": {
+ "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.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "invitation_organization_id_organization_id_fk": {
+ "name": "invitation_organization_id_organization_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_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.member": {
+ "name": "member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteEnvironments": {
+ "name": "canDeleteEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateEnvironments": {
+ "name": "canCreateEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accessedEnvironments": {
+ "name": "accessedEnvironments",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "member_organization_id_organization_id_fk": {
+ "name": "member_organization_id_organization_id_fk",
+ "tableFrom": "member",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "member_user_id_user_id_fk": {
+ "name": "member_user_id_user_id_fk",
+ "tableFrom": "member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization": {
+ "name": "organization",
+ "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": false
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_id": {
+ "name": "owner_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "organization_owner_id_user_id_fk": {
+ "name": "organization_owner_id_user_id_fk",
+ "tableFrom": "organization",
+ "tableTo": "user",
+ "columnsFrom": [
+ "owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "organization_slug_unique": {
+ "name": "organization_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.two_factor": {
+ "name": "two_factor",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "backup_codes": {
+ "name": "backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "two_factor_user_id_user_id_fk": {
+ "name": "two_factor_user_id_user_id_fk",
+ "tableFrom": "two_factor",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.application": {
+ "name": "application",
+ "schema": "",
+ "columns": {
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewEnv": {
+ "name": "previewEnv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildArgs": {
+ "name": "previewBuildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildSecrets": {
+ "name": "previewBuildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLabels": {
+ "name": "previewLabels",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewWildcard": {
+ "name": "previewWildcard",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewPort": {
+ "name": "previewPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "previewHttps": {
+ "name": "previewHttps",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "previewPath": {
+ "name": "previewPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewRequireCollaboratorPermissions": {
+ "name": "previewRequireCollaboratorPermissions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "buildArgs": {
+ "name": "buildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildSecrets": {
+ "name": "buildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildPath": {
+ "name": "buildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBuildPath": {
+ "name": "gitlabBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBuildPath": {
+ "name": "bitbucketBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBuildPath": {
+ "name": "customGitBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerfile": {
+ "name": "dockerfile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerContextPath": {
+ "name": "dockerContextPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerBuildStage": {
+ "name": "dockerBuildStage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dropBuildPath": {
+ "name": "dropBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "buildType": {
+ "name": "buildType",
+ "type": "buildType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'nixpacks'"
+ },
+ "railpackVersion": {
+ "name": "railpackVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0.15.4'"
+ },
+ "herokuVersion": {
+ "name": "herokuVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'24'"
+ },
+ "publishDirectory": {
+ "name": "publishDirectory",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createEnvFile": {
+ "name": "createEnvFile",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackRegistryId": {
+ "name": "rollbackRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildRegistryId": {
+ "name": "buildRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "application",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_registryId_registry_registryId_fk": {
+ "name": "application_registryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "registryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_rollbackRegistryId_registry_registryId_fk": {
+ "name": "application_rollbackRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "rollbackRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_environmentId_environment_environmentId_fk": {
+ "name": "application_environmentId_environment_environmentId_fk",
+ "tableFrom": "application",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_githubId_github_githubId_fk": {
+ "name": "application_githubId_github_githubId_fk",
+ "tableFrom": "application",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_gitlabId_gitlab_gitlabId_fk": {
+ "name": "application_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "application",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_serverId_server_serverId_fk": {
+ "name": "application_serverId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_buildServerId_server_serverId_fk": {
+ "name": "application_buildServerId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_buildRegistryId_registry_registryId_fk": {
+ "name": "application_buildRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "buildRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "application_appName_unique": {
+ "name": "application_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.backup": {
+ "name": "backup",
+ "schema": "",
+ "columns": {
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "database": {
+ "name": "database",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "backup_destinationId_destination_destinationId_fk": {
+ "name": "backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_postgresId_postgres_postgresId_fk": {
+ "name": "backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mongoId_mongo_mongoId_fk": {
+ "name": "backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_userId_user_id_fk": {
+ "name": "backup_userId_user_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bitbucket": {
+ "name": "bitbucket",
+ "schema": "",
+ "columns": {
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bitbucketUsername": {
+ "name": "bitbucketUsername",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketEmail": {
+ "name": "bitbucketEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "appPassword": {
+ "name": "appPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketWorkspaceName": {
+ "name": "bitbucketWorkspaceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "bitbucket",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.certificate": {
+ "name": "certificate",
+ "schema": "",
+ "columns": {
+ "certificateId": {
+ "name": "certificateId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificateData": {
+ "name": "certificateData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificatePath": {
+ "name": "certificatePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "autoRenew": {
+ "name": "autoRenew",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "certificate_organizationId_organization_id_fk": {
+ "name": "certificate_organizationId_organization_id_fk",
+ "tableFrom": "certificate",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "certificate_serverId_server_serverId_fk": {
+ "name": "certificate_serverId_server_serverId_fk",
+ "tableFrom": "certificate",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "certificate_certificatePath_unique": {
+ "name": "certificate_certificatePath_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "certificatePath"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.compose": {
+ "name": "compose",
+ "schema": "",
+ "columns": {
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeFile": {
+ "name": "composeFile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceTypeCompose",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "composeType": {
+ "name": "composeType",
+ "type": "composeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'docker-compose'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "composePath": {
+ "name": "composePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'./docker-compose.yml'"
+ },
+ "suffix": {
+ "name": "suffix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "randomize": {
+ "name": "randomize",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeployment": {
+ "name": "isolatedDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeploymentsVolume": {
+ "name": "isolatedDeploymentsVolume",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "composeStatus": {
+ "name": "composeStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "compose",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_environmentId_environment_environmentId_fk": {
+ "name": "compose_environmentId_environment_environmentId_fk",
+ "tableFrom": "compose",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "compose_githubId_github_githubId_fk": {
+ "name": "compose_githubId_github_githubId_fk",
+ "tableFrom": "compose",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_gitlabId_gitlab_gitlabId_fk": {
+ "name": "compose_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "compose",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_serverId_server_serverId_fk": {
+ "name": "compose_serverId_server_serverId_fk",
+ "tableFrom": "compose",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.deployment": {
+ "name": "deployment",
+ "schema": "",
+ "columns": {
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "deploymentStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'running'"
+ },
+ "logPath": {
+ "name": "logPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isPreviewDeployment": {
+ "name": "isPreviewDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "deployment_applicationId_application_applicationId_fk": {
+ "name": "deployment_applicationId_application_applicationId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_composeId_compose_composeId_fk": {
+ "name": "deployment_composeId_compose_composeId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_serverId_server_serverId_fk": {
+ "name": "deployment_serverId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
+ "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "volume_backup",
+ "columnsFrom": [
+ "volumeBackupId"
+ ],
+ "columnsTo": [
+ "volumeBackupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_buildServerId_server_serverId_fk": {
+ "name": "deployment_buildServerId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.destination": {
+ "name": "destination",
+ "schema": "",
+ "columns": {
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessKey": {
+ "name": "accessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secretAccessKey": {
+ "name": "secretAccessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bucket": {
+ "name": "bucket",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region": {
+ "name": "region",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "destination_organizationId_organization_id_fk": {
+ "name": "destination_organizationId_organization_id_fk",
+ "tableFrom": "destination",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.domain": {
+ "name": "domain",
+ "schema": "",
+ "columns": {
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domainType": {
+ "name": "domainType",
+ "type": "domainType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'application'"
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "domain_composeId_compose_composeId_fk": {
+ "name": "domain_composeId_compose_composeId_fk",
+ "tableFrom": "domain",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_applicationId_application_applicationId_fk": {
+ "name": "domain_applicationId_application_applicationId_fk",
+ "tableFrom": "domain",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "domain",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.environment": {
+ "name": "environment",
+ "schema": "",
+ "columns": {
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isDefault": {
+ "name": "isDefault",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "environment_projectId_project_projectId_fk": {
+ "name": "environment_projectId_project_projectId_fk",
+ "tableFrom": "environment",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.git_provider": {
+ "name": "git_provider",
+ "schema": "",
+ "columns": {
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerType": {
+ "name": "providerType",
+ "type": "gitProviderType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "git_provider_organizationId_organization_id_fk": {
+ "name": "git_provider_organizationId_organization_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "git_provider_userId_user_id_fk": {
+ "name": "git_provider_userId_user_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "giteaInternalUrl": {
+ "name": "giteaInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github": {
+ "name": "github",
+ "schema": "",
+ "columns": {
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "githubAppName": {
+ "name": "githubAppName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubAppId": {
+ "name": "githubAppId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientId": {
+ "name": "githubClientId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientSecret": {
+ "name": "githubClientSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubInstallationId": {
+ "name": "githubInstallationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubPrivateKey": {
+ "name": "githubPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubWebhookSecret": {
+ "name": "githubWebhookSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "github_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "github",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitlab": {
+ "name": "gitlab",
+ "schema": "",
+ "columns": {
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "gitlabUrl": {
+ "name": "gitlabUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitlab.com'"
+ },
+ "gitlabInternalUrl": {
+ "name": "gitlabInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitlab",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mariadb": {
+ "name": "mariadb",
+ "schema": "",
+ "columns": {
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mariadb_environmentId_environment_environmentId_fk": {
+ "name": "mariadb_environmentId_environment_environmentId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mariadb_serverId_server_serverId_fk": {
+ "name": "mariadb_serverId_server_serverId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mariadb_appName_unique": {
+ "name": "mariadb_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mongo": {
+ "name": "mongo",
+ "schema": "",
+ "columns": {
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicaSets": {
+ "name": "replicaSets",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mongo_environmentId_environment_environmentId_fk": {
+ "name": "mongo_environmentId_environment_environmentId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mongo_serverId_server_serverId_fk": {
+ "name": "mongo_serverId_server_serverId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mongo_appName_unique": {
+ "name": "mongo_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mount": {
+ "name": "mount",
+ "schema": "",
+ "columns": {
+ "mountId": {
+ "name": "mountId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "mountType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "mountPath": {
+ "name": "mountPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mount_applicationId_application_applicationId_fk": {
+ "name": "mount_applicationId_application_applicationId_fk",
+ "tableFrom": "mount",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_postgresId_postgres_postgresId_fk": {
+ "name": "mount_postgresId_postgres_postgresId_fk",
+ "tableFrom": "mount",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mariadbId_mariadb_mariadbId_fk": {
+ "name": "mount_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mongoId_mongo_mongoId_fk": {
+ "name": "mount_mongoId_mongo_mongoId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mysqlId_mysql_mysqlId_fk": {
+ "name": "mount_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_redisId_redis_redisId_fk": {
+ "name": "mount_redisId_redis_redisId_fk",
+ "tableFrom": "mount",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_composeId_compose_composeId_fk": {
+ "name": "mount_composeId_compose_composeId_fk",
+ "tableFrom": "mount",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mysql": {
+ "name": "mysql",
+ "schema": "",
+ "columns": {
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mysql_environmentId_environment_environmentId_fk": {
+ "name": "mysql_environmentId_environment_environmentId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mysql_serverId_server_serverId_fk": {
+ "name": "mysql_serverId_server_serverId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mysql_appName_unique": {
+ "name": "mysql_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.custom": {
+ "name": "custom",
+ "schema": "",
+ "columns": {
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "headers": {
+ "name": "headers",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.discord": {
+ "name": "discord",
+ "schema": "",
+ "columns": {
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.email": {
+ "name": "email",
+ "schema": "",
+ "columns": {
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "smtpServer": {
+ "name": "smtpServer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "smtpPort": {
+ "name": "smtpPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gotify": {
+ "name": "gotify",
+ "schema": "",
+ "columns": {
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appToken": {
+ "name": "appToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.lark": {
+ "name": "lark",
+ "schema": "",
+ "columns": {
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "notificationId": {
+ "name": "notificationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appDeploy": {
+ "name": "appDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "appBuildError": {
+ "name": "appBuildError",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "databaseBackup": {
+ "name": "databaseBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "volumeBackup": {
+ "name": "volumeBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dokployRestart": {
+ "name": "dokployRestart",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerCleanup": {
+ "name": "dockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "serverThreshold": {
+ "name": "serverThreshold",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "notificationType": {
+ "name": "notificationType",
+ "type": "notificationType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_slackId_slack_slackId_fk": {
+ "name": "notification_slackId_slack_slackId_fk",
+ "tableFrom": "notification",
+ "tableTo": "slack",
+ "columnsFrom": [
+ "slackId"
+ ],
+ "columnsTo": [
+ "slackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_telegramId_telegram_telegramId_fk": {
+ "name": "notification_telegramId_telegram_telegramId_fk",
+ "tableFrom": "notification",
+ "tableTo": "telegram",
+ "columnsFrom": [
+ "telegramId"
+ ],
+ "columnsTo": [
+ "telegramId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_discordId_discord_discordId_fk": {
+ "name": "notification_discordId_discord_discordId_fk",
+ "tableFrom": "notification",
+ "tableTo": "discord",
+ "columnsFrom": [
+ "discordId"
+ ],
+ "columnsTo": [
+ "discordId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_emailId_email_emailId_fk": {
+ "name": "notification_emailId_email_emailId_fk",
+ "tableFrom": "notification",
+ "tableTo": "email",
+ "columnsFrom": [
+ "emailId"
+ ],
+ "columnsTo": [
+ "emailId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_resendId_resend_resendId_fk": {
+ "name": "notification_resendId_resend_resendId_fk",
+ "tableFrom": "notification",
+ "tableTo": "resend",
+ "columnsFrom": [
+ "resendId"
+ ],
+ "columnsTo": [
+ "resendId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_gotifyId_gotify_gotifyId_fk": {
+ "name": "notification_gotifyId_gotify_gotifyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "gotify",
+ "columnsFrom": [
+ "gotifyId"
+ ],
+ "columnsTo": [
+ "gotifyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_ntfyId_ntfy_ntfyId_fk": {
+ "name": "notification_ntfyId_ntfy_ntfyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "ntfy",
+ "columnsFrom": [
+ "ntfyId"
+ ],
+ "columnsTo": [
+ "ntfyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_customId_custom_customId_fk": {
+ "name": "notification_customId_custom_customId_fk",
+ "tableFrom": "notification",
+ "tableTo": "custom",
+ "columnsFrom": [
+ "customId"
+ ],
+ "columnsTo": [
+ "customId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_larkId_lark_larkId_fk": {
+ "name": "notification_larkId_lark_larkId_fk",
+ "tableFrom": "notification",
+ "tableTo": "lark",
+ "columnsFrom": [
+ "larkId"
+ ],
+ "columnsTo": [
+ "larkId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_pushoverId_pushover_pushoverId_fk": {
+ "name": "notification_pushoverId_pushover_pushoverId_fk",
+ "tableFrom": "notification",
+ "tableTo": "pushover",
+ "columnsFrom": [
+ "pushoverId"
+ ],
+ "columnsTo": [
+ "pushoverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_teamsId_teams_teamsId_fk": {
+ "name": "notification_teamsId_teams_teamsId_fk",
+ "tableFrom": "notification",
+ "tableTo": "teams",
+ "columnsFrom": [
+ "teamsId"
+ ],
+ "columnsTo": [
+ "teamsId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_organizationId_organization_id_fk": {
+ "name": "notification_organizationId_organization_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ntfy": {
+ "name": "ntfy",
+ "schema": "",
+ "columns": {
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topic": {
+ "name": "topic",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "accessToken": {
+ "name": "accessToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 3
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pushover": {
+ "name": "pushover",
+ "schema": "",
+ "columns": {
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userKey": {
+ "name": "userKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "retry": {
+ "name": "retry",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expire": {
+ "name": "expire",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.resend": {
+ "name": "resend",
+ "schema": "",
+ "columns": {
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.slack": {
+ "name": "slack",
+ "schema": "",
+ "columns": {
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.teams": {
+ "name": "teams",
+ "schema": "",
+ "columns": {
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.telegram": {
+ "name": "telegram",
+ "schema": "",
+ "columns": {
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "botToken": {
+ "name": "botToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "chatId": {
+ "name": "chatId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.patch": {
+ "name": "patch",
+ "schema": "",
+ "columns": {
+ "patchId": {
+ "name": "patchId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "patchType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'update'"
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "patch_applicationId_application_applicationId_fk": {
+ "name": "patch_applicationId_application_applicationId_fk",
+ "tableFrom": "patch",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "patch_composeId_compose_composeId_fk": {
+ "name": "patch_composeId_compose_composeId_fk",
+ "tableFrom": "patch",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "patch_filepath_application_unique": {
+ "name": "patch_filepath_application_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "applicationId"
+ ]
+ },
+ "patch_filepath_compose_unique": {
+ "name": "patch_filepath_compose_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "composeId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.port": {
+ "name": "port",
+ "schema": "",
+ "columns": {
+ "portId": {
+ "name": "portId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "publishedPort": {
+ "name": "publishedPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "publishMode": {
+ "name": "publishMode",
+ "type": "publishModeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'host'"
+ },
+ "targetPort": {
+ "name": "targetPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "protocolType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "port_applicationId_application_applicationId_fk": {
+ "name": "port_applicationId_application_applicationId_fk",
+ "tableFrom": "port",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.postgres": {
+ "name": "postgres",
+ "schema": "",
+ "columns": {
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "postgres_environmentId_environment_environmentId_fk": {
+ "name": "postgres_environmentId_environment_environmentId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "postgres_serverId_server_serverId_fk": {
+ "name": "postgres_serverId_server_serverId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "postgres_appName_unique": {
+ "name": "postgres_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preview_deployments": {
+ "name": "preview_deployments",
+ "schema": "",
+ "columns": {
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestId": {
+ "name": "pullRequestId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestNumber": {
+ "name": "pullRequestNumber",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestURL": {
+ "name": "pullRequestURL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestTitle": {
+ "name": "pullRequestTitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestCommentId": {
+ "name": "pullRequestCommentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previewStatus": {
+ "name": "previewStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preview_deployments_applicationId_application_applicationId_fk": {
+ "name": "preview_deployments_applicationId_application_applicationId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "preview_deployments_domainId_domain_domainId_fk": {
+ "name": "preview_deployments_domainId_domain_domainId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "domain",
+ "columnsFrom": [
+ "domainId"
+ ],
+ "columnsTo": [
+ "domainId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "preview_deployments_appName_unique": {
+ "name": "preview_deployments_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_organizationId_organization_id_fk": {
+ "name": "project_organizationId_organization_id_fk",
+ "tableFrom": "project",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redirect": {
+ "name": "redirect",
+ "schema": "",
+ "columns": {
+ "redirectId": {
+ "name": "redirectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "regex": {
+ "name": "regex",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "replacement": {
+ "name": "replacement",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permanent": {
+ "name": "permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redirect_applicationId_application_applicationId_fk": {
+ "name": "redirect_applicationId_application_applicationId_fk",
+ "tableFrom": "redirect",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redis": {
+ "name": "redis",
+ "schema": "",
+ "columns": {
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redis_environmentId_environment_environmentId_fk": {
+ "name": "redis_environmentId_environment_environmentId_fk",
+ "tableFrom": "redis",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "redis_serverId_server_serverId_fk": {
+ "name": "redis_serverId_server_serverId_fk",
+ "tableFrom": "redis",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "redis_appName_unique": {
+ "name": "redis_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.registry": {
+ "name": "registry",
+ "schema": "",
+ "columns": {
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "registryName": {
+ "name": "registryName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "imagePrefix": {
+ "name": "imagePrefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selfHosted": {
+ "name": "selfHosted",
+ "type": "RegistryType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'cloud'"
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "registry_organizationId_organization_id_fk": {
+ "name": "registry_organizationId_organization_id_fk",
+ "tableFrom": "registry",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_id_fk": {
+ "name": "schedule_userId_user_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security": {
+ "name": "security",
+ "schema": "",
+ "columns": {
+ "securityId": {
+ "name": "securityId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "security_applicationId_application_applicationId_fk": {
+ "name": "security_applicationId_application_applicationId_fk",
+ "tableFrom": "security",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "security_username_applicationId_unique": {
+ "name": "security_username_applicationId_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "username",
+ "applicationId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.server": {
+ "name": "server",
+ "schema": "",
+ "columns": {
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ipAddress": {
+ "name": "ipAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'root'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverStatus": {
+ "name": "serverStatus",
+ "type": "serverStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "serverType": {
+ "name": "serverType",
+ "type": "serverType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'deploy'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "server_organizationId_organization_id_fk": {
+ "name": "server_organizationId_organization_id_fk",
+ "tableFrom": "server",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "server_sshKeyId_ssh-key_sshKeyId_fk": {
+ "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "server",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "sshKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_temp": {
+ "name": "session_temp",
+ "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
+ },
+ "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
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_temp_user_id_user_id_fk": {
+ "name": "session_temp_user_id_user_id_fk",
+ "tableFrom": "session_temp",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_temp_token_unique": {
+ "name": "session_temp_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh-key": {
+ "name": "ssh-key",
+ "schema": "",
+ "columns": {
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "publicKey": {
+ "name": "publicKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lastUsedAt": {
+ "name": "lastUsedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh-key_organizationId_organization_id_fk": {
+ "name": "ssh-key_organizationId_organization_id_fk",
+ "tableFrom": "ssh-key",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_provider": {
+ "name": "sso_provider",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_config": {
+ "name": "oidc_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "saml_config": {
+ "name": "saml_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sso_provider_user_id_user_id_fk": {
+ "name": "sso_provider_user_id_user_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "sso_provider_organization_id_organization_id_fk": {
+ "name": "sso_provider_organization_id_organization_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "sso_provider_provider_id_unique": {
+ "name": "sso_provider_provider_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "provider_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "firstName": {
+ "name": "firstName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "lastName": {
+ "name": "lastName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "two_factor_enabled": {
+ "name": "two_factor_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableEnterpriseFeatures": {
+ "name": "enableEnterpriseFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "licenseKey": {
+ "name": "licenseKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isValidEnterpriseLicense": {
+ "name": "isValidEnterpriseLicense",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "trustedOrigins": {
+ "name": "trustedOrigins",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_email_unique": {
+ "name": "user_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webServerSettings": {
+ "name": "webServerSettings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "raw"
+ ]
+ },
+ "public.deploymentStatus": {
+ "name": "deploymentStatus",
+ "schema": "public",
+ "values": [
+ "running",
+ "done",
+ "error",
+ "cancelled"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.gitProviderType": {
+ "name": "gitProviderType",
+ "schema": "public",
+ "values": [
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea"
+ ]
+ },
+ "public.mountType": {
+ "name": "mountType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "public.serviceType": {
+ "name": "serviceType",
+ "schema": "public",
+ "values": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "public.notificationType": {
+ "name": "notificationType",
+ "schema": "public",
+ "values": [
+ "slack",
+ "telegram",
+ "discord",
+ "email",
+ "resend",
+ "gotify",
+ "ntfy",
+ "pushover",
+ "custom",
+ "lark",
+ "teams"
+ ]
+ },
+ "public.patchType": {
+ "name": "patchType",
+ "schema": "public",
+ "values": [
+ "create",
+ "update",
+ "delete"
+ ]
+ },
+ "public.protocolType": {
+ "name": "protocolType",
+ "schema": "public",
+ "values": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "public.publishModeType": {
+ "name": "publishModeType",
+ "schema": "public",
+ "values": [
+ "ingress",
+ "host"
+ ]
+ },
+ "public.RegistryType": {
+ "name": "RegistryType",
+ "schema": "public",
+ "values": [
+ "selfHosted",
+ "cloud"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.serverType": {
+ "name": "serverType",
+ "schema": "public",
+ "values": [
+ "deploy",
+ "build"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0146_snapshot.json b/apps/dokploy/drizzle/meta/0146_snapshot.json
new file mode 100644
index 000000000..d4ebce64a
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0146_snapshot.json
@@ -0,0 +1,7460 @@
+{
+ "id": "f152cf50-c7de-44de-b4a7-57b0f0c02596",
+ "prevId": "ec86a5ad-8776-483e-a003-346d32f65089",
+ "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
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": true
+ },
+ "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
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": {},
+ "foreignKeys": {
+ "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.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "invitation_organization_id_organization_id_fk": {
+ "name": "invitation_organization_id_organization_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_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.member": {
+ "name": "member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteEnvironments": {
+ "name": "canDeleteEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateEnvironments": {
+ "name": "canCreateEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accessedEnvironments": {
+ "name": "accessedEnvironments",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "member_organization_id_organization_id_fk": {
+ "name": "member_organization_id_organization_id_fk",
+ "tableFrom": "member",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "member_user_id_user_id_fk": {
+ "name": "member_user_id_user_id_fk",
+ "tableFrom": "member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization": {
+ "name": "organization",
+ "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": false
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_id": {
+ "name": "owner_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "organization_owner_id_user_id_fk": {
+ "name": "organization_owner_id_user_id_fk",
+ "tableFrom": "organization",
+ "tableTo": "user",
+ "columnsFrom": [
+ "owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "organization_slug_unique": {
+ "name": "organization_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.two_factor": {
+ "name": "two_factor",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "backup_codes": {
+ "name": "backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "two_factor_user_id_user_id_fk": {
+ "name": "two_factor_user_id_user_id_fk",
+ "tableFrom": "two_factor",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.application": {
+ "name": "application",
+ "schema": "",
+ "columns": {
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewEnv": {
+ "name": "previewEnv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildArgs": {
+ "name": "previewBuildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildSecrets": {
+ "name": "previewBuildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLabels": {
+ "name": "previewLabels",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewWildcard": {
+ "name": "previewWildcard",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewPort": {
+ "name": "previewPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "previewHttps": {
+ "name": "previewHttps",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "previewPath": {
+ "name": "previewPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewRequireCollaboratorPermissions": {
+ "name": "previewRequireCollaboratorPermissions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "buildArgs": {
+ "name": "buildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildSecrets": {
+ "name": "buildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildPath": {
+ "name": "buildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBuildPath": {
+ "name": "gitlabBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBuildPath": {
+ "name": "bitbucketBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBuildPath": {
+ "name": "customGitBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerfile": {
+ "name": "dockerfile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Dockerfile'"
+ },
+ "dockerContextPath": {
+ "name": "dockerContextPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerBuildStage": {
+ "name": "dockerBuildStage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dropBuildPath": {
+ "name": "dropBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "buildType": {
+ "name": "buildType",
+ "type": "buildType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'nixpacks'"
+ },
+ "railpackVersion": {
+ "name": "railpackVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0.15.4'"
+ },
+ "herokuVersion": {
+ "name": "herokuVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'24'"
+ },
+ "publishDirectory": {
+ "name": "publishDirectory",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createEnvFile": {
+ "name": "createEnvFile",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackRegistryId": {
+ "name": "rollbackRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildRegistryId": {
+ "name": "buildRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "application",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_registryId_registry_registryId_fk": {
+ "name": "application_registryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "registryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_rollbackRegistryId_registry_registryId_fk": {
+ "name": "application_rollbackRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "rollbackRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_environmentId_environment_environmentId_fk": {
+ "name": "application_environmentId_environment_environmentId_fk",
+ "tableFrom": "application",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_githubId_github_githubId_fk": {
+ "name": "application_githubId_github_githubId_fk",
+ "tableFrom": "application",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_gitlabId_gitlab_gitlabId_fk": {
+ "name": "application_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "application",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_serverId_server_serverId_fk": {
+ "name": "application_serverId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_buildServerId_server_serverId_fk": {
+ "name": "application_buildServerId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_buildRegistryId_registry_registryId_fk": {
+ "name": "application_buildRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "buildRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "application_appName_unique": {
+ "name": "application_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.backup": {
+ "name": "backup",
+ "schema": "",
+ "columns": {
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "database": {
+ "name": "database",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "backup_destinationId_destination_destinationId_fk": {
+ "name": "backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_postgresId_postgres_postgresId_fk": {
+ "name": "backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mongoId_mongo_mongoId_fk": {
+ "name": "backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_userId_user_id_fk": {
+ "name": "backup_userId_user_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bitbucket": {
+ "name": "bitbucket",
+ "schema": "",
+ "columns": {
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bitbucketUsername": {
+ "name": "bitbucketUsername",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketEmail": {
+ "name": "bitbucketEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "appPassword": {
+ "name": "appPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketWorkspaceName": {
+ "name": "bitbucketWorkspaceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "bitbucket",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.certificate": {
+ "name": "certificate",
+ "schema": "",
+ "columns": {
+ "certificateId": {
+ "name": "certificateId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificateData": {
+ "name": "certificateData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificatePath": {
+ "name": "certificatePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "autoRenew": {
+ "name": "autoRenew",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "certificate_organizationId_organization_id_fk": {
+ "name": "certificate_organizationId_organization_id_fk",
+ "tableFrom": "certificate",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "certificate_serverId_server_serverId_fk": {
+ "name": "certificate_serverId_server_serverId_fk",
+ "tableFrom": "certificate",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "certificate_certificatePath_unique": {
+ "name": "certificate_certificatePath_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "certificatePath"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.compose": {
+ "name": "compose",
+ "schema": "",
+ "columns": {
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeFile": {
+ "name": "composeFile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceTypeCompose",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "composeType": {
+ "name": "composeType",
+ "type": "composeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'docker-compose'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "composePath": {
+ "name": "composePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'./docker-compose.yml'"
+ },
+ "suffix": {
+ "name": "suffix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "randomize": {
+ "name": "randomize",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeployment": {
+ "name": "isolatedDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeploymentsVolume": {
+ "name": "isolatedDeploymentsVolume",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "composeStatus": {
+ "name": "composeStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "compose",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_environmentId_environment_environmentId_fk": {
+ "name": "compose_environmentId_environment_environmentId_fk",
+ "tableFrom": "compose",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "compose_githubId_github_githubId_fk": {
+ "name": "compose_githubId_github_githubId_fk",
+ "tableFrom": "compose",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_gitlabId_gitlab_gitlabId_fk": {
+ "name": "compose_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "compose",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_serverId_server_serverId_fk": {
+ "name": "compose_serverId_server_serverId_fk",
+ "tableFrom": "compose",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.deployment": {
+ "name": "deployment",
+ "schema": "",
+ "columns": {
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "deploymentStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'running'"
+ },
+ "logPath": {
+ "name": "logPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isPreviewDeployment": {
+ "name": "isPreviewDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "deployment_applicationId_application_applicationId_fk": {
+ "name": "deployment_applicationId_application_applicationId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_composeId_compose_composeId_fk": {
+ "name": "deployment_composeId_compose_composeId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_serverId_server_serverId_fk": {
+ "name": "deployment_serverId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
+ "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "volume_backup",
+ "columnsFrom": [
+ "volumeBackupId"
+ ],
+ "columnsTo": [
+ "volumeBackupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_buildServerId_server_serverId_fk": {
+ "name": "deployment_buildServerId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.destination": {
+ "name": "destination",
+ "schema": "",
+ "columns": {
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessKey": {
+ "name": "accessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secretAccessKey": {
+ "name": "secretAccessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bucket": {
+ "name": "bucket",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region": {
+ "name": "region",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "destination_organizationId_organization_id_fk": {
+ "name": "destination_organizationId_organization_id_fk",
+ "tableFrom": "destination",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.domain": {
+ "name": "domain",
+ "schema": "",
+ "columns": {
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domainType": {
+ "name": "domainType",
+ "type": "domainType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'application'"
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "domain_composeId_compose_composeId_fk": {
+ "name": "domain_composeId_compose_composeId_fk",
+ "tableFrom": "domain",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_applicationId_application_applicationId_fk": {
+ "name": "domain_applicationId_application_applicationId_fk",
+ "tableFrom": "domain",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "domain",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.environment": {
+ "name": "environment",
+ "schema": "",
+ "columns": {
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isDefault": {
+ "name": "isDefault",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "environment_projectId_project_projectId_fk": {
+ "name": "environment_projectId_project_projectId_fk",
+ "tableFrom": "environment",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.git_provider": {
+ "name": "git_provider",
+ "schema": "",
+ "columns": {
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerType": {
+ "name": "providerType",
+ "type": "gitProviderType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "git_provider_organizationId_organization_id_fk": {
+ "name": "git_provider_organizationId_organization_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "git_provider_userId_user_id_fk": {
+ "name": "git_provider_userId_user_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "giteaInternalUrl": {
+ "name": "giteaInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github": {
+ "name": "github",
+ "schema": "",
+ "columns": {
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "githubAppName": {
+ "name": "githubAppName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubAppId": {
+ "name": "githubAppId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientId": {
+ "name": "githubClientId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientSecret": {
+ "name": "githubClientSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubInstallationId": {
+ "name": "githubInstallationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubPrivateKey": {
+ "name": "githubPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubWebhookSecret": {
+ "name": "githubWebhookSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "github_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "github",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitlab": {
+ "name": "gitlab",
+ "schema": "",
+ "columns": {
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "gitlabUrl": {
+ "name": "gitlabUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitlab.com'"
+ },
+ "gitlabInternalUrl": {
+ "name": "gitlabInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitlab",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mariadb": {
+ "name": "mariadb",
+ "schema": "",
+ "columns": {
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mariadb_environmentId_environment_environmentId_fk": {
+ "name": "mariadb_environmentId_environment_environmentId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mariadb_serverId_server_serverId_fk": {
+ "name": "mariadb_serverId_server_serverId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mariadb_appName_unique": {
+ "name": "mariadb_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mongo": {
+ "name": "mongo",
+ "schema": "",
+ "columns": {
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicaSets": {
+ "name": "replicaSets",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mongo_environmentId_environment_environmentId_fk": {
+ "name": "mongo_environmentId_environment_environmentId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mongo_serverId_server_serverId_fk": {
+ "name": "mongo_serverId_server_serverId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mongo_appName_unique": {
+ "name": "mongo_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mount": {
+ "name": "mount",
+ "schema": "",
+ "columns": {
+ "mountId": {
+ "name": "mountId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "mountType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "mountPath": {
+ "name": "mountPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mount_applicationId_application_applicationId_fk": {
+ "name": "mount_applicationId_application_applicationId_fk",
+ "tableFrom": "mount",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_postgresId_postgres_postgresId_fk": {
+ "name": "mount_postgresId_postgres_postgresId_fk",
+ "tableFrom": "mount",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mariadbId_mariadb_mariadbId_fk": {
+ "name": "mount_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mongoId_mongo_mongoId_fk": {
+ "name": "mount_mongoId_mongo_mongoId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mysqlId_mysql_mysqlId_fk": {
+ "name": "mount_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_redisId_redis_redisId_fk": {
+ "name": "mount_redisId_redis_redisId_fk",
+ "tableFrom": "mount",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_composeId_compose_composeId_fk": {
+ "name": "mount_composeId_compose_composeId_fk",
+ "tableFrom": "mount",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mysql": {
+ "name": "mysql",
+ "schema": "",
+ "columns": {
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mysql_environmentId_environment_environmentId_fk": {
+ "name": "mysql_environmentId_environment_environmentId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mysql_serverId_server_serverId_fk": {
+ "name": "mysql_serverId_server_serverId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mysql_appName_unique": {
+ "name": "mysql_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.custom": {
+ "name": "custom",
+ "schema": "",
+ "columns": {
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "headers": {
+ "name": "headers",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.discord": {
+ "name": "discord",
+ "schema": "",
+ "columns": {
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.email": {
+ "name": "email",
+ "schema": "",
+ "columns": {
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "smtpServer": {
+ "name": "smtpServer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "smtpPort": {
+ "name": "smtpPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gotify": {
+ "name": "gotify",
+ "schema": "",
+ "columns": {
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appToken": {
+ "name": "appToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.lark": {
+ "name": "lark",
+ "schema": "",
+ "columns": {
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "notificationId": {
+ "name": "notificationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appDeploy": {
+ "name": "appDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "appBuildError": {
+ "name": "appBuildError",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "databaseBackup": {
+ "name": "databaseBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "volumeBackup": {
+ "name": "volumeBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dokployRestart": {
+ "name": "dokployRestart",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerCleanup": {
+ "name": "dockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "serverThreshold": {
+ "name": "serverThreshold",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "notificationType": {
+ "name": "notificationType",
+ "type": "notificationType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_slackId_slack_slackId_fk": {
+ "name": "notification_slackId_slack_slackId_fk",
+ "tableFrom": "notification",
+ "tableTo": "slack",
+ "columnsFrom": [
+ "slackId"
+ ],
+ "columnsTo": [
+ "slackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_telegramId_telegram_telegramId_fk": {
+ "name": "notification_telegramId_telegram_telegramId_fk",
+ "tableFrom": "notification",
+ "tableTo": "telegram",
+ "columnsFrom": [
+ "telegramId"
+ ],
+ "columnsTo": [
+ "telegramId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_discordId_discord_discordId_fk": {
+ "name": "notification_discordId_discord_discordId_fk",
+ "tableFrom": "notification",
+ "tableTo": "discord",
+ "columnsFrom": [
+ "discordId"
+ ],
+ "columnsTo": [
+ "discordId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_emailId_email_emailId_fk": {
+ "name": "notification_emailId_email_emailId_fk",
+ "tableFrom": "notification",
+ "tableTo": "email",
+ "columnsFrom": [
+ "emailId"
+ ],
+ "columnsTo": [
+ "emailId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_resendId_resend_resendId_fk": {
+ "name": "notification_resendId_resend_resendId_fk",
+ "tableFrom": "notification",
+ "tableTo": "resend",
+ "columnsFrom": [
+ "resendId"
+ ],
+ "columnsTo": [
+ "resendId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_gotifyId_gotify_gotifyId_fk": {
+ "name": "notification_gotifyId_gotify_gotifyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "gotify",
+ "columnsFrom": [
+ "gotifyId"
+ ],
+ "columnsTo": [
+ "gotifyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_ntfyId_ntfy_ntfyId_fk": {
+ "name": "notification_ntfyId_ntfy_ntfyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "ntfy",
+ "columnsFrom": [
+ "ntfyId"
+ ],
+ "columnsTo": [
+ "ntfyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_customId_custom_customId_fk": {
+ "name": "notification_customId_custom_customId_fk",
+ "tableFrom": "notification",
+ "tableTo": "custom",
+ "columnsFrom": [
+ "customId"
+ ],
+ "columnsTo": [
+ "customId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_larkId_lark_larkId_fk": {
+ "name": "notification_larkId_lark_larkId_fk",
+ "tableFrom": "notification",
+ "tableTo": "lark",
+ "columnsFrom": [
+ "larkId"
+ ],
+ "columnsTo": [
+ "larkId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_pushoverId_pushover_pushoverId_fk": {
+ "name": "notification_pushoverId_pushover_pushoverId_fk",
+ "tableFrom": "notification",
+ "tableTo": "pushover",
+ "columnsFrom": [
+ "pushoverId"
+ ],
+ "columnsTo": [
+ "pushoverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_teamsId_teams_teamsId_fk": {
+ "name": "notification_teamsId_teams_teamsId_fk",
+ "tableFrom": "notification",
+ "tableTo": "teams",
+ "columnsFrom": [
+ "teamsId"
+ ],
+ "columnsTo": [
+ "teamsId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_organizationId_organization_id_fk": {
+ "name": "notification_organizationId_organization_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ntfy": {
+ "name": "ntfy",
+ "schema": "",
+ "columns": {
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topic": {
+ "name": "topic",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "accessToken": {
+ "name": "accessToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 3
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pushover": {
+ "name": "pushover",
+ "schema": "",
+ "columns": {
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userKey": {
+ "name": "userKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "retry": {
+ "name": "retry",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expire": {
+ "name": "expire",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.resend": {
+ "name": "resend",
+ "schema": "",
+ "columns": {
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.slack": {
+ "name": "slack",
+ "schema": "",
+ "columns": {
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.teams": {
+ "name": "teams",
+ "schema": "",
+ "columns": {
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.telegram": {
+ "name": "telegram",
+ "schema": "",
+ "columns": {
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "botToken": {
+ "name": "botToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "chatId": {
+ "name": "chatId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.patch": {
+ "name": "patch",
+ "schema": "",
+ "columns": {
+ "patchId": {
+ "name": "patchId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "patchType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'update'"
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "patch_applicationId_application_applicationId_fk": {
+ "name": "patch_applicationId_application_applicationId_fk",
+ "tableFrom": "patch",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "patch_composeId_compose_composeId_fk": {
+ "name": "patch_composeId_compose_composeId_fk",
+ "tableFrom": "patch",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "patch_filepath_application_unique": {
+ "name": "patch_filepath_application_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "applicationId"
+ ]
+ },
+ "patch_filepath_compose_unique": {
+ "name": "patch_filepath_compose_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "composeId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.port": {
+ "name": "port",
+ "schema": "",
+ "columns": {
+ "portId": {
+ "name": "portId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "publishedPort": {
+ "name": "publishedPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "publishMode": {
+ "name": "publishMode",
+ "type": "publishModeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'host'"
+ },
+ "targetPort": {
+ "name": "targetPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "protocolType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "port_applicationId_application_applicationId_fk": {
+ "name": "port_applicationId_application_applicationId_fk",
+ "tableFrom": "port",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.postgres": {
+ "name": "postgres",
+ "schema": "",
+ "columns": {
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "postgres_environmentId_environment_environmentId_fk": {
+ "name": "postgres_environmentId_environment_environmentId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "postgres_serverId_server_serverId_fk": {
+ "name": "postgres_serverId_server_serverId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "postgres_appName_unique": {
+ "name": "postgres_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preview_deployments": {
+ "name": "preview_deployments",
+ "schema": "",
+ "columns": {
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestId": {
+ "name": "pullRequestId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestNumber": {
+ "name": "pullRequestNumber",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestURL": {
+ "name": "pullRequestURL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestTitle": {
+ "name": "pullRequestTitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestCommentId": {
+ "name": "pullRequestCommentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previewStatus": {
+ "name": "previewStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preview_deployments_applicationId_application_applicationId_fk": {
+ "name": "preview_deployments_applicationId_application_applicationId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "preview_deployments_domainId_domain_domainId_fk": {
+ "name": "preview_deployments_domainId_domain_domainId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "domain",
+ "columnsFrom": [
+ "domainId"
+ ],
+ "columnsTo": [
+ "domainId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "preview_deployments_appName_unique": {
+ "name": "preview_deployments_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_organizationId_organization_id_fk": {
+ "name": "project_organizationId_organization_id_fk",
+ "tableFrom": "project",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redirect": {
+ "name": "redirect",
+ "schema": "",
+ "columns": {
+ "redirectId": {
+ "name": "redirectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "regex": {
+ "name": "regex",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "replacement": {
+ "name": "replacement",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permanent": {
+ "name": "permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redirect_applicationId_application_applicationId_fk": {
+ "name": "redirect_applicationId_application_applicationId_fk",
+ "tableFrom": "redirect",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redis": {
+ "name": "redis",
+ "schema": "",
+ "columns": {
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redis_environmentId_environment_environmentId_fk": {
+ "name": "redis_environmentId_environment_environmentId_fk",
+ "tableFrom": "redis",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "redis_serverId_server_serverId_fk": {
+ "name": "redis_serverId_server_serverId_fk",
+ "tableFrom": "redis",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "redis_appName_unique": {
+ "name": "redis_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.registry": {
+ "name": "registry",
+ "schema": "",
+ "columns": {
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "registryName": {
+ "name": "registryName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "imagePrefix": {
+ "name": "imagePrefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selfHosted": {
+ "name": "selfHosted",
+ "type": "RegistryType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'cloud'"
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "registry_organizationId_organization_id_fk": {
+ "name": "registry_organizationId_organization_id_fk",
+ "tableFrom": "registry",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_id_fk": {
+ "name": "schedule_userId_user_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security": {
+ "name": "security",
+ "schema": "",
+ "columns": {
+ "securityId": {
+ "name": "securityId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "security_applicationId_application_applicationId_fk": {
+ "name": "security_applicationId_application_applicationId_fk",
+ "tableFrom": "security",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "security_username_applicationId_unique": {
+ "name": "security_username_applicationId_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "username",
+ "applicationId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.server": {
+ "name": "server",
+ "schema": "",
+ "columns": {
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ipAddress": {
+ "name": "ipAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'root'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverStatus": {
+ "name": "serverStatus",
+ "type": "serverStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "serverType": {
+ "name": "serverType",
+ "type": "serverType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'deploy'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "server_organizationId_organization_id_fk": {
+ "name": "server_organizationId_organization_id_fk",
+ "tableFrom": "server",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "server_sshKeyId_ssh-key_sshKeyId_fk": {
+ "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "server",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "sshKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_temp": {
+ "name": "session_temp",
+ "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
+ },
+ "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
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_temp_user_id_user_id_fk": {
+ "name": "session_temp_user_id_user_id_fk",
+ "tableFrom": "session_temp",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_temp_token_unique": {
+ "name": "session_temp_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh-key": {
+ "name": "ssh-key",
+ "schema": "",
+ "columns": {
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "publicKey": {
+ "name": "publicKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lastUsedAt": {
+ "name": "lastUsedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh-key_organizationId_organization_id_fk": {
+ "name": "ssh-key_organizationId_organization_id_fk",
+ "tableFrom": "ssh-key",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_provider": {
+ "name": "sso_provider",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_config": {
+ "name": "oidc_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "saml_config": {
+ "name": "saml_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sso_provider_user_id_user_id_fk": {
+ "name": "sso_provider_user_id_user_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "sso_provider_organization_id_organization_id_fk": {
+ "name": "sso_provider_organization_id_organization_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "sso_provider_provider_id_unique": {
+ "name": "sso_provider_provider_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "provider_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "firstName": {
+ "name": "firstName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "lastName": {
+ "name": "lastName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "two_factor_enabled": {
+ "name": "two_factor_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableEnterpriseFeatures": {
+ "name": "enableEnterpriseFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "licenseKey": {
+ "name": "licenseKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isValidEnterpriseLicense": {
+ "name": "isValidEnterpriseLicense",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "trustedOrigins": {
+ "name": "trustedOrigins",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_email_unique": {
+ "name": "user_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webServerSettings": {
+ "name": "webServerSettings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "raw"
+ ]
+ },
+ "public.deploymentStatus": {
+ "name": "deploymentStatus",
+ "schema": "public",
+ "values": [
+ "running",
+ "done",
+ "error",
+ "cancelled"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.gitProviderType": {
+ "name": "gitProviderType",
+ "schema": "public",
+ "values": [
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea"
+ ]
+ },
+ "public.mountType": {
+ "name": "mountType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "public.serviceType": {
+ "name": "serviceType",
+ "schema": "public",
+ "values": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "public.notificationType": {
+ "name": "notificationType",
+ "schema": "public",
+ "values": [
+ "slack",
+ "telegram",
+ "discord",
+ "email",
+ "resend",
+ "gotify",
+ "ntfy",
+ "pushover",
+ "custom",
+ "lark",
+ "teams"
+ ]
+ },
+ "public.patchType": {
+ "name": "patchType",
+ "schema": "public",
+ "values": [
+ "create",
+ "update",
+ "delete"
+ ]
+ },
+ "public.protocolType": {
+ "name": "protocolType",
+ "schema": "public",
+ "values": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "public.publishModeType": {
+ "name": "publishModeType",
+ "schema": "public",
+ "values": [
+ "ingress",
+ "host"
+ ]
+ },
+ "public.RegistryType": {
+ "name": "RegistryType",
+ "schema": "public",
+ "values": [
+ "selfHosted",
+ "cloud"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.serverType": {
+ "name": "serverType",
+ "schema": "public",
+ "values": [
+ "deploy",
+ "build"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0147_snapshot.json b/apps/dokploy/drizzle/meta/0147_snapshot.json
new file mode 100644
index 000000000..d93eb0d43
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0147_snapshot.json
@@ -0,0 +1,7460 @@
+{
+ "id": "2e0aba0b-93fc-4bfe-a975-1c5d45354753",
+ "prevId": "f152cf50-c7de-44de-b4a7-57b0f0c02596",
+ "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
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": true
+ },
+ "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
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": {},
+ "foreignKeys": {
+ "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.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "invitation_organization_id_organization_id_fk": {
+ "name": "invitation_organization_id_organization_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_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.member": {
+ "name": "member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteEnvironments": {
+ "name": "canDeleteEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateEnvironments": {
+ "name": "canCreateEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accessedEnvironments": {
+ "name": "accessedEnvironments",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "member_organization_id_organization_id_fk": {
+ "name": "member_organization_id_organization_id_fk",
+ "tableFrom": "member",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "member_user_id_user_id_fk": {
+ "name": "member_user_id_user_id_fk",
+ "tableFrom": "member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization": {
+ "name": "organization",
+ "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": false
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_id": {
+ "name": "owner_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "organization_owner_id_user_id_fk": {
+ "name": "organization_owner_id_user_id_fk",
+ "tableFrom": "organization",
+ "tableTo": "user",
+ "columnsFrom": [
+ "owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "organization_slug_unique": {
+ "name": "organization_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.two_factor": {
+ "name": "two_factor",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "backup_codes": {
+ "name": "backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "two_factor_user_id_user_id_fk": {
+ "name": "two_factor_user_id_user_id_fk",
+ "tableFrom": "two_factor",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.application": {
+ "name": "application",
+ "schema": "",
+ "columns": {
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewEnv": {
+ "name": "previewEnv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildArgs": {
+ "name": "previewBuildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildSecrets": {
+ "name": "previewBuildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLabels": {
+ "name": "previewLabels",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewWildcard": {
+ "name": "previewWildcard",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewPort": {
+ "name": "previewPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "previewHttps": {
+ "name": "previewHttps",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "previewPath": {
+ "name": "previewPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewRequireCollaboratorPermissions": {
+ "name": "previewRequireCollaboratorPermissions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "buildArgs": {
+ "name": "buildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildSecrets": {
+ "name": "buildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildPath": {
+ "name": "buildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBuildPath": {
+ "name": "gitlabBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBuildPath": {
+ "name": "bitbucketBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBuildPath": {
+ "name": "customGitBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerfile": {
+ "name": "dockerfile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Dockerfile'"
+ },
+ "dockerContextPath": {
+ "name": "dockerContextPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerBuildStage": {
+ "name": "dockerBuildStage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dropBuildPath": {
+ "name": "dropBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "buildType": {
+ "name": "buildType",
+ "type": "buildType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'nixpacks'"
+ },
+ "railpackVersion": {
+ "name": "railpackVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0.15.4'"
+ },
+ "herokuVersion": {
+ "name": "herokuVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'24'"
+ },
+ "publishDirectory": {
+ "name": "publishDirectory",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createEnvFile": {
+ "name": "createEnvFile",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackRegistryId": {
+ "name": "rollbackRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildRegistryId": {
+ "name": "buildRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "application",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_registryId_registry_registryId_fk": {
+ "name": "application_registryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "registryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_rollbackRegistryId_registry_registryId_fk": {
+ "name": "application_rollbackRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "rollbackRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_environmentId_environment_environmentId_fk": {
+ "name": "application_environmentId_environment_environmentId_fk",
+ "tableFrom": "application",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_githubId_github_githubId_fk": {
+ "name": "application_githubId_github_githubId_fk",
+ "tableFrom": "application",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_gitlabId_gitlab_gitlabId_fk": {
+ "name": "application_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "application",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_serverId_server_serverId_fk": {
+ "name": "application_serverId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_buildServerId_server_serverId_fk": {
+ "name": "application_buildServerId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_buildRegistryId_registry_registryId_fk": {
+ "name": "application_buildRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "buildRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "application_appName_unique": {
+ "name": "application_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.backup": {
+ "name": "backup",
+ "schema": "",
+ "columns": {
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "database": {
+ "name": "database",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "backup_destinationId_destination_destinationId_fk": {
+ "name": "backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_postgresId_postgres_postgresId_fk": {
+ "name": "backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mongoId_mongo_mongoId_fk": {
+ "name": "backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_userId_user_id_fk": {
+ "name": "backup_userId_user_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bitbucket": {
+ "name": "bitbucket",
+ "schema": "",
+ "columns": {
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bitbucketUsername": {
+ "name": "bitbucketUsername",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketEmail": {
+ "name": "bitbucketEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "appPassword": {
+ "name": "appPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketWorkspaceName": {
+ "name": "bitbucketWorkspaceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "bitbucket",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.certificate": {
+ "name": "certificate",
+ "schema": "",
+ "columns": {
+ "certificateId": {
+ "name": "certificateId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificateData": {
+ "name": "certificateData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificatePath": {
+ "name": "certificatePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "autoRenew": {
+ "name": "autoRenew",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "certificate_organizationId_organization_id_fk": {
+ "name": "certificate_organizationId_organization_id_fk",
+ "tableFrom": "certificate",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "certificate_serverId_server_serverId_fk": {
+ "name": "certificate_serverId_server_serverId_fk",
+ "tableFrom": "certificate",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "certificate_certificatePath_unique": {
+ "name": "certificate_certificatePath_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "certificatePath"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.compose": {
+ "name": "compose",
+ "schema": "",
+ "columns": {
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeFile": {
+ "name": "composeFile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceTypeCompose",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "composeType": {
+ "name": "composeType",
+ "type": "composeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'docker-compose'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "composePath": {
+ "name": "composePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'./docker-compose.yml'"
+ },
+ "suffix": {
+ "name": "suffix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "randomize": {
+ "name": "randomize",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeployment": {
+ "name": "isolatedDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeploymentsVolume": {
+ "name": "isolatedDeploymentsVolume",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "composeStatus": {
+ "name": "composeStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "compose",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_environmentId_environment_environmentId_fk": {
+ "name": "compose_environmentId_environment_environmentId_fk",
+ "tableFrom": "compose",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "compose_githubId_github_githubId_fk": {
+ "name": "compose_githubId_github_githubId_fk",
+ "tableFrom": "compose",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_gitlabId_gitlab_gitlabId_fk": {
+ "name": "compose_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "compose",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_serverId_server_serverId_fk": {
+ "name": "compose_serverId_server_serverId_fk",
+ "tableFrom": "compose",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.deployment": {
+ "name": "deployment",
+ "schema": "",
+ "columns": {
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "deploymentStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'running'"
+ },
+ "logPath": {
+ "name": "logPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isPreviewDeployment": {
+ "name": "isPreviewDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "deployment_applicationId_application_applicationId_fk": {
+ "name": "deployment_applicationId_application_applicationId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_composeId_compose_composeId_fk": {
+ "name": "deployment_composeId_compose_composeId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_serverId_server_serverId_fk": {
+ "name": "deployment_serverId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
+ "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "volume_backup",
+ "columnsFrom": [
+ "volumeBackupId"
+ ],
+ "columnsTo": [
+ "volumeBackupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_buildServerId_server_serverId_fk": {
+ "name": "deployment_buildServerId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.destination": {
+ "name": "destination",
+ "schema": "",
+ "columns": {
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessKey": {
+ "name": "accessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secretAccessKey": {
+ "name": "secretAccessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bucket": {
+ "name": "bucket",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region": {
+ "name": "region",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "destination_organizationId_organization_id_fk": {
+ "name": "destination_organizationId_organization_id_fk",
+ "tableFrom": "destination",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.domain": {
+ "name": "domain",
+ "schema": "",
+ "columns": {
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domainType": {
+ "name": "domainType",
+ "type": "domainType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'application'"
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "domain_composeId_compose_composeId_fk": {
+ "name": "domain_composeId_compose_composeId_fk",
+ "tableFrom": "domain",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_applicationId_application_applicationId_fk": {
+ "name": "domain_applicationId_application_applicationId_fk",
+ "tableFrom": "domain",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "domain",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.environment": {
+ "name": "environment",
+ "schema": "",
+ "columns": {
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isDefault": {
+ "name": "isDefault",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "environment_projectId_project_projectId_fk": {
+ "name": "environment_projectId_project_projectId_fk",
+ "tableFrom": "environment",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.git_provider": {
+ "name": "git_provider",
+ "schema": "",
+ "columns": {
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerType": {
+ "name": "providerType",
+ "type": "gitProviderType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "git_provider_organizationId_organization_id_fk": {
+ "name": "git_provider_organizationId_organization_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "git_provider_userId_user_id_fk": {
+ "name": "git_provider_userId_user_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "giteaInternalUrl": {
+ "name": "giteaInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github": {
+ "name": "github",
+ "schema": "",
+ "columns": {
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "githubAppName": {
+ "name": "githubAppName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubAppId": {
+ "name": "githubAppId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientId": {
+ "name": "githubClientId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientSecret": {
+ "name": "githubClientSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubInstallationId": {
+ "name": "githubInstallationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubPrivateKey": {
+ "name": "githubPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubWebhookSecret": {
+ "name": "githubWebhookSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "github_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "github",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitlab": {
+ "name": "gitlab",
+ "schema": "",
+ "columns": {
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "gitlabUrl": {
+ "name": "gitlabUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitlab.com'"
+ },
+ "gitlabInternalUrl": {
+ "name": "gitlabInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitlab",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mariadb": {
+ "name": "mariadb",
+ "schema": "",
+ "columns": {
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mariadb_environmentId_environment_environmentId_fk": {
+ "name": "mariadb_environmentId_environment_environmentId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mariadb_serverId_server_serverId_fk": {
+ "name": "mariadb_serverId_server_serverId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mariadb_appName_unique": {
+ "name": "mariadb_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mongo": {
+ "name": "mongo",
+ "schema": "",
+ "columns": {
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicaSets": {
+ "name": "replicaSets",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mongo_environmentId_environment_environmentId_fk": {
+ "name": "mongo_environmentId_environment_environmentId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mongo_serverId_server_serverId_fk": {
+ "name": "mongo_serverId_server_serverId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mongo_appName_unique": {
+ "name": "mongo_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mount": {
+ "name": "mount",
+ "schema": "",
+ "columns": {
+ "mountId": {
+ "name": "mountId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "mountType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "mountPath": {
+ "name": "mountPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mount_applicationId_application_applicationId_fk": {
+ "name": "mount_applicationId_application_applicationId_fk",
+ "tableFrom": "mount",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_postgresId_postgres_postgresId_fk": {
+ "name": "mount_postgresId_postgres_postgresId_fk",
+ "tableFrom": "mount",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mariadbId_mariadb_mariadbId_fk": {
+ "name": "mount_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mongoId_mongo_mongoId_fk": {
+ "name": "mount_mongoId_mongo_mongoId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mysqlId_mysql_mysqlId_fk": {
+ "name": "mount_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_redisId_redis_redisId_fk": {
+ "name": "mount_redisId_redis_redisId_fk",
+ "tableFrom": "mount",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_composeId_compose_composeId_fk": {
+ "name": "mount_composeId_compose_composeId_fk",
+ "tableFrom": "mount",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mysql": {
+ "name": "mysql",
+ "schema": "",
+ "columns": {
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mysql_environmentId_environment_environmentId_fk": {
+ "name": "mysql_environmentId_environment_environmentId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mysql_serverId_server_serverId_fk": {
+ "name": "mysql_serverId_server_serverId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mysql_appName_unique": {
+ "name": "mysql_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.custom": {
+ "name": "custom",
+ "schema": "",
+ "columns": {
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "headers": {
+ "name": "headers",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.discord": {
+ "name": "discord",
+ "schema": "",
+ "columns": {
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.email": {
+ "name": "email",
+ "schema": "",
+ "columns": {
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "smtpServer": {
+ "name": "smtpServer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "smtpPort": {
+ "name": "smtpPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gotify": {
+ "name": "gotify",
+ "schema": "",
+ "columns": {
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appToken": {
+ "name": "appToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.lark": {
+ "name": "lark",
+ "schema": "",
+ "columns": {
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "notificationId": {
+ "name": "notificationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appDeploy": {
+ "name": "appDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "appBuildError": {
+ "name": "appBuildError",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "databaseBackup": {
+ "name": "databaseBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "volumeBackup": {
+ "name": "volumeBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dokployRestart": {
+ "name": "dokployRestart",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerCleanup": {
+ "name": "dockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "serverThreshold": {
+ "name": "serverThreshold",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "notificationType": {
+ "name": "notificationType",
+ "type": "notificationType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_slackId_slack_slackId_fk": {
+ "name": "notification_slackId_slack_slackId_fk",
+ "tableFrom": "notification",
+ "tableTo": "slack",
+ "columnsFrom": [
+ "slackId"
+ ],
+ "columnsTo": [
+ "slackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_telegramId_telegram_telegramId_fk": {
+ "name": "notification_telegramId_telegram_telegramId_fk",
+ "tableFrom": "notification",
+ "tableTo": "telegram",
+ "columnsFrom": [
+ "telegramId"
+ ],
+ "columnsTo": [
+ "telegramId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_discordId_discord_discordId_fk": {
+ "name": "notification_discordId_discord_discordId_fk",
+ "tableFrom": "notification",
+ "tableTo": "discord",
+ "columnsFrom": [
+ "discordId"
+ ],
+ "columnsTo": [
+ "discordId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_emailId_email_emailId_fk": {
+ "name": "notification_emailId_email_emailId_fk",
+ "tableFrom": "notification",
+ "tableTo": "email",
+ "columnsFrom": [
+ "emailId"
+ ],
+ "columnsTo": [
+ "emailId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_resendId_resend_resendId_fk": {
+ "name": "notification_resendId_resend_resendId_fk",
+ "tableFrom": "notification",
+ "tableTo": "resend",
+ "columnsFrom": [
+ "resendId"
+ ],
+ "columnsTo": [
+ "resendId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_gotifyId_gotify_gotifyId_fk": {
+ "name": "notification_gotifyId_gotify_gotifyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "gotify",
+ "columnsFrom": [
+ "gotifyId"
+ ],
+ "columnsTo": [
+ "gotifyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_ntfyId_ntfy_ntfyId_fk": {
+ "name": "notification_ntfyId_ntfy_ntfyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "ntfy",
+ "columnsFrom": [
+ "ntfyId"
+ ],
+ "columnsTo": [
+ "ntfyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_customId_custom_customId_fk": {
+ "name": "notification_customId_custom_customId_fk",
+ "tableFrom": "notification",
+ "tableTo": "custom",
+ "columnsFrom": [
+ "customId"
+ ],
+ "columnsTo": [
+ "customId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_larkId_lark_larkId_fk": {
+ "name": "notification_larkId_lark_larkId_fk",
+ "tableFrom": "notification",
+ "tableTo": "lark",
+ "columnsFrom": [
+ "larkId"
+ ],
+ "columnsTo": [
+ "larkId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_pushoverId_pushover_pushoverId_fk": {
+ "name": "notification_pushoverId_pushover_pushoverId_fk",
+ "tableFrom": "notification",
+ "tableTo": "pushover",
+ "columnsFrom": [
+ "pushoverId"
+ ],
+ "columnsTo": [
+ "pushoverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_teamsId_teams_teamsId_fk": {
+ "name": "notification_teamsId_teams_teamsId_fk",
+ "tableFrom": "notification",
+ "tableTo": "teams",
+ "columnsFrom": [
+ "teamsId"
+ ],
+ "columnsTo": [
+ "teamsId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_organizationId_organization_id_fk": {
+ "name": "notification_organizationId_organization_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ntfy": {
+ "name": "ntfy",
+ "schema": "",
+ "columns": {
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topic": {
+ "name": "topic",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "accessToken": {
+ "name": "accessToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 3
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pushover": {
+ "name": "pushover",
+ "schema": "",
+ "columns": {
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userKey": {
+ "name": "userKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "retry": {
+ "name": "retry",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expire": {
+ "name": "expire",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.resend": {
+ "name": "resend",
+ "schema": "",
+ "columns": {
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.slack": {
+ "name": "slack",
+ "schema": "",
+ "columns": {
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.teams": {
+ "name": "teams",
+ "schema": "",
+ "columns": {
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.telegram": {
+ "name": "telegram",
+ "schema": "",
+ "columns": {
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "botToken": {
+ "name": "botToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "chatId": {
+ "name": "chatId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.patch": {
+ "name": "patch",
+ "schema": "",
+ "columns": {
+ "patchId": {
+ "name": "patchId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "patchType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'update'"
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "patch_applicationId_application_applicationId_fk": {
+ "name": "patch_applicationId_application_applicationId_fk",
+ "tableFrom": "patch",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "patch_composeId_compose_composeId_fk": {
+ "name": "patch_composeId_compose_composeId_fk",
+ "tableFrom": "patch",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "patch_filepath_application_unique": {
+ "name": "patch_filepath_application_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "applicationId"
+ ]
+ },
+ "patch_filepath_compose_unique": {
+ "name": "patch_filepath_compose_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "composeId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.port": {
+ "name": "port",
+ "schema": "",
+ "columns": {
+ "portId": {
+ "name": "portId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "publishedPort": {
+ "name": "publishedPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "publishMode": {
+ "name": "publishMode",
+ "type": "publishModeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'host'"
+ },
+ "targetPort": {
+ "name": "targetPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "protocolType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "port_applicationId_application_applicationId_fk": {
+ "name": "port_applicationId_application_applicationId_fk",
+ "tableFrom": "port",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.postgres": {
+ "name": "postgres",
+ "schema": "",
+ "columns": {
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "postgres_environmentId_environment_environmentId_fk": {
+ "name": "postgres_environmentId_environment_environmentId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "postgres_serverId_server_serverId_fk": {
+ "name": "postgres_serverId_server_serverId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "postgres_appName_unique": {
+ "name": "postgres_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preview_deployments": {
+ "name": "preview_deployments",
+ "schema": "",
+ "columns": {
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestId": {
+ "name": "pullRequestId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestNumber": {
+ "name": "pullRequestNumber",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestURL": {
+ "name": "pullRequestURL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestTitle": {
+ "name": "pullRequestTitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestCommentId": {
+ "name": "pullRequestCommentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previewStatus": {
+ "name": "previewStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preview_deployments_applicationId_application_applicationId_fk": {
+ "name": "preview_deployments_applicationId_application_applicationId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "preview_deployments_domainId_domain_domainId_fk": {
+ "name": "preview_deployments_domainId_domain_domainId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "domain",
+ "columnsFrom": [
+ "domainId"
+ ],
+ "columnsTo": [
+ "domainId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "preview_deployments_appName_unique": {
+ "name": "preview_deployments_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_organizationId_organization_id_fk": {
+ "name": "project_organizationId_organization_id_fk",
+ "tableFrom": "project",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redirect": {
+ "name": "redirect",
+ "schema": "",
+ "columns": {
+ "redirectId": {
+ "name": "redirectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "regex": {
+ "name": "regex",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "replacement": {
+ "name": "replacement",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permanent": {
+ "name": "permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redirect_applicationId_application_applicationId_fk": {
+ "name": "redirect_applicationId_application_applicationId_fk",
+ "tableFrom": "redirect",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redis": {
+ "name": "redis",
+ "schema": "",
+ "columns": {
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redis_environmentId_environment_environmentId_fk": {
+ "name": "redis_environmentId_environment_environmentId_fk",
+ "tableFrom": "redis",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "redis_serverId_server_serverId_fk": {
+ "name": "redis_serverId_server_serverId_fk",
+ "tableFrom": "redis",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "redis_appName_unique": {
+ "name": "redis_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.registry": {
+ "name": "registry",
+ "schema": "",
+ "columns": {
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "registryName": {
+ "name": "registryName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "imagePrefix": {
+ "name": "imagePrefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selfHosted": {
+ "name": "selfHosted",
+ "type": "RegistryType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'cloud'"
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "registry_organizationId_organization_id_fk": {
+ "name": "registry_organizationId_organization_id_fk",
+ "tableFrom": "registry",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_id_fk": {
+ "name": "schedule_userId_user_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security": {
+ "name": "security",
+ "schema": "",
+ "columns": {
+ "securityId": {
+ "name": "securityId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "security_applicationId_application_applicationId_fk": {
+ "name": "security_applicationId_application_applicationId_fk",
+ "tableFrom": "security",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "security_username_applicationId_unique": {
+ "name": "security_username_applicationId_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "username",
+ "applicationId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.server": {
+ "name": "server",
+ "schema": "",
+ "columns": {
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ipAddress": {
+ "name": "ipAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'root'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverStatus": {
+ "name": "serverStatus",
+ "type": "serverStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "serverType": {
+ "name": "serverType",
+ "type": "serverType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'deploy'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "server_organizationId_organization_id_fk": {
+ "name": "server_organizationId_organization_id_fk",
+ "tableFrom": "server",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "server_sshKeyId_ssh-key_sshKeyId_fk": {
+ "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "server",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "sshKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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
+ },
+ "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
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.ssh-key": {
+ "name": "ssh-key",
+ "schema": "",
+ "columns": {
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "publicKey": {
+ "name": "publicKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lastUsedAt": {
+ "name": "lastUsedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh-key_organizationId_organization_id_fk": {
+ "name": "ssh-key_organizationId_organization_id_fk",
+ "tableFrom": "ssh-key",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_provider": {
+ "name": "sso_provider",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_config": {
+ "name": "oidc_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "saml_config": {
+ "name": "saml_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sso_provider_user_id_user_id_fk": {
+ "name": "sso_provider_user_id_user_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "sso_provider_organization_id_organization_id_fk": {
+ "name": "sso_provider_organization_id_organization_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "sso_provider_provider_id_unique": {
+ "name": "sso_provider_provider_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "provider_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "firstName": {
+ "name": "firstName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "lastName": {
+ "name": "lastName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "two_factor_enabled": {
+ "name": "two_factor_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableEnterpriseFeatures": {
+ "name": "enableEnterpriseFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "licenseKey": {
+ "name": "licenseKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isValidEnterpriseLicense": {
+ "name": "isValidEnterpriseLicense",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "trustedOrigins": {
+ "name": "trustedOrigins",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_email_unique": {
+ "name": "user_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webServerSettings": {
+ "name": "webServerSettings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "raw"
+ ]
+ },
+ "public.deploymentStatus": {
+ "name": "deploymentStatus",
+ "schema": "public",
+ "values": [
+ "running",
+ "done",
+ "error",
+ "cancelled"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.gitProviderType": {
+ "name": "gitProviderType",
+ "schema": "public",
+ "values": [
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea"
+ ]
+ },
+ "public.mountType": {
+ "name": "mountType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "public.serviceType": {
+ "name": "serviceType",
+ "schema": "public",
+ "values": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "public.notificationType": {
+ "name": "notificationType",
+ "schema": "public",
+ "values": [
+ "slack",
+ "telegram",
+ "discord",
+ "email",
+ "resend",
+ "gotify",
+ "ntfy",
+ "pushover",
+ "custom",
+ "lark",
+ "teams"
+ ]
+ },
+ "public.patchType": {
+ "name": "patchType",
+ "schema": "public",
+ "values": [
+ "create",
+ "update",
+ "delete"
+ ]
+ },
+ "public.protocolType": {
+ "name": "protocolType",
+ "schema": "public",
+ "values": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "public.publishModeType": {
+ "name": "publishModeType",
+ "schema": "public",
+ "values": [
+ "ingress",
+ "host"
+ ]
+ },
+ "public.RegistryType": {
+ "name": "RegistryType",
+ "schema": "public",
+ "values": [
+ "selfHosted",
+ "cloud"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.serverType": {
+ "name": "serverType",
+ "schema": "public",
+ "values": [
+ "deploy",
+ "build"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0148_snapshot.json b/apps/dokploy/drizzle/meta/0148_snapshot.json
new file mode 100644
index 000000000..f2a8bfcca
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0148_snapshot.json
@@ -0,0 +1,7467 @@
+{
+ "id": "a293a443-ceaf-418e-8e34-ff46e183995f",
+ "prevId": "2e0aba0b-93fc-4bfe-a975-1c5d45354753",
+ "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
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": true
+ },
+ "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
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": {},
+ "foreignKeys": {
+ "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.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "invitation_organization_id_organization_id_fk": {
+ "name": "invitation_organization_id_organization_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_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.member": {
+ "name": "member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteEnvironments": {
+ "name": "canDeleteEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateEnvironments": {
+ "name": "canCreateEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accessedEnvironments": {
+ "name": "accessedEnvironments",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "member_organization_id_organization_id_fk": {
+ "name": "member_organization_id_organization_id_fk",
+ "tableFrom": "member",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "member_user_id_user_id_fk": {
+ "name": "member_user_id_user_id_fk",
+ "tableFrom": "member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization": {
+ "name": "organization",
+ "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": false
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_id": {
+ "name": "owner_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "organization_owner_id_user_id_fk": {
+ "name": "organization_owner_id_user_id_fk",
+ "tableFrom": "organization",
+ "tableTo": "user",
+ "columnsFrom": [
+ "owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "organization_slug_unique": {
+ "name": "organization_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.two_factor": {
+ "name": "two_factor",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "backup_codes": {
+ "name": "backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "two_factor_user_id_user_id_fk": {
+ "name": "two_factor_user_id_user_id_fk",
+ "tableFrom": "two_factor",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.application": {
+ "name": "application",
+ "schema": "",
+ "columns": {
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewEnv": {
+ "name": "previewEnv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildArgs": {
+ "name": "previewBuildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildSecrets": {
+ "name": "previewBuildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLabels": {
+ "name": "previewLabels",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewWildcard": {
+ "name": "previewWildcard",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewPort": {
+ "name": "previewPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "previewHttps": {
+ "name": "previewHttps",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "previewPath": {
+ "name": "previewPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewRequireCollaboratorPermissions": {
+ "name": "previewRequireCollaboratorPermissions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "buildArgs": {
+ "name": "buildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildSecrets": {
+ "name": "buildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildPath": {
+ "name": "buildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBuildPath": {
+ "name": "gitlabBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBuildPath": {
+ "name": "bitbucketBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBuildPath": {
+ "name": "customGitBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerfile": {
+ "name": "dockerfile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Dockerfile'"
+ },
+ "dockerContextPath": {
+ "name": "dockerContextPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerBuildStage": {
+ "name": "dockerBuildStage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dropBuildPath": {
+ "name": "dropBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "buildType": {
+ "name": "buildType",
+ "type": "buildType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'nixpacks'"
+ },
+ "railpackVersion": {
+ "name": "railpackVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0.15.4'"
+ },
+ "herokuVersion": {
+ "name": "herokuVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'24'"
+ },
+ "publishDirectory": {
+ "name": "publishDirectory",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createEnvFile": {
+ "name": "createEnvFile",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackRegistryId": {
+ "name": "rollbackRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildRegistryId": {
+ "name": "buildRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "application",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_registryId_registry_registryId_fk": {
+ "name": "application_registryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "registryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_rollbackRegistryId_registry_registryId_fk": {
+ "name": "application_rollbackRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "rollbackRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_environmentId_environment_environmentId_fk": {
+ "name": "application_environmentId_environment_environmentId_fk",
+ "tableFrom": "application",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_githubId_github_githubId_fk": {
+ "name": "application_githubId_github_githubId_fk",
+ "tableFrom": "application",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_gitlabId_gitlab_gitlabId_fk": {
+ "name": "application_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "application",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_serverId_server_serverId_fk": {
+ "name": "application_serverId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_buildServerId_server_serverId_fk": {
+ "name": "application_buildServerId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_buildRegistryId_registry_registryId_fk": {
+ "name": "application_buildRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "buildRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "application_appName_unique": {
+ "name": "application_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.backup": {
+ "name": "backup",
+ "schema": "",
+ "columns": {
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "database": {
+ "name": "database",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "backup_destinationId_destination_destinationId_fk": {
+ "name": "backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_postgresId_postgres_postgresId_fk": {
+ "name": "backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mongoId_mongo_mongoId_fk": {
+ "name": "backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_userId_user_id_fk": {
+ "name": "backup_userId_user_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bitbucket": {
+ "name": "bitbucket",
+ "schema": "",
+ "columns": {
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bitbucketUsername": {
+ "name": "bitbucketUsername",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketEmail": {
+ "name": "bitbucketEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "appPassword": {
+ "name": "appPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketWorkspaceName": {
+ "name": "bitbucketWorkspaceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "bitbucket",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.certificate": {
+ "name": "certificate",
+ "schema": "",
+ "columns": {
+ "certificateId": {
+ "name": "certificateId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificateData": {
+ "name": "certificateData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificatePath": {
+ "name": "certificatePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "autoRenew": {
+ "name": "autoRenew",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "certificate_organizationId_organization_id_fk": {
+ "name": "certificate_organizationId_organization_id_fk",
+ "tableFrom": "certificate",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "certificate_serverId_server_serverId_fk": {
+ "name": "certificate_serverId_server_serverId_fk",
+ "tableFrom": "certificate",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "certificate_certificatePath_unique": {
+ "name": "certificate_certificatePath_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "certificatePath"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.compose": {
+ "name": "compose",
+ "schema": "",
+ "columns": {
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeFile": {
+ "name": "composeFile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceTypeCompose",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "composeType": {
+ "name": "composeType",
+ "type": "composeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'docker-compose'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "composePath": {
+ "name": "composePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'./docker-compose.yml'"
+ },
+ "suffix": {
+ "name": "suffix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "randomize": {
+ "name": "randomize",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeployment": {
+ "name": "isolatedDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeploymentsVolume": {
+ "name": "isolatedDeploymentsVolume",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "composeStatus": {
+ "name": "composeStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "compose",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_environmentId_environment_environmentId_fk": {
+ "name": "compose_environmentId_environment_environmentId_fk",
+ "tableFrom": "compose",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "compose_githubId_github_githubId_fk": {
+ "name": "compose_githubId_github_githubId_fk",
+ "tableFrom": "compose",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_gitlabId_gitlab_gitlabId_fk": {
+ "name": "compose_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "compose",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_serverId_server_serverId_fk": {
+ "name": "compose_serverId_server_serverId_fk",
+ "tableFrom": "compose",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.deployment": {
+ "name": "deployment",
+ "schema": "",
+ "columns": {
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "deploymentStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'running'"
+ },
+ "logPath": {
+ "name": "logPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isPreviewDeployment": {
+ "name": "isPreviewDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "deployment_applicationId_application_applicationId_fk": {
+ "name": "deployment_applicationId_application_applicationId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_composeId_compose_composeId_fk": {
+ "name": "deployment_composeId_compose_composeId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_serverId_server_serverId_fk": {
+ "name": "deployment_serverId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
+ "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "volume_backup",
+ "columnsFrom": [
+ "volumeBackupId"
+ ],
+ "columnsTo": [
+ "volumeBackupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_buildServerId_server_serverId_fk": {
+ "name": "deployment_buildServerId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.destination": {
+ "name": "destination",
+ "schema": "",
+ "columns": {
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessKey": {
+ "name": "accessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secretAccessKey": {
+ "name": "secretAccessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bucket": {
+ "name": "bucket",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region": {
+ "name": "region",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "destination_organizationId_organization_id_fk": {
+ "name": "destination_organizationId_organization_id_fk",
+ "tableFrom": "destination",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.domain": {
+ "name": "domain",
+ "schema": "",
+ "columns": {
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domainType": {
+ "name": "domainType",
+ "type": "domainType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'application'"
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "domain_composeId_compose_composeId_fk": {
+ "name": "domain_composeId_compose_composeId_fk",
+ "tableFrom": "domain",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_applicationId_application_applicationId_fk": {
+ "name": "domain_applicationId_application_applicationId_fk",
+ "tableFrom": "domain",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "domain",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.environment": {
+ "name": "environment",
+ "schema": "",
+ "columns": {
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isDefault": {
+ "name": "isDefault",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "environment_projectId_project_projectId_fk": {
+ "name": "environment_projectId_project_projectId_fk",
+ "tableFrom": "environment",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.git_provider": {
+ "name": "git_provider",
+ "schema": "",
+ "columns": {
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerType": {
+ "name": "providerType",
+ "type": "gitProviderType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "git_provider_organizationId_organization_id_fk": {
+ "name": "git_provider_organizationId_organization_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "git_provider_userId_user_id_fk": {
+ "name": "git_provider_userId_user_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "giteaInternalUrl": {
+ "name": "giteaInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github": {
+ "name": "github",
+ "schema": "",
+ "columns": {
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "githubAppName": {
+ "name": "githubAppName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubAppId": {
+ "name": "githubAppId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientId": {
+ "name": "githubClientId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientSecret": {
+ "name": "githubClientSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubInstallationId": {
+ "name": "githubInstallationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubPrivateKey": {
+ "name": "githubPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubWebhookSecret": {
+ "name": "githubWebhookSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "github_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "github",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitlab": {
+ "name": "gitlab",
+ "schema": "",
+ "columns": {
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "gitlabUrl": {
+ "name": "gitlabUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitlab.com'"
+ },
+ "gitlabInternalUrl": {
+ "name": "gitlabInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitlab",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mariadb": {
+ "name": "mariadb",
+ "schema": "",
+ "columns": {
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mariadb_environmentId_environment_environmentId_fk": {
+ "name": "mariadb_environmentId_environment_environmentId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mariadb_serverId_server_serverId_fk": {
+ "name": "mariadb_serverId_server_serverId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mariadb_appName_unique": {
+ "name": "mariadb_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mongo": {
+ "name": "mongo",
+ "schema": "",
+ "columns": {
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicaSets": {
+ "name": "replicaSets",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mongo_environmentId_environment_environmentId_fk": {
+ "name": "mongo_environmentId_environment_environmentId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mongo_serverId_server_serverId_fk": {
+ "name": "mongo_serverId_server_serverId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mongo_appName_unique": {
+ "name": "mongo_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mount": {
+ "name": "mount",
+ "schema": "",
+ "columns": {
+ "mountId": {
+ "name": "mountId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "mountType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "mountPath": {
+ "name": "mountPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mount_applicationId_application_applicationId_fk": {
+ "name": "mount_applicationId_application_applicationId_fk",
+ "tableFrom": "mount",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_postgresId_postgres_postgresId_fk": {
+ "name": "mount_postgresId_postgres_postgresId_fk",
+ "tableFrom": "mount",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mariadbId_mariadb_mariadbId_fk": {
+ "name": "mount_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mongoId_mongo_mongoId_fk": {
+ "name": "mount_mongoId_mongo_mongoId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mysqlId_mysql_mysqlId_fk": {
+ "name": "mount_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_redisId_redis_redisId_fk": {
+ "name": "mount_redisId_redis_redisId_fk",
+ "tableFrom": "mount",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_composeId_compose_composeId_fk": {
+ "name": "mount_composeId_compose_composeId_fk",
+ "tableFrom": "mount",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mysql": {
+ "name": "mysql",
+ "schema": "",
+ "columns": {
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mysql_environmentId_environment_environmentId_fk": {
+ "name": "mysql_environmentId_environment_environmentId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mysql_serverId_server_serverId_fk": {
+ "name": "mysql_serverId_server_serverId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mysql_appName_unique": {
+ "name": "mysql_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.custom": {
+ "name": "custom",
+ "schema": "",
+ "columns": {
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "headers": {
+ "name": "headers",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.discord": {
+ "name": "discord",
+ "schema": "",
+ "columns": {
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.email": {
+ "name": "email",
+ "schema": "",
+ "columns": {
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "smtpServer": {
+ "name": "smtpServer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "smtpPort": {
+ "name": "smtpPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gotify": {
+ "name": "gotify",
+ "schema": "",
+ "columns": {
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appToken": {
+ "name": "appToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.lark": {
+ "name": "lark",
+ "schema": "",
+ "columns": {
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "notificationId": {
+ "name": "notificationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appDeploy": {
+ "name": "appDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "appBuildError": {
+ "name": "appBuildError",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "databaseBackup": {
+ "name": "databaseBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "volumeBackup": {
+ "name": "volumeBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dokployRestart": {
+ "name": "dokployRestart",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerCleanup": {
+ "name": "dockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "serverThreshold": {
+ "name": "serverThreshold",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "notificationType": {
+ "name": "notificationType",
+ "type": "notificationType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_slackId_slack_slackId_fk": {
+ "name": "notification_slackId_slack_slackId_fk",
+ "tableFrom": "notification",
+ "tableTo": "slack",
+ "columnsFrom": [
+ "slackId"
+ ],
+ "columnsTo": [
+ "slackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_telegramId_telegram_telegramId_fk": {
+ "name": "notification_telegramId_telegram_telegramId_fk",
+ "tableFrom": "notification",
+ "tableTo": "telegram",
+ "columnsFrom": [
+ "telegramId"
+ ],
+ "columnsTo": [
+ "telegramId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_discordId_discord_discordId_fk": {
+ "name": "notification_discordId_discord_discordId_fk",
+ "tableFrom": "notification",
+ "tableTo": "discord",
+ "columnsFrom": [
+ "discordId"
+ ],
+ "columnsTo": [
+ "discordId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_emailId_email_emailId_fk": {
+ "name": "notification_emailId_email_emailId_fk",
+ "tableFrom": "notification",
+ "tableTo": "email",
+ "columnsFrom": [
+ "emailId"
+ ],
+ "columnsTo": [
+ "emailId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_resendId_resend_resendId_fk": {
+ "name": "notification_resendId_resend_resendId_fk",
+ "tableFrom": "notification",
+ "tableTo": "resend",
+ "columnsFrom": [
+ "resendId"
+ ],
+ "columnsTo": [
+ "resendId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_gotifyId_gotify_gotifyId_fk": {
+ "name": "notification_gotifyId_gotify_gotifyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "gotify",
+ "columnsFrom": [
+ "gotifyId"
+ ],
+ "columnsTo": [
+ "gotifyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_ntfyId_ntfy_ntfyId_fk": {
+ "name": "notification_ntfyId_ntfy_ntfyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "ntfy",
+ "columnsFrom": [
+ "ntfyId"
+ ],
+ "columnsTo": [
+ "ntfyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_customId_custom_customId_fk": {
+ "name": "notification_customId_custom_customId_fk",
+ "tableFrom": "notification",
+ "tableTo": "custom",
+ "columnsFrom": [
+ "customId"
+ ],
+ "columnsTo": [
+ "customId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_larkId_lark_larkId_fk": {
+ "name": "notification_larkId_lark_larkId_fk",
+ "tableFrom": "notification",
+ "tableTo": "lark",
+ "columnsFrom": [
+ "larkId"
+ ],
+ "columnsTo": [
+ "larkId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_pushoverId_pushover_pushoverId_fk": {
+ "name": "notification_pushoverId_pushover_pushoverId_fk",
+ "tableFrom": "notification",
+ "tableTo": "pushover",
+ "columnsFrom": [
+ "pushoverId"
+ ],
+ "columnsTo": [
+ "pushoverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_teamsId_teams_teamsId_fk": {
+ "name": "notification_teamsId_teams_teamsId_fk",
+ "tableFrom": "notification",
+ "tableTo": "teams",
+ "columnsFrom": [
+ "teamsId"
+ ],
+ "columnsTo": [
+ "teamsId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_organizationId_organization_id_fk": {
+ "name": "notification_organizationId_organization_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ntfy": {
+ "name": "ntfy",
+ "schema": "",
+ "columns": {
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topic": {
+ "name": "topic",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "accessToken": {
+ "name": "accessToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 3
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pushover": {
+ "name": "pushover",
+ "schema": "",
+ "columns": {
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userKey": {
+ "name": "userKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "retry": {
+ "name": "retry",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expire": {
+ "name": "expire",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.resend": {
+ "name": "resend",
+ "schema": "",
+ "columns": {
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.slack": {
+ "name": "slack",
+ "schema": "",
+ "columns": {
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.teams": {
+ "name": "teams",
+ "schema": "",
+ "columns": {
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.telegram": {
+ "name": "telegram",
+ "schema": "",
+ "columns": {
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "botToken": {
+ "name": "botToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "chatId": {
+ "name": "chatId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.patch": {
+ "name": "patch",
+ "schema": "",
+ "columns": {
+ "patchId": {
+ "name": "patchId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "patchType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'update'"
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "patch_applicationId_application_applicationId_fk": {
+ "name": "patch_applicationId_application_applicationId_fk",
+ "tableFrom": "patch",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "patch_composeId_compose_composeId_fk": {
+ "name": "patch_composeId_compose_composeId_fk",
+ "tableFrom": "patch",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "patch_filepath_application_unique": {
+ "name": "patch_filepath_application_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "applicationId"
+ ]
+ },
+ "patch_filepath_compose_unique": {
+ "name": "patch_filepath_compose_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "composeId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.port": {
+ "name": "port",
+ "schema": "",
+ "columns": {
+ "portId": {
+ "name": "portId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "publishedPort": {
+ "name": "publishedPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "publishMode": {
+ "name": "publishMode",
+ "type": "publishModeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'host'"
+ },
+ "targetPort": {
+ "name": "targetPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "protocolType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "port_applicationId_application_applicationId_fk": {
+ "name": "port_applicationId_application_applicationId_fk",
+ "tableFrom": "port",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.postgres": {
+ "name": "postgres",
+ "schema": "",
+ "columns": {
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "postgres_environmentId_environment_environmentId_fk": {
+ "name": "postgres_environmentId_environment_environmentId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "postgres_serverId_server_serverId_fk": {
+ "name": "postgres_serverId_server_serverId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "postgres_appName_unique": {
+ "name": "postgres_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preview_deployments": {
+ "name": "preview_deployments",
+ "schema": "",
+ "columns": {
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestId": {
+ "name": "pullRequestId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestNumber": {
+ "name": "pullRequestNumber",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestURL": {
+ "name": "pullRequestURL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestTitle": {
+ "name": "pullRequestTitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestCommentId": {
+ "name": "pullRequestCommentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previewStatus": {
+ "name": "previewStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preview_deployments_applicationId_application_applicationId_fk": {
+ "name": "preview_deployments_applicationId_application_applicationId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "preview_deployments_domainId_domain_domainId_fk": {
+ "name": "preview_deployments_domainId_domain_domainId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "domain",
+ "columnsFrom": [
+ "domainId"
+ ],
+ "columnsTo": [
+ "domainId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "preview_deployments_appName_unique": {
+ "name": "preview_deployments_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_organizationId_organization_id_fk": {
+ "name": "project_organizationId_organization_id_fk",
+ "tableFrom": "project",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redirect": {
+ "name": "redirect",
+ "schema": "",
+ "columns": {
+ "redirectId": {
+ "name": "redirectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "regex": {
+ "name": "regex",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "replacement": {
+ "name": "replacement",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permanent": {
+ "name": "permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redirect_applicationId_application_applicationId_fk": {
+ "name": "redirect_applicationId_application_applicationId_fk",
+ "tableFrom": "redirect",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redis": {
+ "name": "redis",
+ "schema": "",
+ "columns": {
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redis_environmentId_environment_environmentId_fk": {
+ "name": "redis_environmentId_environment_environmentId_fk",
+ "tableFrom": "redis",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "redis_serverId_server_serverId_fk": {
+ "name": "redis_serverId_server_serverId_fk",
+ "tableFrom": "redis",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "redis_appName_unique": {
+ "name": "redis_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.registry": {
+ "name": "registry",
+ "schema": "",
+ "columns": {
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "registryName": {
+ "name": "registryName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "imagePrefix": {
+ "name": "imagePrefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selfHosted": {
+ "name": "selfHosted",
+ "type": "RegistryType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'cloud'"
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "registry_organizationId_organization_id_fk": {
+ "name": "registry_organizationId_organization_id_fk",
+ "tableFrom": "registry",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_id_fk": {
+ "name": "schedule_userId_user_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security": {
+ "name": "security",
+ "schema": "",
+ "columns": {
+ "securityId": {
+ "name": "securityId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "security_applicationId_application_applicationId_fk": {
+ "name": "security_applicationId_application_applicationId_fk",
+ "tableFrom": "security",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "security_username_applicationId_unique": {
+ "name": "security_username_applicationId_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "username",
+ "applicationId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.server": {
+ "name": "server",
+ "schema": "",
+ "columns": {
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ipAddress": {
+ "name": "ipAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'root'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverStatus": {
+ "name": "serverStatus",
+ "type": "serverStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "serverType": {
+ "name": "serverType",
+ "type": "serverType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'deploy'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "server_organizationId_organization_id_fk": {
+ "name": "server_organizationId_organization_id_fk",
+ "tableFrom": "server",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "server_sshKeyId_ssh-key_sshKeyId_fk": {
+ "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "server",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "sshKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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
+ },
+ "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
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.ssh-key": {
+ "name": "ssh-key",
+ "schema": "",
+ "columns": {
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "publicKey": {
+ "name": "publicKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lastUsedAt": {
+ "name": "lastUsedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh-key_organizationId_organization_id_fk": {
+ "name": "ssh-key_organizationId_organization_id_fk",
+ "tableFrom": "ssh-key",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_provider": {
+ "name": "sso_provider",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_config": {
+ "name": "oidc_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "saml_config": {
+ "name": "saml_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sso_provider_user_id_user_id_fk": {
+ "name": "sso_provider_user_id_user_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "sso_provider_organization_id_organization_id_fk": {
+ "name": "sso_provider_organization_id_organization_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "sso_provider_provider_id_unique": {
+ "name": "sso_provider_provider_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "provider_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "firstName": {
+ "name": "firstName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "lastName": {
+ "name": "lastName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "two_factor_enabled": {
+ "name": "two_factor_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableEnterpriseFeatures": {
+ "name": "enableEnterpriseFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "licenseKey": {
+ "name": "licenseKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isValidEnterpriseLicense": {
+ "name": "isValidEnterpriseLicense",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "trustedOrigins": {
+ "name": "trustedOrigins",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_email_unique": {
+ "name": "user_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webServerSettings": {
+ "name": "webServerSettings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "whitelabelingConfig": {
+ "name": "whitelabelingConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{\"appName\":null,\"appDescription\":null,\"logoUrl\":null,\"faviconUrl\":null,\"customCss\":null,\"loginLogoUrl\":null,\"supportUrl\":null,\"docsUrl\":null,\"errorPageTitle\":null,\"errorPageDescription\":null,\"metaTitle\":null,\"footerText\":null}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "raw"
+ ]
+ },
+ "public.deploymentStatus": {
+ "name": "deploymentStatus",
+ "schema": "public",
+ "values": [
+ "running",
+ "done",
+ "error",
+ "cancelled"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.gitProviderType": {
+ "name": "gitProviderType",
+ "schema": "public",
+ "values": [
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea"
+ ]
+ },
+ "public.mountType": {
+ "name": "mountType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "public.serviceType": {
+ "name": "serviceType",
+ "schema": "public",
+ "values": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "public.notificationType": {
+ "name": "notificationType",
+ "schema": "public",
+ "values": [
+ "slack",
+ "telegram",
+ "discord",
+ "email",
+ "resend",
+ "gotify",
+ "ntfy",
+ "pushover",
+ "custom",
+ "lark",
+ "teams"
+ ]
+ },
+ "public.patchType": {
+ "name": "patchType",
+ "schema": "public",
+ "values": [
+ "create",
+ "update",
+ "delete"
+ ]
+ },
+ "public.protocolType": {
+ "name": "protocolType",
+ "schema": "public",
+ "values": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "public.publishModeType": {
+ "name": "publishModeType",
+ "schema": "public",
+ "values": [
+ "ingress",
+ "host"
+ ]
+ },
+ "public.RegistryType": {
+ "name": "RegistryType",
+ "schema": "public",
+ "values": [
+ "selfHosted",
+ "cloud"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.serverType": {
+ "name": "serverType",
+ "schema": "public",
+ "values": [
+ "deploy",
+ "build"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0149_snapshot.json b/apps/dokploy/drizzle/meta/0149_snapshot.json
new file mode 100644
index 000000000..643bb6faa
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0149_snapshot.json
@@ -0,0 +1,7715 @@
+{
+ "id": "e6eacbcd-0e09-4fa0-91be-730d3cc20d84",
+ "prevId": "a293a443-ceaf-418e-8e34-ff46e183995f",
+ "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
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": true
+ },
+ "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
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": {},
+ "foreignKeys": {
+ "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.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "invitation_organization_id_organization_id_fk": {
+ "name": "invitation_organization_id_organization_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_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.member": {
+ "name": "member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteEnvironments": {
+ "name": "canDeleteEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateEnvironments": {
+ "name": "canCreateEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accessedEnvironments": {
+ "name": "accessedEnvironments",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "member_organization_id_organization_id_fk": {
+ "name": "member_organization_id_organization_id_fk",
+ "tableFrom": "member",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "member_user_id_user_id_fk": {
+ "name": "member_user_id_user_id_fk",
+ "tableFrom": "member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization": {
+ "name": "organization",
+ "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": false
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_id": {
+ "name": "owner_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "organization_owner_id_user_id_fk": {
+ "name": "organization_owner_id_user_id_fk",
+ "tableFrom": "organization",
+ "tableTo": "user",
+ "columnsFrom": [
+ "owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "organization_slug_unique": {
+ "name": "organization_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization_role": {
+ "name": "organization_role",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission": {
+ "name": "permission",
+ "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": false
+ }
+ },
+ "indexes": {
+ "organizationRole_organizationId_idx": {
+ "name": "organizationRole_organizationId_idx",
+ "columns": [
+ {
+ "expression": "organization_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "organizationRole_role_idx": {
+ "name": "organizationRole_role_idx",
+ "columns": [
+ {
+ "expression": "role",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "organization_role_organization_id_organization_id_fk": {
+ "name": "organization_role_organization_id_organization_id_fk",
+ "tableFrom": "organization_role",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.two_factor": {
+ "name": "two_factor",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "backup_codes": {
+ "name": "backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "two_factor_user_id_user_id_fk": {
+ "name": "two_factor_user_id_user_id_fk",
+ "tableFrom": "two_factor",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_log": {
+ "name": "audit_log",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_email": {
+ "name": "user_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_role": {
+ "name": "user_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "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()"
+ }
+ },
+ "indexes": {
+ "auditLog_organizationId_idx": {
+ "name": "auditLog_organizationId_idx",
+ "columns": [
+ {
+ "expression": "organization_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "auditLog_userId_idx": {
+ "name": "auditLog_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "auditLog_createdAt_idx": {
+ "name": "auditLog_createdAt_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "audit_log_organization_id_organization_id_fk": {
+ "name": "audit_log_organization_id_organization_id_fk",
+ "tableFrom": "audit_log",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "audit_log_user_id_user_id_fk": {
+ "name": "audit_log_user_id_user_id_fk",
+ "tableFrom": "audit_log",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.application": {
+ "name": "application",
+ "schema": "",
+ "columns": {
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewEnv": {
+ "name": "previewEnv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildArgs": {
+ "name": "previewBuildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildSecrets": {
+ "name": "previewBuildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLabels": {
+ "name": "previewLabels",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewWildcard": {
+ "name": "previewWildcard",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewPort": {
+ "name": "previewPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "previewHttps": {
+ "name": "previewHttps",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "previewPath": {
+ "name": "previewPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewRequireCollaboratorPermissions": {
+ "name": "previewRequireCollaboratorPermissions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "buildArgs": {
+ "name": "buildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildSecrets": {
+ "name": "buildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildPath": {
+ "name": "buildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBuildPath": {
+ "name": "gitlabBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBuildPath": {
+ "name": "bitbucketBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBuildPath": {
+ "name": "customGitBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerfile": {
+ "name": "dockerfile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Dockerfile'"
+ },
+ "dockerContextPath": {
+ "name": "dockerContextPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerBuildStage": {
+ "name": "dockerBuildStage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dropBuildPath": {
+ "name": "dropBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "buildType": {
+ "name": "buildType",
+ "type": "buildType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'nixpacks'"
+ },
+ "railpackVersion": {
+ "name": "railpackVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0.15.4'"
+ },
+ "herokuVersion": {
+ "name": "herokuVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'24'"
+ },
+ "publishDirectory": {
+ "name": "publishDirectory",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createEnvFile": {
+ "name": "createEnvFile",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackRegistryId": {
+ "name": "rollbackRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildRegistryId": {
+ "name": "buildRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "application",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_registryId_registry_registryId_fk": {
+ "name": "application_registryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "registryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_rollbackRegistryId_registry_registryId_fk": {
+ "name": "application_rollbackRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "rollbackRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_environmentId_environment_environmentId_fk": {
+ "name": "application_environmentId_environment_environmentId_fk",
+ "tableFrom": "application",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_githubId_github_githubId_fk": {
+ "name": "application_githubId_github_githubId_fk",
+ "tableFrom": "application",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_gitlabId_gitlab_gitlabId_fk": {
+ "name": "application_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "application",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_serverId_server_serverId_fk": {
+ "name": "application_serverId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_buildServerId_server_serverId_fk": {
+ "name": "application_buildServerId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_buildRegistryId_registry_registryId_fk": {
+ "name": "application_buildRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "buildRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "application_appName_unique": {
+ "name": "application_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.backup": {
+ "name": "backup",
+ "schema": "",
+ "columns": {
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "database": {
+ "name": "database",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "backup_destinationId_destination_destinationId_fk": {
+ "name": "backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_postgresId_postgres_postgresId_fk": {
+ "name": "backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mongoId_mongo_mongoId_fk": {
+ "name": "backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_userId_user_id_fk": {
+ "name": "backup_userId_user_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bitbucket": {
+ "name": "bitbucket",
+ "schema": "",
+ "columns": {
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bitbucketUsername": {
+ "name": "bitbucketUsername",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketEmail": {
+ "name": "bitbucketEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "appPassword": {
+ "name": "appPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketWorkspaceName": {
+ "name": "bitbucketWorkspaceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "bitbucket",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.certificate": {
+ "name": "certificate",
+ "schema": "",
+ "columns": {
+ "certificateId": {
+ "name": "certificateId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificateData": {
+ "name": "certificateData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificatePath": {
+ "name": "certificatePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "autoRenew": {
+ "name": "autoRenew",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "certificate_organizationId_organization_id_fk": {
+ "name": "certificate_organizationId_organization_id_fk",
+ "tableFrom": "certificate",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "certificate_serverId_server_serverId_fk": {
+ "name": "certificate_serverId_server_serverId_fk",
+ "tableFrom": "certificate",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "certificate_certificatePath_unique": {
+ "name": "certificate_certificatePath_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "certificatePath"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.compose": {
+ "name": "compose",
+ "schema": "",
+ "columns": {
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeFile": {
+ "name": "composeFile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceTypeCompose",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "composeType": {
+ "name": "composeType",
+ "type": "composeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'docker-compose'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "composePath": {
+ "name": "composePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'./docker-compose.yml'"
+ },
+ "suffix": {
+ "name": "suffix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "randomize": {
+ "name": "randomize",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeployment": {
+ "name": "isolatedDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeploymentsVolume": {
+ "name": "isolatedDeploymentsVolume",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "composeStatus": {
+ "name": "composeStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "compose",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_environmentId_environment_environmentId_fk": {
+ "name": "compose_environmentId_environment_environmentId_fk",
+ "tableFrom": "compose",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "compose_githubId_github_githubId_fk": {
+ "name": "compose_githubId_github_githubId_fk",
+ "tableFrom": "compose",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_gitlabId_gitlab_gitlabId_fk": {
+ "name": "compose_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "compose",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_serverId_server_serverId_fk": {
+ "name": "compose_serverId_server_serverId_fk",
+ "tableFrom": "compose",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.deployment": {
+ "name": "deployment",
+ "schema": "",
+ "columns": {
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "deploymentStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'running'"
+ },
+ "logPath": {
+ "name": "logPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isPreviewDeployment": {
+ "name": "isPreviewDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "deployment_applicationId_application_applicationId_fk": {
+ "name": "deployment_applicationId_application_applicationId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_composeId_compose_composeId_fk": {
+ "name": "deployment_composeId_compose_composeId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_serverId_server_serverId_fk": {
+ "name": "deployment_serverId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
+ "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "volume_backup",
+ "columnsFrom": [
+ "volumeBackupId"
+ ],
+ "columnsTo": [
+ "volumeBackupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_buildServerId_server_serverId_fk": {
+ "name": "deployment_buildServerId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.destination": {
+ "name": "destination",
+ "schema": "",
+ "columns": {
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessKey": {
+ "name": "accessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secretAccessKey": {
+ "name": "secretAccessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bucket": {
+ "name": "bucket",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region": {
+ "name": "region",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "destination_organizationId_organization_id_fk": {
+ "name": "destination_organizationId_organization_id_fk",
+ "tableFrom": "destination",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.domain": {
+ "name": "domain",
+ "schema": "",
+ "columns": {
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domainType": {
+ "name": "domainType",
+ "type": "domainType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'application'"
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "domain_composeId_compose_composeId_fk": {
+ "name": "domain_composeId_compose_composeId_fk",
+ "tableFrom": "domain",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_applicationId_application_applicationId_fk": {
+ "name": "domain_applicationId_application_applicationId_fk",
+ "tableFrom": "domain",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "domain",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.environment": {
+ "name": "environment",
+ "schema": "",
+ "columns": {
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isDefault": {
+ "name": "isDefault",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "environment_projectId_project_projectId_fk": {
+ "name": "environment_projectId_project_projectId_fk",
+ "tableFrom": "environment",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.git_provider": {
+ "name": "git_provider",
+ "schema": "",
+ "columns": {
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerType": {
+ "name": "providerType",
+ "type": "gitProviderType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "git_provider_organizationId_organization_id_fk": {
+ "name": "git_provider_organizationId_organization_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "git_provider_userId_user_id_fk": {
+ "name": "git_provider_userId_user_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "giteaInternalUrl": {
+ "name": "giteaInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github": {
+ "name": "github",
+ "schema": "",
+ "columns": {
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "githubAppName": {
+ "name": "githubAppName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubAppId": {
+ "name": "githubAppId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientId": {
+ "name": "githubClientId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientSecret": {
+ "name": "githubClientSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubInstallationId": {
+ "name": "githubInstallationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubPrivateKey": {
+ "name": "githubPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubWebhookSecret": {
+ "name": "githubWebhookSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "github_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "github",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitlab": {
+ "name": "gitlab",
+ "schema": "",
+ "columns": {
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "gitlabUrl": {
+ "name": "gitlabUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitlab.com'"
+ },
+ "gitlabInternalUrl": {
+ "name": "gitlabInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitlab",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mariadb": {
+ "name": "mariadb",
+ "schema": "",
+ "columns": {
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mariadb_environmentId_environment_environmentId_fk": {
+ "name": "mariadb_environmentId_environment_environmentId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mariadb_serverId_server_serverId_fk": {
+ "name": "mariadb_serverId_server_serverId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mariadb_appName_unique": {
+ "name": "mariadb_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mongo": {
+ "name": "mongo",
+ "schema": "",
+ "columns": {
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicaSets": {
+ "name": "replicaSets",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mongo_environmentId_environment_environmentId_fk": {
+ "name": "mongo_environmentId_environment_environmentId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mongo_serverId_server_serverId_fk": {
+ "name": "mongo_serverId_server_serverId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mongo_appName_unique": {
+ "name": "mongo_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mount": {
+ "name": "mount",
+ "schema": "",
+ "columns": {
+ "mountId": {
+ "name": "mountId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "mountType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "mountPath": {
+ "name": "mountPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mount_applicationId_application_applicationId_fk": {
+ "name": "mount_applicationId_application_applicationId_fk",
+ "tableFrom": "mount",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_postgresId_postgres_postgresId_fk": {
+ "name": "mount_postgresId_postgres_postgresId_fk",
+ "tableFrom": "mount",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mariadbId_mariadb_mariadbId_fk": {
+ "name": "mount_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mongoId_mongo_mongoId_fk": {
+ "name": "mount_mongoId_mongo_mongoId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mysqlId_mysql_mysqlId_fk": {
+ "name": "mount_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_redisId_redis_redisId_fk": {
+ "name": "mount_redisId_redis_redisId_fk",
+ "tableFrom": "mount",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_composeId_compose_composeId_fk": {
+ "name": "mount_composeId_compose_composeId_fk",
+ "tableFrom": "mount",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mysql": {
+ "name": "mysql",
+ "schema": "",
+ "columns": {
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mysql_environmentId_environment_environmentId_fk": {
+ "name": "mysql_environmentId_environment_environmentId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mysql_serverId_server_serverId_fk": {
+ "name": "mysql_serverId_server_serverId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mysql_appName_unique": {
+ "name": "mysql_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.custom": {
+ "name": "custom",
+ "schema": "",
+ "columns": {
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "headers": {
+ "name": "headers",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.discord": {
+ "name": "discord",
+ "schema": "",
+ "columns": {
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.email": {
+ "name": "email",
+ "schema": "",
+ "columns": {
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "smtpServer": {
+ "name": "smtpServer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "smtpPort": {
+ "name": "smtpPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gotify": {
+ "name": "gotify",
+ "schema": "",
+ "columns": {
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appToken": {
+ "name": "appToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.lark": {
+ "name": "lark",
+ "schema": "",
+ "columns": {
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "notificationId": {
+ "name": "notificationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appDeploy": {
+ "name": "appDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "appBuildError": {
+ "name": "appBuildError",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "databaseBackup": {
+ "name": "databaseBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "volumeBackup": {
+ "name": "volumeBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dokployRestart": {
+ "name": "dokployRestart",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerCleanup": {
+ "name": "dockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "serverThreshold": {
+ "name": "serverThreshold",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "notificationType": {
+ "name": "notificationType",
+ "type": "notificationType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_slackId_slack_slackId_fk": {
+ "name": "notification_slackId_slack_slackId_fk",
+ "tableFrom": "notification",
+ "tableTo": "slack",
+ "columnsFrom": [
+ "slackId"
+ ],
+ "columnsTo": [
+ "slackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_telegramId_telegram_telegramId_fk": {
+ "name": "notification_telegramId_telegram_telegramId_fk",
+ "tableFrom": "notification",
+ "tableTo": "telegram",
+ "columnsFrom": [
+ "telegramId"
+ ],
+ "columnsTo": [
+ "telegramId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_discordId_discord_discordId_fk": {
+ "name": "notification_discordId_discord_discordId_fk",
+ "tableFrom": "notification",
+ "tableTo": "discord",
+ "columnsFrom": [
+ "discordId"
+ ],
+ "columnsTo": [
+ "discordId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_emailId_email_emailId_fk": {
+ "name": "notification_emailId_email_emailId_fk",
+ "tableFrom": "notification",
+ "tableTo": "email",
+ "columnsFrom": [
+ "emailId"
+ ],
+ "columnsTo": [
+ "emailId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_resendId_resend_resendId_fk": {
+ "name": "notification_resendId_resend_resendId_fk",
+ "tableFrom": "notification",
+ "tableTo": "resend",
+ "columnsFrom": [
+ "resendId"
+ ],
+ "columnsTo": [
+ "resendId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_gotifyId_gotify_gotifyId_fk": {
+ "name": "notification_gotifyId_gotify_gotifyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "gotify",
+ "columnsFrom": [
+ "gotifyId"
+ ],
+ "columnsTo": [
+ "gotifyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_ntfyId_ntfy_ntfyId_fk": {
+ "name": "notification_ntfyId_ntfy_ntfyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "ntfy",
+ "columnsFrom": [
+ "ntfyId"
+ ],
+ "columnsTo": [
+ "ntfyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_customId_custom_customId_fk": {
+ "name": "notification_customId_custom_customId_fk",
+ "tableFrom": "notification",
+ "tableTo": "custom",
+ "columnsFrom": [
+ "customId"
+ ],
+ "columnsTo": [
+ "customId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_larkId_lark_larkId_fk": {
+ "name": "notification_larkId_lark_larkId_fk",
+ "tableFrom": "notification",
+ "tableTo": "lark",
+ "columnsFrom": [
+ "larkId"
+ ],
+ "columnsTo": [
+ "larkId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_pushoverId_pushover_pushoverId_fk": {
+ "name": "notification_pushoverId_pushover_pushoverId_fk",
+ "tableFrom": "notification",
+ "tableTo": "pushover",
+ "columnsFrom": [
+ "pushoverId"
+ ],
+ "columnsTo": [
+ "pushoverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_teamsId_teams_teamsId_fk": {
+ "name": "notification_teamsId_teams_teamsId_fk",
+ "tableFrom": "notification",
+ "tableTo": "teams",
+ "columnsFrom": [
+ "teamsId"
+ ],
+ "columnsTo": [
+ "teamsId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_organizationId_organization_id_fk": {
+ "name": "notification_organizationId_organization_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ntfy": {
+ "name": "ntfy",
+ "schema": "",
+ "columns": {
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topic": {
+ "name": "topic",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "accessToken": {
+ "name": "accessToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 3
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pushover": {
+ "name": "pushover",
+ "schema": "",
+ "columns": {
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userKey": {
+ "name": "userKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "retry": {
+ "name": "retry",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expire": {
+ "name": "expire",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.resend": {
+ "name": "resend",
+ "schema": "",
+ "columns": {
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.slack": {
+ "name": "slack",
+ "schema": "",
+ "columns": {
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.teams": {
+ "name": "teams",
+ "schema": "",
+ "columns": {
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.telegram": {
+ "name": "telegram",
+ "schema": "",
+ "columns": {
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "botToken": {
+ "name": "botToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "chatId": {
+ "name": "chatId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.patch": {
+ "name": "patch",
+ "schema": "",
+ "columns": {
+ "patchId": {
+ "name": "patchId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "patchType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'update'"
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "patch_applicationId_application_applicationId_fk": {
+ "name": "patch_applicationId_application_applicationId_fk",
+ "tableFrom": "patch",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "patch_composeId_compose_composeId_fk": {
+ "name": "patch_composeId_compose_composeId_fk",
+ "tableFrom": "patch",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "patch_filepath_application_unique": {
+ "name": "patch_filepath_application_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "applicationId"
+ ]
+ },
+ "patch_filepath_compose_unique": {
+ "name": "patch_filepath_compose_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "composeId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.port": {
+ "name": "port",
+ "schema": "",
+ "columns": {
+ "portId": {
+ "name": "portId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "publishedPort": {
+ "name": "publishedPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "publishMode": {
+ "name": "publishMode",
+ "type": "publishModeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'host'"
+ },
+ "targetPort": {
+ "name": "targetPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "protocolType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "port_applicationId_application_applicationId_fk": {
+ "name": "port_applicationId_application_applicationId_fk",
+ "tableFrom": "port",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.postgres": {
+ "name": "postgres",
+ "schema": "",
+ "columns": {
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "postgres_environmentId_environment_environmentId_fk": {
+ "name": "postgres_environmentId_environment_environmentId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "postgres_serverId_server_serverId_fk": {
+ "name": "postgres_serverId_server_serverId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "postgres_appName_unique": {
+ "name": "postgres_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preview_deployments": {
+ "name": "preview_deployments",
+ "schema": "",
+ "columns": {
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestId": {
+ "name": "pullRequestId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestNumber": {
+ "name": "pullRequestNumber",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestURL": {
+ "name": "pullRequestURL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestTitle": {
+ "name": "pullRequestTitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestCommentId": {
+ "name": "pullRequestCommentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previewStatus": {
+ "name": "previewStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preview_deployments_applicationId_application_applicationId_fk": {
+ "name": "preview_deployments_applicationId_application_applicationId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "preview_deployments_domainId_domain_domainId_fk": {
+ "name": "preview_deployments_domainId_domain_domainId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "domain",
+ "columnsFrom": [
+ "domainId"
+ ],
+ "columnsTo": [
+ "domainId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "preview_deployments_appName_unique": {
+ "name": "preview_deployments_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_organizationId_organization_id_fk": {
+ "name": "project_organizationId_organization_id_fk",
+ "tableFrom": "project",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redirect": {
+ "name": "redirect",
+ "schema": "",
+ "columns": {
+ "redirectId": {
+ "name": "redirectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "regex": {
+ "name": "regex",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "replacement": {
+ "name": "replacement",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permanent": {
+ "name": "permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redirect_applicationId_application_applicationId_fk": {
+ "name": "redirect_applicationId_application_applicationId_fk",
+ "tableFrom": "redirect",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redis": {
+ "name": "redis",
+ "schema": "",
+ "columns": {
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redis_environmentId_environment_environmentId_fk": {
+ "name": "redis_environmentId_environment_environmentId_fk",
+ "tableFrom": "redis",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "redis_serverId_server_serverId_fk": {
+ "name": "redis_serverId_server_serverId_fk",
+ "tableFrom": "redis",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "redis_appName_unique": {
+ "name": "redis_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.registry": {
+ "name": "registry",
+ "schema": "",
+ "columns": {
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "registryName": {
+ "name": "registryName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "imagePrefix": {
+ "name": "imagePrefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selfHosted": {
+ "name": "selfHosted",
+ "type": "RegistryType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'cloud'"
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "registry_organizationId_organization_id_fk": {
+ "name": "registry_organizationId_organization_id_fk",
+ "tableFrom": "registry",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_id_fk": {
+ "name": "schedule_userId_user_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security": {
+ "name": "security",
+ "schema": "",
+ "columns": {
+ "securityId": {
+ "name": "securityId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "security_applicationId_application_applicationId_fk": {
+ "name": "security_applicationId_application_applicationId_fk",
+ "tableFrom": "security",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "security_username_applicationId_unique": {
+ "name": "security_username_applicationId_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "username",
+ "applicationId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.server": {
+ "name": "server",
+ "schema": "",
+ "columns": {
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ipAddress": {
+ "name": "ipAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'root'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverStatus": {
+ "name": "serverStatus",
+ "type": "serverStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "serverType": {
+ "name": "serverType",
+ "type": "serverType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'deploy'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "server_organizationId_organization_id_fk": {
+ "name": "server_organizationId_organization_id_fk",
+ "tableFrom": "server",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "server_sshKeyId_ssh-key_sshKeyId_fk": {
+ "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "server",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "sshKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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
+ },
+ "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
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.ssh-key": {
+ "name": "ssh-key",
+ "schema": "",
+ "columns": {
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "publicKey": {
+ "name": "publicKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lastUsedAt": {
+ "name": "lastUsedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh-key_organizationId_organization_id_fk": {
+ "name": "ssh-key_organizationId_organization_id_fk",
+ "tableFrom": "ssh-key",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_provider": {
+ "name": "sso_provider",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_config": {
+ "name": "oidc_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "saml_config": {
+ "name": "saml_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sso_provider_user_id_user_id_fk": {
+ "name": "sso_provider_user_id_user_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "sso_provider_organization_id_organization_id_fk": {
+ "name": "sso_provider_organization_id_organization_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "sso_provider_provider_id_unique": {
+ "name": "sso_provider_provider_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "provider_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "firstName": {
+ "name": "firstName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "lastName": {
+ "name": "lastName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "two_factor_enabled": {
+ "name": "two_factor_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableEnterpriseFeatures": {
+ "name": "enableEnterpriseFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "licenseKey": {
+ "name": "licenseKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isValidEnterpriseLicense": {
+ "name": "isValidEnterpriseLicense",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "trustedOrigins": {
+ "name": "trustedOrigins",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_email_unique": {
+ "name": "user_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webServerSettings": {
+ "name": "webServerSettings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "whitelabelingConfig": {
+ "name": "whitelabelingConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{\"appName\":null,\"appDescription\":null,\"logoUrl\":null,\"faviconUrl\":null,\"customCss\":null,\"loginLogoUrl\":null,\"supportUrl\":null,\"docsUrl\":null,\"errorPageTitle\":null,\"errorPageDescription\":null,\"metaTitle\":null,\"footerText\":null}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "raw"
+ ]
+ },
+ "public.deploymentStatus": {
+ "name": "deploymentStatus",
+ "schema": "public",
+ "values": [
+ "running",
+ "done",
+ "error",
+ "cancelled"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.gitProviderType": {
+ "name": "gitProviderType",
+ "schema": "public",
+ "values": [
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea"
+ ]
+ },
+ "public.mountType": {
+ "name": "mountType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "public.serviceType": {
+ "name": "serviceType",
+ "schema": "public",
+ "values": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "public.notificationType": {
+ "name": "notificationType",
+ "schema": "public",
+ "values": [
+ "slack",
+ "telegram",
+ "discord",
+ "email",
+ "resend",
+ "gotify",
+ "ntfy",
+ "pushover",
+ "custom",
+ "lark",
+ "teams"
+ ]
+ },
+ "public.patchType": {
+ "name": "patchType",
+ "schema": "public",
+ "values": [
+ "create",
+ "update",
+ "delete"
+ ]
+ },
+ "public.protocolType": {
+ "name": "protocolType",
+ "schema": "public",
+ "values": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "public.publishModeType": {
+ "name": "publishModeType",
+ "schema": "public",
+ "values": [
+ "ingress",
+ "host"
+ ]
+ },
+ "public.RegistryType": {
+ "name": "RegistryType",
+ "schema": "public",
+ "values": [
+ "selfHosted",
+ "cloud"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.serverType": {
+ "name": "serverType",
+ "schema": "public",
+ "values": [
+ "deploy",
+ "build"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0150_snapshot.json b/apps/dokploy/drizzle/meta/0150_snapshot.json
new file mode 100644
index 000000000..502dead97
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0150_snapshot.json
@@ -0,0 +1,7728 @@
+{
+ "id": "636b21c5-9739-45df-84c8-95f894ee7082",
+ "prevId": "e6eacbcd-0e09-4fa0-91be-730d3cc20d84",
+ "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
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config_id": {
+ "name": "config_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'default'"
+ },
+ "reference_id": {
+ "name": "reference_id",
+ "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
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": {},
+ "foreignKeys": {
+ "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.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "invitation_organization_id_organization_id_fk": {
+ "name": "invitation_organization_id_organization_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_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.member": {
+ "name": "member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteEnvironments": {
+ "name": "canDeleteEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateEnvironments": {
+ "name": "canCreateEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accessedEnvironments": {
+ "name": "accessedEnvironments",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "member_organization_id_organization_id_fk": {
+ "name": "member_organization_id_organization_id_fk",
+ "tableFrom": "member",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "member_user_id_user_id_fk": {
+ "name": "member_user_id_user_id_fk",
+ "tableFrom": "member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization": {
+ "name": "organization",
+ "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": false
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_id": {
+ "name": "owner_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "organization_owner_id_user_id_fk": {
+ "name": "organization_owner_id_user_id_fk",
+ "tableFrom": "organization",
+ "tableTo": "user",
+ "columnsFrom": [
+ "owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "organization_slug_unique": {
+ "name": "organization_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization_role": {
+ "name": "organization_role",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission": {
+ "name": "permission",
+ "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": false
+ }
+ },
+ "indexes": {
+ "organizationRole_organizationId_idx": {
+ "name": "organizationRole_organizationId_idx",
+ "columns": [
+ {
+ "expression": "organization_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "organizationRole_role_idx": {
+ "name": "organizationRole_role_idx",
+ "columns": [
+ {
+ "expression": "role",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "organization_role_organization_id_organization_id_fk": {
+ "name": "organization_role_organization_id_organization_id_fk",
+ "tableFrom": "organization_role",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.two_factor": {
+ "name": "two_factor",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "backup_codes": {
+ "name": "backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "two_factor_user_id_user_id_fk": {
+ "name": "two_factor_user_id_user_id_fk",
+ "tableFrom": "two_factor",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_log": {
+ "name": "audit_log",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_email": {
+ "name": "user_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_role": {
+ "name": "user_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "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()"
+ }
+ },
+ "indexes": {
+ "auditLog_organizationId_idx": {
+ "name": "auditLog_organizationId_idx",
+ "columns": [
+ {
+ "expression": "organization_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "auditLog_userId_idx": {
+ "name": "auditLog_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "auditLog_createdAt_idx": {
+ "name": "auditLog_createdAt_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "audit_log_organization_id_organization_id_fk": {
+ "name": "audit_log_organization_id_organization_id_fk",
+ "tableFrom": "audit_log",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "audit_log_user_id_user_id_fk": {
+ "name": "audit_log_user_id_user_id_fk",
+ "tableFrom": "audit_log",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.application": {
+ "name": "application",
+ "schema": "",
+ "columns": {
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewEnv": {
+ "name": "previewEnv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildArgs": {
+ "name": "previewBuildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildSecrets": {
+ "name": "previewBuildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLabels": {
+ "name": "previewLabels",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewWildcard": {
+ "name": "previewWildcard",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewPort": {
+ "name": "previewPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "previewHttps": {
+ "name": "previewHttps",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "previewPath": {
+ "name": "previewPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewRequireCollaboratorPermissions": {
+ "name": "previewRequireCollaboratorPermissions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "buildArgs": {
+ "name": "buildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildSecrets": {
+ "name": "buildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildPath": {
+ "name": "buildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBuildPath": {
+ "name": "gitlabBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBuildPath": {
+ "name": "bitbucketBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBuildPath": {
+ "name": "customGitBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerfile": {
+ "name": "dockerfile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Dockerfile'"
+ },
+ "dockerContextPath": {
+ "name": "dockerContextPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerBuildStage": {
+ "name": "dockerBuildStage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dropBuildPath": {
+ "name": "dropBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "buildType": {
+ "name": "buildType",
+ "type": "buildType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'nixpacks'"
+ },
+ "railpackVersion": {
+ "name": "railpackVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0.15.4'"
+ },
+ "herokuVersion": {
+ "name": "herokuVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'24'"
+ },
+ "publishDirectory": {
+ "name": "publishDirectory",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createEnvFile": {
+ "name": "createEnvFile",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackRegistryId": {
+ "name": "rollbackRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildRegistryId": {
+ "name": "buildRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "application",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_registryId_registry_registryId_fk": {
+ "name": "application_registryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "registryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_rollbackRegistryId_registry_registryId_fk": {
+ "name": "application_rollbackRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "rollbackRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_environmentId_environment_environmentId_fk": {
+ "name": "application_environmentId_environment_environmentId_fk",
+ "tableFrom": "application",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_githubId_github_githubId_fk": {
+ "name": "application_githubId_github_githubId_fk",
+ "tableFrom": "application",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_gitlabId_gitlab_gitlabId_fk": {
+ "name": "application_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "application",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_serverId_server_serverId_fk": {
+ "name": "application_serverId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_buildServerId_server_serverId_fk": {
+ "name": "application_buildServerId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_buildRegistryId_registry_registryId_fk": {
+ "name": "application_buildRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "buildRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "application_appName_unique": {
+ "name": "application_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.backup": {
+ "name": "backup",
+ "schema": "",
+ "columns": {
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "database": {
+ "name": "database",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "backup_destinationId_destination_destinationId_fk": {
+ "name": "backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_postgresId_postgres_postgresId_fk": {
+ "name": "backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mongoId_mongo_mongoId_fk": {
+ "name": "backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_userId_user_id_fk": {
+ "name": "backup_userId_user_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bitbucket": {
+ "name": "bitbucket",
+ "schema": "",
+ "columns": {
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bitbucketUsername": {
+ "name": "bitbucketUsername",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketEmail": {
+ "name": "bitbucketEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "appPassword": {
+ "name": "appPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketWorkspaceName": {
+ "name": "bitbucketWorkspaceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "bitbucket",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.certificate": {
+ "name": "certificate",
+ "schema": "",
+ "columns": {
+ "certificateId": {
+ "name": "certificateId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificateData": {
+ "name": "certificateData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificatePath": {
+ "name": "certificatePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "autoRenew": {
+ "name": "autoRenew",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "certificate_organizationId_organization_id_fk": {
+ "name": "certificate_organizationId_organization_id_fk",
+ "tableFrom": "certificate",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "certificate_serverId_server_serverId_fk": {
+ "name": "certificate_serverId_server_serverId_fk",
+ "tableFrom": "certificate",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "certificate_certificatePath_unique": {
+ "name": "certificate_certificatePath_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "certificatePath"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.compose": {
+ "name": "compose",
+ "schema": "",
+ "columns": {
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeFile": {
+ "name": "composeFile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceTypeCompose",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "composeType": {
+ "name": "composeType",
+ "type": "composeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'docker-compose'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "composePath": {
+ "name": "composePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'./docker-compose.yml'"
+ },
+ "suffix": {
+ "name": "suffix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "randomize": {
+ "name": "randomize",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeployment": {
+ "name": "isolatedDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeploymentsVolume": {
+ "name": "isolatedDeploymentsVolume",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "composeStatus": {
+ "name": "composeStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "compose",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_environmentId_environment_environmentId_fk": {
+ "name": "compose_environmentId_environment_environmentId_fk",
+ "tableFrom": "compose",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "compose_githubId_github_githubId_fk": {
+ "name": "compose_githubId_github_githubId_fk",
+ "tableFrom": "compose",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_gitlabId_gitlab_gitlabId_fk": {
+ "name": "compose_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "compose",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_serverId_server_serverId_fk": {
+ "name": "compose_serverId_server_serverId_fk",
+ "tableFrom": "compose",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.deployment": {
+ "name": "deployment",
+ "schema": "",
+ "columns": {
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "deploymentStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'running'"
+ },
+ "logPath": {
+ "name": "logPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isPreviewDeployment": {
+ "name": "isPreviewDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "deployment_applicationId_application_applicationId_fk": {
+ "name": "deployment_applicationId_application_applicationId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_composeId_compose_composeId_fk": {
+ "name": "deployment_composeId_compose_composeId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_serverId_server_serverId_fk": {
+ "name": "deployment_serverId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
+ "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "volume_backup",
+ "columnsFrom": [
+ "volumeBackupId"
+ ],
+ "columnsTo": [
+ "volumeBackupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_buildServerId_server_serverId_fk": {
+ "name": "deployment_buildServerId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.destination": {
+ "name": "destination",
+ "schema": "",
+ "columns": {
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessKey": {
+ "name": "accessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secretAccessKey": {
+ "name": "secretAccessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bucket": {
+ "name": "bucket",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region": {
+ "name": "region",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "destination_organizationId_organization_id_fk": {
+ "name": "destination_organizationId_organization_id_fk",
+ "tableFrom": "destination",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.domain": {
+ "name": "domain",
+ "schema": "",
+ "columns": {
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domainType": {
+ "name": "domainType",
+ "type": "domainType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'application'"
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "domain_composeId_compose_composeId_fk": {
+ "name": "domain_composeId_compose_composeId_fk",
+ "tableFrom": "domain",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_applicationId_application_applicationId_fk": {
+ "name": "domain_applicationId_application_applicationId_fk",
+ "tableFrom": "domain",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "domain",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.environment": {
+ "name": "environment",
+ "schema": "",
+ "columns": {
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isDefault": {
+ "name": "isDefault",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "environment_projectId_project_projectId_fk": {
+ "name": "environment_projectId_project_projectId_fk",
+ "tableFrom": "environment",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.git_provider": {
+ "name": "git_provider",
+ "schema": "",
+ "columns": {
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerType": {
+ "name": "providerType",
+ "type": "gitProviderType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "git_provider_organizationId_organization_id_fk": {
+ "name": "git_provider_organizationId_organization_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "git_provider_userId_user_id_fk": {
+ "name": "git_provider_userId_user_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "giteaInternalUrl": {
+ "name": "giteaInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github": {
+ "name": "github",
+ "schema": "",
+ "columns": {
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "githubAppName": {
+ "name": "githubAppName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubAppId": {
+ "name": "githubAppId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientId": {
+ "name": "githubClientId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientSecret": {
+ "name": "githubClientSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubInstallationId": {
+ "name": "githubInstallationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubPrivateKey": {
+ "name": "githubPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubWebhookSecret": {
+ "name": "githubWebhookSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "github_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "github",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitlab": {
+ "name": "gitlab",
+ "schema": "",
+ "columns": {
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "gitlabUrl": {
+ "name": "gitlabUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitlab.com'"
+ },
+ "gitlabInternalUrl": {
+ "name": "gitlabInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitlab",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mariadb": {
+ "name": "mariadb",
+ "schema": "",
+ "columns": {
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mariadb_environmentId_environment_environmentId_fk": {
+ "name": "mariadb_environmentId_environment_environmentId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mariadb_serverId_server_serverId_fk": {
+ "name": "mariadb_serverId_server_serverId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mariadb_appName_unique": {
+ "name": "mariadb_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mongo": {
+ "name": "mongo",
+ "schema": "",
+ "columns": {
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicaSets": {
+ "name": "replicaSets",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mongo_environmentId_environment_environmentId_fk": {
+ "name": "mongo_environmentId_environment_environmentId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mongo_serverId_server_serverId_fk": {
+ "name": "mongo_serverId_server_serverId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mongo_appName_unique": {
+ "name": "mongo_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mount": {
+ "name": "mount",
+ "schema": "",
+ "columns": {
+ "mountId": {
+ "name": "mountId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "mountType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "mountPath": {
+ "name": "mountPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mount_applicationId_application_applicationId_fk": {
+ "name": "mount_applicationId_application_applicationId_fk",
+ "tableFrom": "mount",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_postgresId_postgres_postgresId_fk": {
+ "name": "mount_postgresId_postgres_postgresId_fk",
+ "tableFrom": "mount",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mariadbId_mariadb_mariadbId_fk": {
+ "name": "mount_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mongoId_mongo_mongoId_fk": {
+ "name": "mount_mongoId_mongo_mongoId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mysqlId_mysql_mysqlId_fk": {
+ "name": "mount_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_redisId_redis_redisId_fk": {
+ "name": "mount_redisId_redis_redisId_fk",
+ "tableFrom": "mount",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_composeId_compose_composeId_fk": {
+ "name": "mount_composeId_compose_composeId_fk",
+ "tableFrom": "mount",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mysql": {
+ "name": "mysql",
+ "schema": "",
+ "columns": {
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mysql_environmentId_environment_environmentId_fk": {
+ "name": "mysql_environmentId_environment_environmentId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mysql_serverId_server_serverId_fk": {
+ "name": "mysql_serverId_server_serverId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mysql_appName_unique": {
+ "name": "mysql_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.custom": {
+ "name": "custom",
+ "schema": "",
+ "columns": {
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "headers": {
+ "name": "headers",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.discord": {
+ "name": "discord",
+ "schema": "",
+ "columns": {
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.email": {
+ "name": "email",
+ "schema": "",
+ "columns": {
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "smtpServer": {
+ "name": "smtpServer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "smtpPort": {
+ "name": "smtpPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gotify": {
+ "name": "gotify",
+ "schema": "",
+ "columns": {
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appToken": {
+ "name": "appToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.lark": {
+ "name": "lark",
+ "schema": "",
+ "columns": {
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "notificationId": {
+ "name": "notificationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appDeploy": {
+ "name": "appDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "appBuildError": {
+ "name": "appBuildError",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "databaseBackup": {
+ "name": "databaseBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "volumeBackup": {
+ "name": "volumeBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dokployRestart": {
+ "name": "dokployRestart",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerCleanup": {
+ "name": "dockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "serverThreshold": {
+ "name": "serverThreshold",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "notificationType": {
+ "name": "notificationType",
+ "type": "notificationType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_slackId_slack_slackId_fk": {
+ "name": "notification_slackId_slack_slackId_fk",
+ "tableFrom": "notification",
+ "tableTo": "slack",
+ "columnsFrom": [
+ "slackId"
+ ],
+ "columnsTo": [
+ "slackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_telegramId_telegram_telegramId_fk": {
+ "name": "notification_telegramId_telegram_telegramId_fk",
+ "tableFrom": "notification",
+ "tableTo": "telegram",
+ "columnsFrom": [
+ "telegramId"
+ ],
+ "columnsTo": [
+ "telegramId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_discordId_discord_discordId_fk": {
+ "name": "notification_discordId_discord_discordId_fk",
+ "tableFrom": "notification",
+ "tableTo": "discord",
+ "columnsFrom": [
+ "discordId"
+ ],
+ "columnsTo": [
+ "discordId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_emailId_email_emailId_fk": {
+ "name": "notification_emailId_email_emailId_fk",
+ "tableFrom": "notification",
+ "tableTo": "email",
+ "columnsFrom": [
+ "emailId"
+ ],
+ "columnsTo": [
+ "emailId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_resendId_resend_resendId_fk": {
+ "name": "notification_resendId_resend_resendId_fk",
+ "tableFrom": "notification",
+ "tableTo": "resend",
+ "columnsFrom": [
+ "resendId"
+ ],
+ "columnsTo": [
+ "resendId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_gotifyId_gotify_gotifyId_fk": {
+ "name": "notification_gotifyId_gotify_gotifyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "gotify",
+ "columnsFrom": [
+ "gotifyId"
+ ],
+ "columnsTo": [
+ "gotifyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_ntfyId_ntfy_ntfyId_fk": {
+ "name": "notification_ntfyId_ntfy_ntfyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "ntfy",
+ "columnsFrom": [
+ "ntfyId"
+ ],
+ "columnsTo": [
+ "ntfyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_customId_custom_customId_fk": {
+ "name": "notification_customId_custom_customId_fk",
+ "tableFrom": "notification",
+ "tableTo": "custom",
+ "columnsFrom": [
+ "customId"
+ ],
+ "columnsTo": [
+ "customId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_larkId_lark_larkId_fk": {
+ "name": "notification_larkId_lark_larkId_fk",
+ "tableFrom": "notification",
+ "tableTo": "lark",
+ "columnsFrom": [
+ "larkId"
+ ],
+ "columnsTo": [
+ "larkId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_pushoverId_pushover_pushoverId_fk": {
+ "name": "notification_pushoverId_pushover_pushoverId_fk",
+ "tableFrom": "notification",
+ "tableTo": "pushover",
+ "columnsFrom": [
+ "pushoverId"
+ ],
+ "columnsTo": [
+ "pushoverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_teamsId_teams_teamsId_fk": {
+ "name": "notification_teamsId_teams_teamsId_fk",
+ "tableFrom": "notification",
+ "tableTo": "teams",
+ "columnsFrom": [
+ "teamsId"
+ ],
+ "columnsTo": [
+ "teamsId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_organizationId_organization_id_fk": {
+ "name": "notification_organizationId_organization_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ntfy": {
+ "name": "ntfy",
+ "schema": "",
+ "columns": {
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topic": {
+ "name": "topic",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "accessToken": {
+ "name": "accessToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 3
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pushover": {
+ "name": "pushover",
+ "schema": "",
+ "columns": {
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userKey": {
+ "name": "userKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "retry": {
+ "name": "retry",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expire": {
+ "name": "expire",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.resend": {
+ "name": "resend",
+ "schema": "",
+ "columns": {
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.slack": {
+ "name": "slack",
+ "schema": "",
+ "columns": {
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.teams": {
+ "name": "teams",
+ "schema": "",
+ "columns": {
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.telegram": {
+ "name": "telegram",
+ "schema": "",
+ "columns": {
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "botToken": {
+ "name": "botToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "chatId": {
+ "name": "chatId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.patch": {
+ "name": "patch",
+ "schema": "",
+ "columns": {
+ "patchId": {
+ "name": "patchId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "patchType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'update'"
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "patch_applicationId_application_applicationId_fk": {
+ "name": "patch_applicationId_application_applicationId_fk",
+ "tableFrom": "patch",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "patch_composeId_compose_composeId_fk": {
+ "name": "patch_composeId_compose_composeId_fk",
+ "tableFrom": "patch",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "patch_filepath_application_unique": {
+ "name": "patch_filepath_application_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "applicationId"
+ ]
+ },
+ "patch_filepath_compose_unique": {
+ "name": "patch_filepath_compose_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "composeId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.port": {
+ "name": "port",
+ "schema": "",
+ "columns": {
+ "portId": {
+ "name": "portId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "publishedPort": {
+ "name": "publishedPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "publishMode": {
+ "name": "publishMode",
+ "type": "publishModeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'host'"
+ },
+ "targetPort": {
+ "name": "targetPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "protocolType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "port_applicationId_application_applicationId_fk": {
+ "name": "port_applicationId_application_applicationId_fk",
+ "tableFrom": "port",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.postgres": {
+ "name": "postgres",
+ "schema": "",
+ "columns": {
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "postgres_environmentId_environment_environmentId_fk": {
+ "name": "postgres_environmentId_environment_environmentId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "postgres_serverId_server_serverId_fk": {
+ "name": "postgres_serverId_server_serverId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "postgres_appName_unique": {
+ "name": "postgres_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preview_deployments": {
+ "name": "preview_deployments",
+ "schema": "",
+ "columns": {
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestId": {
+ "name": "pullRequestId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestNumber": {
+ "name": "pullRequestNumber",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestURL": {
+ "name": "pullRequestURL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestTitle": {
+ "name": "pullRequestTitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestCommentId": {
+ "name": "pullRequestCommentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previewStatus": {
+ "name": "previewStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preview_deployments_applicationId_application_applicationId_fk": {
+ "name": "preview_deployments_applicationId_application_applicationId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "preview_deployments_domainId_domain_domainId_fk": {
+ "name": "preview_deployments_domainId_domain_domainId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "domain",
+ "columnsFrom": [
+ "domainId"
+ ],
+ "columnsTo": [
+ "domainId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "preview_deployments_appName_unique": {
+ "name": "preview_deployments_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_organizationId_organization_id_fk": {
+ "name": "project_organizationId_organization_id_fk",
+ "tableFrom": "project",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redirect": {
+ "name": "redirect",
+ "schema": "",
+ "columns": {
+ "redirectId": {
+ "name": "redirectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "regex": {
+ "name": "regex",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "replacement": {
+ "name": "replacement",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permanent": {
+ "name": "permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redirect_applicationId_application_applicationId_fk": {
+ "name": "redirect_applicationId_application_applicationId_fk",
+ "tableFrom": "redirect",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redis": {
+ "name": "redis",
+ "schema": "",
+ "columns": {
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redis_environmentId_environment_environmentId_fk": {
+ "name": "redis_environmentId_environment_environmentId_fk",
+ "tableFrom": "redis",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "redis_serverId_server_serverId_fk": {
+ "name": "redis_serverId_server_serverId_fk",
+ "tableFrom": "redis",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "redis_appName_unique": {
+ "name": "redis_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.registry": {
+ "name": "registry",
+ "schema": "",
+ "columns": {
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "registryName": {
+ "name": "registryName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "imagePrefix": {
+ "name": "imagePrefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selfHosted": {
+ "name": "selfHosted",
+ "type": "RegistryType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'cloud'"
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "registry_organizationId_organization_id_fk": {
+ "name": "registry_organizationId_organization_id_fk",
+ "tableFrom": "registry",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_id_fk": {
+ "name": "schedule_userId_user_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security": {
+ "name": "security",
+ "schema": "",
+ "columns": {
+ "securityId": {
+ "name": "securityId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "security_applicationId_application_applicationId_fk": {
+ "name": "security_applicationId_application_applicationId_fk",
+ "tableFrom": "security",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "security_username_applicationId_unique": {
+ "name": "security_username_applicationId_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "username",
+ "applicationId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.server": {
+ "name": "server",
+ "schema": "",
+ "columns": {
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ipAddress": {
+ "name": "ipAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'root'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverStatus": {
+ "name": "serverStatus",
+ "type": "serverStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "serverType": {
+ "name": "serverType",
+ "type": "serverType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'deploy'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "server_organizationId_organization_id_fk": {
+ "name": "server_organizationId_organization_id_fk",
+ "tableFrom": "server",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "server_sshKeyId_ssh-key_sshKeyId_fk": {
+ "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "server",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "sshKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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
+ },
+ "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
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.ssh-key": {
+ "name": "ssh-key",
+ "schema": "",
+ "columns": {
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "publicKey": {
+ "name": "publicKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lastUsedAt": {
+ "name": "lastUsedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh-key_organizationId_organization_id_fk": {
+ "name": "ssh-key_organizationId_organization_id_fk",
+ "tableFrom": "ssh-key",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_provider": {
+ "name": "sso_provider",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_config": {
+ "name": "oidc_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "saml_config": {
+ "name": "saml_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sso_provider_user_id_user_id_fk": {
+ "name": "sso_provider_user_id_user_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "sso_provider_organization_id_organization_id_fk": {
+ "name": "sso_provider_organization_id_organization_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "sso_provider_provider_id_unique": {
+ "name": "sso_provider_provider_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "provider_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "firstName": {
+ "name": "firstName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "lastName": {
+ "name": "lastName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "two_factor_enabled": {
+ "name": "two_factor_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableEnterpriseFeatures": {
+ "name": "enableEnterpriseFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "licenseKey": {
+ "name": "licenseKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isValidEnterpriseLicense": {
+ "name": "isValidEnterpriseLicense",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "trustedOrigins": {
+ "name": "trustedOrigins",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_email_unique": {
+ "name": "user_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webServerSettings": {
+ "name": "webServerSettings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "whitelabelingConfig": {
+ "name": "whitelabelingConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{\"appName\":null,\"appDescription\":null,\"logoUrl\":null,\"faviconUrl\":null,\"customCss\":null,\"loginLogoUrl\":null,\"supportUrl\":null,\"docsUrl\":null,\"errorPageTitle\":null,\"errorPageDescription\":null,\"metaTitle\":null,\"footerText\":null}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "raw"
+ ]
+ },
+ "public.deploymentStatus": {
+ "name": "deploymentStatus",
+ "schema": "public",
+ "values": [
+ "running",
+ "done",
+ "error",
+ "cancelled"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.gitProviderType": {
+ "name": "gitProviderType",
+ "schema": "public",
+ "values": [
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea"
+ ]
+ },
+ "public.mountType": {
+ "name": "mountType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "public.serviceType": {
+ "name": "serviceType",
+ "schema": "public",
+ "values": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "public.notificationType": {
+ "name": "notificationType",
+ "schema": "public",
+ "values": [
+ "slack",
+ "telegram",
+ "discord",
+ "email",
+ "resend",
+ "gotify",
+ "ntfy",
+ "pushover",
+ "custom",
+ "lark",
+ "teams"
+ ]
+ },
+ "public.patchType": {
+ "name": "patchType",
+ "schema": "public",
+ "values": [
+ "create",
+ "update",
+ "delete"
+ ]
+ },
+ "public.protocolType": {
+ "name": "protocolType",
+ "schema": "public",
+ "values": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "public.publishModeType": {
+ "name": "publishModeType",
+ "schema": "public",
+ "values": [
+ "ingress",
+ "host"
+ ]
+ },
+ "public.RegistryType": {
+ "name": "RegistryType",
+ "schema": "public",
+ "values": [
+ "selfHosted",
+ "cloud"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.serverType": {
+ "name": "serverType",
+ "schema": "public",
+ "values": [
+ "deploy",
+ "build"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0151_snapshot.json b/apps/dokploy/drizzle/meta/0151_snapshot.json
new file mode 100644
index 000000000..1d63420b6
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0151_snapshot.json
@@ -0,0 +1,7722 @@
+{
+ "id": "bfcffccc-2c73-4f23-a217-5afac257e26f",
+ "prevId": "636b21c5-9739-45df-84c8-95f894ee7082",
+ "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
+ },
+ "is2FAEnabled": {
+ "name": "is2FAEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resetPasswordToken": {
+ "name": "resetPasswordToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resetPasswordExpiresAt": {
+ "name": "resetPasswordExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationToken": {
+ "name": "confirmationToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirmationExpiresAt": {
+ "name": "confirmationExpiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config_id": {
+ "name": "config_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'default'"
+ },
+ "reference_id": {
+ "name": "reference_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "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
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": {},
+ "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"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "invitation_organization_id_organization_id_fk": {
+ "name": "invitation_organization_id_organization_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_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.member": {
+ "name": "member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_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
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteEnvironments": {
+ "name": "canDeleteEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateEnvironments": {
+ "name": "canCreateEnvironments",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accessedEnvironments": {
+ "name": "accessedEnvironments",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "member_organization_id_organization_id_fk": {
+ "name": "member_organization_id_organization_id_fk",
+ "tableFrom": "member",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "member_user_id_user_id_fk": {
+ "name": "member_user_id_user_id_fk",
+ "tableFrom": "member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization": {
+ "name": "organization",
+ "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": false
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner_id": {
+ "name": "owner_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "organization_owner_id_user_id_fk": {
+ "name": "organization_owner_id_user_id_fk",
+ "tableFrom": "organization",
+ "tableTo": "user",
+ "columnsFrom": [
+ "owner_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "organization_slug_unique": {
+ "name": "organization_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.organization_role": {
+ "name": "organization_role",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission": {
+ "name": "permission",
+ "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": false
+ }
+ },
+ "indexes": {
+ "organizationRole_organizationId_idx": {
+ "name": "organizationRole_organizationId_idx",
+ "columns": [
+ {
+ "expression": "organization_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "organizationRole_role_idx": {
+ "name": "organizationRole_role_idx",
+ "columns": [
+ {
+ "expression": "role",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "organization_role_organization_id_organization_id_fk": {
+ "name": "organization_role_organization_id_organization_id_fk",
+ "tableFrom": "organization_role",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.two_factor": {
+ "name": "two_factor",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "backup_codes": {
+ "name": "backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "two_factor_user_id_user_id_fk": {
+ "name": "two_factor_user_id_user_id_fk",
+ "tableFrom": "two_factor",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_log": {
+ "name": "audit_log",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_email": {
+ "name": "user_email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_role": {
+ "name": "user_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "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()"
+ }
+ },
+ "indexes": {
+ "auditLog_organizationId_idx": {
+ "name": "auditLog_organizationId_idx",
+ "columns": [
+ {
+ "expression": "organization_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "auditLog_userId_idx": {
+ "name": "auditLog_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "auditLog_createdAt_idx": {
+ "name": "auditLog_createdAt_idx",
+ "columns": [
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "audit_log_organization_id_organization_id_fk": {
+ "name": "audit_log_organization_id_organization_id_fk",
+ "tableFrom": "audit_log",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "audit_log_user_id_user_id_fk": {
+ "name": "audit_log_user_id_user_id_fk",
+ "tableFrom": "audit_log",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.application": {
+ "name": "application",
+ "schema": "",
+ "columns": {
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewEnv": {
+ "name": "previewEnv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildArgs": {
+ "name": "previewBuildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewBuildSecrets": {
+ "name": "previewBuildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLabels": {
+ "name": "previewLabels",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewWildcard": {
+ "name": "previewWildcard",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewPort": {
+ "name": "previewPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "previewHttps": {
+ "name": "previewHttps",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "previewPath": {
+ "name": "previewPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewRequireCollaboratorPermissions": {
+ "name": "previewRequireCollaboratorPermissions",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "buildArgs": {
+ "name": "buildArgs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildSecrets": {
+ "name": "buildSecrets",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subtitle": {
+ "name": "subtitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildPath": {
+ "name": "buildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBuildPath": {
+ "name": "gitlabBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBuildPath": {
+ "name": "bitbucketBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBuildPath": {
+ "name": "customGitBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerfile": {
+ "name": "dockerfile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Dockerfile'"
+ },
+ "dockerContextPath": {
+ "name": "dockerContextPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerBuildStage": {
+ "name": "dockerBuildStage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dropBuildPath": {
+ "name": "dropBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "buildType": {
+ "name": "buildType",
+ "type": "buildType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'nixpacks'"
+ },
+ "railpackVersion": {
+ "name": "railpackVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0.15.4'"
+ },
+ "herokuVersion": {
+ "name": "herokuVersion",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'24'"
+ },
+ "publishDirectory": {
+ "name": "publishDirectory",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createEnvFile": {
+ "name": "createEnvFile",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackRegistryId": {
+ "name": "rollbackRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildRegistryId": {
+ "name": "buildRegistryId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "application",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_registryId_registry_registryId_fk": {
+ "name": "application_registryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "registryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_rollbackRegistryId_registry_registryId_fk": {
+ "name": "application_rollbackRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "rollbackRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_environmentId_environment_environmentId_fk": {
+ "name": "application_environmentId_environment_environmentId_fk",
+ "tableFrom": "application",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_githubId_github_githubId_fk": {
+ "name": "application_githubId_github_githubId_fk",
+ "tableFrom": "application",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_gitlabId_gitlab_gitlabId_fk": {
+ "name": "application_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "application",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_serverId_server_serverId_fk": {
+ "name": "application_serverId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "application_buildServerId_server_serverId_fk": {
+ "name": "application_buildServerId_server_serverId_fk",
+ "tableFrom": "application",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "application_buildRegistryId_registry_registryId_fk": {
+ "name": "application_buildRegistryId_registry_registryId_fk",
+ "tableFrom": "application",
+ "tableTo": "registry",
+ "columnsFrom": [
+ "buildRegistryId"
+ ],
+ "columnsTo": [
+ "registryId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "application_appName_unique": {
+ "name": "application_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.backup": {
+ "name": "backup",
+ "schema": "",
+ "columns": {
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "database": {
+ "name": "database",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "backup_destinationId_destination_destinationId_fk": {
+ "name": "backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_postgresId_postgres_postgresId_fk": {
+ "name": "backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_mongoId_mongo_mongoId_fk": {
+ "name": "backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "backup_userId_user_id_fk": {
+ "name": "backup_userId_user_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.bitbucket": {
+ "name": "bitbucket",
+ "schema": "",
+ "columns": {
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "bitbucketUsername": {
+ "name": "bitbucketUsername",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketEmail": {
+ "name": "bitbucketEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "appPassword": {
+ "name": "appPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketWorkspaceName": {
+ "name": "bitbucketWorkspaceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "bitbucket",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.certificate": {
+ "name": "certificate",
+ "schema": "",
+ "columns": {
+ "certificateId": {
+ "name": "certificateId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificateData": {
+ "name": "certificateData",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "certificatePath": {
+ "name": "certificatePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "autoRenew": {
+ "name": "autoRenew",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "certificate_organizationId_organization_id_fk": {
+ "name": "certificate_organizationId_organization_id_fk",
+ "tableFrom": "certificate",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "certificate_serverId_server_serverId_fk": {
+ "name": "certificate_serverId_server_serverId_fk",
+ "tableFrom": "certificate",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "certificate_certificatePath_unique": {
+ "name": "certificate_certificatePath_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "certificatePath"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.compose": {
+ "name": "compose",
+ "schema": "",
+ "columns": {
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeFile": {
+ "name": "composeFile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "refreshToken": {
+ "name": "refreshToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sourceType": {
+ "name": "sourceType",
+ "type": "sourceTypeCompose",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "composeType": {
+ "name": "composeType",
+ "type": "composeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'docker-compose'"
+ },
+ "repository": {
+ "name": "repository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autoDeploy": {
+ "name": "autoDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabProjectId": {
+ "name": "gitlabProjectId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabRepository": {
+ "name": "gitlabRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabOwner": {
+ "name": "gitlabOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabBranch": {
+ "name": "gitlabBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabPathNamespace": {
+ "name": "gitlabPathNamespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepository": {
+ "name": "bitbucketRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketRepositorySlug": {
+ "name": "bitbucketRepositorySlug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketOwner": {
+ "name": "bitbucketOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketBranch": {
+ "name": "bitbucketBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitUrl": {
+ "name": "customGitUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitBranch": {
+ "name": "customGitBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customGitSSHKeyId": {
+ "name": "customGitSSHKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "composePath": {
+ "name": "composePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'./docker-compose.yml'"
+ },
+ "suffix": {
+ "name": "suffix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "randomize": {
+ "name": "randomize",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeployment": {
+ "name": "isolatedDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "isolatedDeploymentsVolume": {
+ "name": "isolatedDeploymentsVolume",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "composeStatus": {
+ "name": "composeStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "bitbucketId": {
+ "name": "bitbucketId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
+ "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "compose",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "customGitSSHKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_environmentId_environment_environmentId_fk": {
+ "name": "compose_environmentId_environment_environmentId_fk",
+ "tableFrom": "compose",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "compose_githubId_github_githubId_fk": {
+ "name": "compose_githubId_github_githubId_fk",
+ "tableFrom": "compose",
+ "tableTo": "github",
+ "columnsFrom": [
+ "githubId"
+ ],
+ "columnsTo": [
+ "githubId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_gitlabId_gitlab_gitlabId_fk": {
+ "name": "compose_gitlabId_gitlab_gitlabId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitlab",
+ "columnsFrom": [
+ "gitlabId"
+ ],
+ "columnsTo": [
+ "gitlabId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_bitbucketId_bitbucket_bitbucketId_fk": {
+ "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
+ "tableFrom": "compose",
+ "tableTo": "bitbucket",
+ "columnsFrom": [
+ "bitbucketId"
+ ],
+ "columnsTo": [
+ "bitbucketId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "compose_serverId_server_serverId_fk": {
+ "name": "compose_serverId_server_serverId_fk",
+ "tableFrom": "compose",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.deployment": {
+ "name": "deployment",
+ "schema": "",
+ "columns": {
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "deploymentStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'running'"
+ },
+ "logPath": {
+ "name": "logPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isPreviewDeployment": {
+ "name": "isPreviewDeployment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "buildServerId": {
+ "name": "buildServerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "deployment_applicationId_application_applicationId_fk": {
+ "name": "deployment_applicationId_application_applicationId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_composeId_compose_composeId_fk": {
+ "name": "deployment_composeId_compose_composeId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_serverId_server_serverId_fk": {
+ "name": "deployment_serverId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
+ "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "volume_backup",
+ "columnsFrom": [
+ "volumeBackupId"
+ ],
+ "columnsTo": [
+ "volumeBackupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_buildServerId_server_serverId_fk": {
+ "name": "deployment_buildServerId_server_serverId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "server",
+ "columnsFrom": [
+ "buildServerId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.destination": {
+ "name": "destination",
+ "schema": "",
+ "columns": {
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider": {
+ "name": "provider",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accessKey": {
+ "name": "accessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secretAccessKey": {
+ "name": "secretAccessKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bucket": {
+ "name": "bucket",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "region": {
+ "name": "region",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "destination_organizationId_organization_id_fk": {
+ "name": "destination_organizationId_organization_id_fk",
+ "tableFrom": "destination",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.domain": {
+ "name": "domain",
+ "schema": "",
+ "columns": {
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3000
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domainType": {
+ "name": "domainType",
+ "type": "domainType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'application'"
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "domain_composeId_compose_composeId_fk": {
+ "name": "domain_composeId_compose_composeId_fk",
+ "tableFrom": "domain",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_applicationId_application_applicationId_fk": {
+ "name": "domain_applicationId_application_applicationId_fk",
+ "tableFrom": "domain",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
+ "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
+ "tableFrom": "domain",
+ "tableTo": "preview_deployments",
+ "columnsFrom": [
+ "previewDeploymentId"
+ ],
+ "columnsTo": [
+ "previewDeploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.environment": {
+ "name": "environment",
+ "schema": "",
+ "columns": {
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isDefault": {
+ "name": "isDefault",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "environment_projectId_project_projectId_fk": {
+ "name": "environment_projectId_project_projectId_fk",
+ "tableFrom": "environment",
+ "tableTo": "project",
+ "columnsFrom": [
+ "projectId"
+ ],
+ "columnsTo": [
+ "projectId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.git_provider": {
+ "name": "git_provider",
+ "schema": "",
+ "columns": {
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "providerType": {
+ "name": "providerType",
+ "type": "gitProviderType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'github'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "git_provider_organizationId_organization_id_fk": {
+ "name": "git_provider_organizationId_organization_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "git_provider_userId_user_id_fk": {
+ "name": "git_provider_userId_user_id_fk",
+ "tableFrom": "git_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "giteaInternalUrl": {
+ "name": "giteaInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github": {
+ "name": "github",
+ "schema": "",
+ "columns": {
+ "githubId": {
+ "name": "githubId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "githubAppName": {
+ "name": "githubAppName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubAppId": {
+ "name": "githubAppId",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientId": {
+ "name": "githubClientId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubClientSecret": {
+ "name": "githubClientSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubInstallationId": {
+ "name": "githubInstallationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubPrivateKey": {
+ "name": "githubPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "githubWebhookSecret": {
+ "name": "githubWebhookSecret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "github_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "github",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gitlab": {
+ "name": "gitlab",
+ "schema": "",
+ "columns": {
+ "gitlabId": {
+ "name": "gitlabId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "gitlabUrl": {
+ "name": "gitlabUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitlab.com'"
+ },
+ "gitlabInternalUrl": {
+ "name": "gitlabInternalUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "application_id": {
+ "name": "application_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitlab",
+ "tableTo": "git_provider",
+ "columnsFrom": [
+ "gitProviderId"
+ ],
+ "columnsTo": [
+ "gitProviderId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mariadb": {
+ "name": "mariadb",
+ "schema": "",
+ "columns": {
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mariadb_environmentId_environment_environmentId_fk": {
+ "name": "mariadb_environmentId_environment_environmentId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mariadb_serverId_server_serverId_fk": {
+ "name": "mariadb_serverId_server_serverId_fk",
+ "tableFrom": "mariadb",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mariadb_appName_unique": {
+ "name": "mariadb_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mongo": {
+ "name": "mongo",
+ "schema": "",
+ "columns": {
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicaSets": {
+ "name": "replicaSets",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mongo_environmentId_environment_environmentId_fk": {
+ "name": "mongo_environmentId_environment_environmentId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mongo_serverId_server_serverId_fk": {
+ "name": "mongo_serverId_server_serverId_fk",
+ "tableFrom": "mongo",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mongo_appName_unique": {
+ "name": "mongo_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mount": {
+ "name": "mount",
+ "schema": "",
+ "columns": {
+ "mountId": {
+ "name": "mountId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "mountType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "mountPath": {
+ "name": "mountPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mount_applicationId_application_applicationId_fk": {
+ "name": "mount_applicationId_application_applicationId_fk",
+ "tableFrom": "mount",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_postgresId_postgres_postgresId_fk": {
+ "name": "mount_postgresId_postgres_postgresId_fk",
+ "tableFrom": "mount",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mariadbId_mariadb_mariadbId_fk": {
+ "name": "mount_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mongoId_mongo_mongoId_fk": {
+ "name": "mount_mongoId_mongo_mongoId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_mysqlId_mysql_mysqlId_fk": {
+ "name": "mount_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "mount",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_redisId_redis_redisId_fk": {
+ "name": "mount_redisId_redis_redisId_fk",
+ "tableFrom": "mount",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mount_composeId_compose_composeId_fk": {
+ "name": "mount_composeId_compose_composeId_fk",
+ "tableFrom": "mount",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mysql": {
+ "name": "mysql",
+ "schema": "",
+ "columns": {
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rootPassword": {
+ "name": "rootPassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "mysql_environmentId_environment_environmentId_fk": {
+ "name": "mysql_environmentId_environment_environmentId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "mysql_serverId_server_serverId_fk": {
+ "name": "mysql_serverId_server_serverId_fk",
+ "tableFrom": "mysql",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "mysql_appName_unique": {
+ "name": "mysql_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.custom": {
+ "name": "custom",
+ "schema": "",
+ "columns": {
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "headers": {
+ "name": "headers",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.discord": {
+ "name": "discord",
+ "schema": "",
+ "columns": {
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.email": {
+ "name": "email",
+ "schema": "",
+ "columns": {
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "smtpServer": {
+ "name": "smtpServer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "smtpPort": {
+ "name": "smtpPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.gotify": {
+ "name": "gotify",
+ "schema": "",
+ "columns": {
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appToken": {
+ "name": "appToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 5
+ },
+ "decoration": {
+ "name": "decoration",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.lark": {
+ "name": "lark",
+ "schema": "",
+ "columns": {
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "notificationId": {
+ "name": "notificationId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appDeploy": {
+ "name": "appDeploy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "appBuildError": {
+ "name": "appBuildError",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "databaseBackup": {
+ "name": "databaseBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "volumeBackup": {
+ "name": "volumeBackup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dokployRestart": {
+ "name": "dokployRestart",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "dockerCleanup": {
+ "name": "dockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "serverThreshold": {
+ "name": "serverThreshold",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "notificationType": {
+ "name": "notificationType",
+ "type": "notificationType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "discordId": {
+ "name": "discordId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "emailId": {
+ "name": "emailId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotifyId": {
+ "name": "gotifyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "customId": {
+ "name": "customId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "larkId": {
+ "name": "larkId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_slackId_slack_slackId_fk": {
+ "name": "notification_slackId_slack_slackId_fk",
+ "tableFrom": "notification",
+ "tableTo": "slack",
+ "columnsFrom": [
+ "slackId"
+ ],
+ "columnsTo": [
+ "slackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_telegramId_telegram_telegramId_fk": {
+ "name": "notification_telegramId_telegram_telegramId_fk",
+ "tableFrom": "notification",
+ "tableTo": "telegram",
+ "columnsFrom": [
+ "telegramId"
+ ],
+ "columnsTo": [
+ "telegramId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_discordId_discord_discordId_fk": {
+ "name": "notification_discordId_discord_discordId_fk",
+ "tableFrom": "notification",
+ "tableTo": "discord",
+ "columnsFrom": [
+ "discordId"
+ ],
+ "columnsTo": [
+ "discordId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_emailId_email_emailId_fk": {
+ "name": "notification_emailId_email_emailId_fk",
+ "tableFrom": "notification",
+ "tableTo": "email",
+ "columnsFrom": [
+ "emailId"
+ ],
+ "columnsTo": [
+ "emailId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_resendId_resend_resendId_fk": {
+ "name": "notification_resendId_resend_resendId_fk",
+ "tableFrom": "notification",
+ "tableTo": "resend",
+ "columnsFrom": [
+ "resendId"
+ ],
+ "columnsTo": [
+ "resendId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_gotifyId_gotify_gotifyId_fk": {
+ "name": "notification_gotifyId_gotify_gotifyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "gotify",
+ "columnsFrom": [
+ "gotifyId"
+ ],
+ "columnsTo": [
+ "gotifyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_ntfyId_ntfy_ntfyId_fk": {
+ "name": "notification_ntfyId_ntfy_ntfyId_fk",
+ "tableFrom": "notification",
+ "tableTo": "ntfy",
+ "columnsFrom": [
+ "ntfyId"
+ ],
+ "columnsTo": [
+ "ntfyId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_customId_custom_customId_fk": {
+ "name": "notification_customId_custom_customId_fk",
+ "tableFrom": "notification",
+ "tableTo": "custom",
+ "columnsFrom": [
+ "customId"
+ ],
+ "columnsTo": [
+ "customId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_larkId_lark_larkId_fk": {
+ "name": "notification_larkId_lark_larkId_fk",
+ "tableFrom": "notification",
+ "tableTo": "lark",
+ "columnsFrom": [
+ "larkId"
+ ],
+ "columnsTo": [
+ "larkId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_pushoverId_pushover_pushoverId_fk": {
+ "name": "notification_pushoverId_pushover_pushoverId_fk",
+ "tableFrom": "notification",
+ "tableTo": "pushover",
+ "columnsFrom": [
+ "pushoverId"
+ ],
+ "columnsTo": [
+ "pushoverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_teamsId_teams_teamsId_fk": {
+ "name": "notification_teamsId_teams_teamsId_fk",
+ "tableFrom": "notification",
+ "tableTo": "teams",
+ "columnsFrom": [
+ "teamsId"
+ ],
+ "columnsTo": [
+ "teamsId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_organizationId_organization_id_fk": {
+ "name": "notification_organizationId_organization_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ntfy": {
+ "name": "ntfy",
+ "schema": "",
+ "columns": {
+ "ntfyId": {
+ "name": "ntfyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverUrl": {
+ "name": "serverUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topic": {
+ "name": "topic",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "accessToken": {
+ "name": "accessToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 3
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.pushover": {
+ "name": "pushover",
+ "schema": "",
+ "columns": {
+ "pushoverId": {
+ "name": "pushoverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "userKey": {
+ "name": "userKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiToken": {
+ "name": "apiToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "priority": {
+ "name": "priority",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "retry": {
+ "name": "retry",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expire": {
+ "name": "expire",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.resend": {
+ "name": "resend",
+ "schema": "",
+ "columns": {
+ "resendId": {
+ "name": "resendId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fromAddress": {
+ "name": "fromAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "toAddress": {
+ "name": "toAddress",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.slack": {
+ "name": "slack",
+ "schema": "",
+ "columns": {
+ "slackId": {
+ "name": "slackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.teams": {
+ "name": "teams",
+ "schema": "",
+ "columns": {
+ "teamsId": {
+ "name": "teamsId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhookUrl": {
+ "name": "webhookUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.telegram": {
+ "name": "telegram",
+ "schema": "",
+ "columns": {
+ "telegramId": {
+ "name": "telegramId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "botToken": {
+ "name": "botToken",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "chatId": {
+ "name": "chatId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.patch": {
+ "name": "patch",
+ "schema": "",
+ "columns": {
+ "patchId": {
+ "name": "patchId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "patchType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'update'"
+ },
+ "filePath": {
+ "name": "filePath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "patch_applicationId_application_applicationId_fk": {
+ "name": "patch_applicationId_application_applicationId_fk",
+ "tableFrom": "patch",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "patch_composeId_compose_composeId_fk": {
+ "name": "patch_composeId_compose_composeId_fk",
+ "tableFrom": "patch",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "patch_filepath_application_unique": {
+ "name": "patch_filepath_application_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "applicationId"
+ ]
+ },
+ "patch_filepath_compose_unique": {
+ "name": "patch_filepath_compose_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "filePath",
+ "composeId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.port": {
+ "name": "port",
+ "schema": "",
+ "columns": {
+ "portId": {
+ "name": "portId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "publishedPort": {
+ "name": "publishedPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "publishMode": {
+ "name": "publishMode",
+ "type": "publishModeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'host'"
+ },
+ "targetPort": {
+ "name": "targetPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "protocolType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "port_applicationId_application_applicationId_fk": {
+ "name": "port_applicationId_application_applicationId_fk",
+ "tableFrom": "port",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.postgres": {
+ "name": "postgres",
+ "schema": "",
+ "columns": {
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseName": {
+ "name": "databaseName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databaseUser": {
+ "name": "databaseUser",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "databasePassword": {
+ "name": "databasePassword",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "postgres_environmentId_environment_environmentId_fk": {
+ "name": "postgres_environmentId_environment_environmentId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "postgres_serverId_server_serverId_fk": {
+ "name": "postgres_serverId_server_serverId_fk",
+ "tableFrom": "postgres",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "postgres_appName_unique": {
+ "name": "postgres_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.preview_deployments": {
+ "name": "preview_deployments",
+ "schema": "",
+ "columns": {
+ "previewDeploymentId": {
+ "name": "previewDeploymentId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "branch": {
+ "name": "branch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestId": {
+ "name": "pullRequestId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestNumber": {
+ "name": "pullRequestNumber",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestURL": {
+ "name": "pullRequestURL",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestTitle": {
+ "name": "pullRequestTitle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pullRequestCommentId": {
+ "name": "pullRequestCommentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "previewStatus": {
+ "name": "previewStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "domainId": {
+ "name": "domainId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "preview_deployments_applicationId_application_applicationId_fk": {
+ "name": "preview_deployments_applicationId_application_applicationId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "preview_deployments_domainId_domain_domainId_fk": {
+ "name": "preview_deployments_domainId_domain_domainId_fk",
+ "tableFrom": "preview_deployments",
+ "tableTo": "domain",
+ "columnsFrom": [
+ "domainId"
+ ],
+ "columnsTo": [
+ "domainId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "preview_deployments_appName_unique": {
+ "name": "preview_deployments_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "projectId": {
+ "name": "projectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_organizationId_organization_id_fk": {
+ "name": "project_organizationId_organization_id_fk",
+ "tableFrom": "project",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redirect": {
+ "name": "redirect",
+ "schema": "",
+ "columns": {
+ "redirectId": {
+ "name": "redirectId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "regex": {
+ "name": "regex",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "replacement": {
+ "name": "replacement",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permanent": {
+ "name": "permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "uniqueConfigKey": {
+ "name": "uniqueConfigKey",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redirect_applicationId_application_applicationId_fk": {
+ "name": "redirect_applicationId_application_applicationId_fk",
+ "tableFrom": "redirect",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.redis": {
+ "name": "redis",
+ "schema": "",
+ "columns": {
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dockerImage": {
+ "name": "dockerImage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "args": {
+ "name": "args",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "env": {
+ "name": "env",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryReservation": {
+ "name": "memoryReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memoryLimit": {
+ "name": "memoryLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuReservation": {
+ "name": "cpuReservation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cpuLimit": {
+ "name": "cpuLimit",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "externalPort": {
+ "name": "externalPort",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationStatus": {
+ "name": "applicationStatus",
+ "type": "applicationStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'idle'"
+ },
+ "healthCheckSwarm": {
+ "name": "healthCheckSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "restartPolicySwarm": {
+ "name": "restartPolicySwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "placementSwarm": {
+ "name": "placementSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updateConfigSwarm": {
+ "name": "updateConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackConfigSwarm": {
+ "name": "rollbackConfigSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "modeSwarm": {
+ "name": "modeSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "labelsSwarm": {
+ "name": "labelsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "networkSwarm": {
+ "name": "networkSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stopGracePeriodSwarm": {
+ "name": "stopGracePeriodSwarm",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "endpointSpecSwarm": {
+ "name": "endpointSpecSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ulimitsSwarm": {
+ "name": "ulimitsSwarm",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "replicas": {
+ "name": "replicas",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "environmentId": {
+ "name": "environmentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "redis_environmentId_environment_environmentId_fk": {
+ "name": "redis_environmentId_environment_environmentId_fk",
+ "tableFrom": "redis",
+ "tableTo": "environment",
+ "columnsFrom": [
+ "environmentId"
+ ],
+ "columnsTo": [
+ "environmentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "redis_serverId_server_serverId_fk": {
+ "name": "redis_serverId_server_serverId_fk",
+ "tableFrom": "redis",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "redis_appName_unique": {
+ "name": "redis_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.registry": {
+ "name": "registry",
+ "schema": "",
+ "columns": {
+ "registryId": {
+ "name": "registryId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "registryName": {
+ "name": "registryName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "imagePrefix": {
+ "name": "imagePrefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "registryUrl": {
+ "name": "registryUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "selfHosted": {
+ "name": "selfHosted",
+ "type": "RegistryType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'cloud'"
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "registry_organizationId_organization_id_fk": {
+ "name": "registry_organizationId_organization_id_fk",
+ "tableFrom": "registry",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_id_fk": {
+ "name": "schedule_userId_user_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.security": {
+ "name": "security",
+ "schema": "",
+ "columns": {
+ "securityId": {
+ "name": "securityId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "security_applicationId_application_applicationId_fk": {
+ "name": "security_applicationId_application_applicationId_fk",
+ "tableFrom": "security",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "security_username_applicationId_unique": {
+ "name": "security_username_applicationId_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "username",
+ "applicationId"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.server": {
+ "name": "server",
+ "schema": "",
+ "columns": {
+ "serverId": {
+ "name": "serverId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ipAddress": {
+ "name": "ipAddress",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'root'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serverStatus": {
+ "name": "serverStatus",
+ "type": "serverStatus",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "serverType": {
+ "name": "serverType",
+ "type": "serverType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'deploy'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "server_organizationId_organization_id_fk": {
+ "name": "server_organizationId_organization_id_fk",
+ "tableFrom": "server",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "server_sshKeyId_ssh-key_sshKeyId_fk": {
+ "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
+ "tableFrom": "server",
+ "tableTo": "ssh-key",
+ "columnsFrom": [
+ "sshKeyId"
+ ],
+ "columnsTo": [
+ "sshKeyId"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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
+ },
+ "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
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "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.ssh-key": {
+ "name": "ssh-key",
+ "schema": "",
+ "columns": {
+ "sshKeyId": {
+ "name": "sshKeyId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "privateKey": {
+ "name": "privateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "publicKey": {
+ "name": "publicKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "lastUsedAt": {
+ "name": "lastUsedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh-key_organizationId_organization_id_fk": {
+ "name": "ssh-key_organizationId_organization_id_fk",
+ "tableFrom": "ssh-key",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_provider": {
+ "name": "sso_provider",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_config": {
+ "name": "oidc_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "saml_config": {
+ "name": "saml_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "organization_id": {
+ "name": "organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sso_provider_user_id_user_id_fk": {
+ "name": "sso_provider_user_id_user_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "sso_provider_organization_id_organization_id_fk": {
+ "name": "sso_provider_organization_id_organization_id_fk",
+ "tableFrom": "sso_provider",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organization_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "sso_provider_provider_id_unique": {
+ "name": "sso_provider_provider_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "provider_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "firstName": {
+ "name": "firstName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "lastName": {
+ "name": "lastName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "isRegistered": {
+ "name": "isRegistered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "expirationDate": {
+ "name": "expirationDate",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "two_factor_enabled": {
+ "name": "two_factor_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enableEnterpriseFeatures": {
+ "name": "enableEnterpriseFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "licenseKey": {
+ "name": "licenseKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "isValidEnterpriseLicense": {
+ "name": "isValidEnterpriseLicense",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "stripeCustomerId": {
+ "name": "stripeCustomerId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stripeSubscriptionId": {
+ "name": "stripeSubscriptionId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serversQuantity": {
+ "name": "serversQuantity",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "trustedOrigins": {
+ "name": "trustedOrigins",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_email_unique": {
+ "name": "user_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicationId": {
+ "name": "applicationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "postgresId": {
+ "name": "postgresId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mariadbId": {
+ "name": "mariadbId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mongoId": {
+ "name": "mongoId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mysqlId": {
+ "name": "mysqlId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redisId": {
+ "name": "redisId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webServerSettings": {
+ "name": "webServerSettings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "serverIp": {
+ "name": "serverIp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "certificateType": {
+ "name": "certificateType",
+ "type": "certificateType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'none'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "host": {
+ "name": "host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "letsEncryptEmail": {
+ "name": "letsEncryptEmail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sshPrivateKey": {
+ "name": "sshPrivateKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enableDockerCleanup": {
+ "name": "enableDockerCleanup",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "metricsConfig": {
+ "name": "metricsConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
+ },
+ "whitelabelingConfig": {
+ "name": "whitelabelingConfig",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'{\"appName\":null,\"appDescription\":null,\"logoUrl\":null,\"faviconUrl\":null,\"customCss\":null,\"loginLogoUrl\":null,\"supportUrl\":null,\"docsUrl\":null,\"errorPageTitle\":null,\"errorPageDescription\":null,\"metaTitle\":null,\"footerText\":null}'::jsonb"
+ },
+ "cleanupCacheApplications": {
+ "name": "cleanupCacheApplications",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnPreviews": {
+ "name": "cleanupCacheOnPreviews",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cleanupCacheOnCompose": {
+ "name": "cleanupCacheOnCompose",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "raw"
+ ]
+ },
+ "public.deploymentStatus": {
+ "name": "deploymentStatus",
+ "schema": "public",
+ "values": [
+ "running",
+ "done",
+ "error",
+ "cancelled"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.gitProviderType": {
+ "name": "gitProviderType",
+ "schema": "public",
+ "values": [
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea"
+ ]
+ },
+ "public.mountType": {
+ "name": "mountType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "public.serviceType": {
+ "name": "serviceType",
+ "schema": "public",
+ "values": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "public.notificationType": {
+ "name": "notificationType",
+ "schema": "public",
+ "values": [
+ "slack",
+ "telegram",
+ "discord",
+ "email",
+ "resend",
+ "gotify",
+ "ntfy",
+ "pushover",
+ "custom",
+ "lark",
+ "teams"
+ ]
+ },
+ "public.patchType": {
+ "name": "patchType",
+ "schema": "public",
+ "values": [
+ "create",
+ "update",
+ "delete"
+ ]
+ },
+ "public.protocolType": {
+ "name": "protocolType",
+ "schema": "public",
+ "values": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "public.publishModeType": {
+ "name": "publishModeType",
+ "schema": "public",
+ "values": [
+ "ingress",
+ "host"
+ ]
+ },
+ "public.RegistryType": {
+ "name": "RegistryType",
+ "schema": "public",
+ "values": [
+ "selfHosted",
+ "cloud"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.serverType": {
+ "name": "serverType",
+ "schema": "public",
+ "values": [
+ "deploy",
+ "build"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/_journal.json b/apps/dokploy/drizzle/meta/_journal.json
index b83e50548..470a4f492 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -1009,6 +1009,62 @@
"when": 1770961667210,
"tag": "0143_brown_ultron",
"breakpoints": true
+ },
+ {
+ "idx": 144,
+ "version": "7",
+ "when": 1771297084611,
+ "tag": "0144_odd_gunslinger",
+ "breakpoints": true
+ },
+ {
+ "idx": 145,
+ "version": "7",
+ "when": 1771447229358,
+ "tag": "0145_remarkable_titania",
+ "breakpoints": true
+ },
+ {
+ "idx": 146,
+ "version": "7",
+ "when": 1771670009325,
+ "tag": "0146_bumpy_morg",
+ "breakpoints": true
+ },
+ {
+ "idx": 147,
+ "version": "7",
+ "when": 1771830695385,
+ "tag": "0147_right_lake",
+ "breakpoints": true
+ },
+ {
+ "idx": 148,
+ "version": "7",
+ "when": 1773129798212,
+ "tag": "0148_futuristic_bullseye",
+ "breakpoints": true
+ },
+ {
+ "idx": 149,
+ "version": "7",
+ "when": 1773637297592,
+ "tag": "0149_rare_radioactive_man",
+ "breakpoints": true
+ },
+ {
+ "idx": 150,
+ "version": "7",
+ "when": 1773870095817,
+ "tag": "0150_nappy_blue_blade",
+ "breakpoints": true
+ },
+ {
+ "idx": 151,
+ "version": "7",
+ "when": 1773872561300,
+ "tag": "0151_modern_sunfire",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/apps/dokploy/lib/auth-client.ts b/apps/dokploy/lib/auth-client.ts
index 47f0d2294..6d786cc11 100644
--- a/apps/dokploy/lib/auth-client.ts
+++ b/apps/dokploy/lib/auth-client.ts
@@ -1,7 +1,7 @@
import { ssoClient } from "@better-auth/sso/client";
+import { apiKeyClient } from "@better-auth/api-key/client";
import {
adminClient,
- apiKeyClient,
inferAdditionalFields,
organizationClient,
twoFactorClient,
diff --git a/apps/dokploy/lib/languages.ts b/apps/dokploy/lib/languages.ts
deleted file mode 100644
index 7a4d54fa5..000000000
--- a/apps/dokploy/lib/languages.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Sorted list based off of population of the country / speakers of the language.
- */
-export const Languages = {
- english: { code: "en", name: "English" },
- spanish: { code: "es", name: "Español" },
- chineseSimplified: { code: "zh-Hans", name: "简体中文" },
- chineseTraditional: { code: "zh-Hant", name: "繁體中文" },
- portuguese: { code: "pt-br", name: "Português" },
- russian: { code: "ru", name: "Русский" },
- japanese: { code: "ja", name: "日本語" },
- german: { code: "de", name: "Deutsch" },
- korean: { code: "ko", name: "한국어" },
- french: { code: "fr", name: "Français" },
- turkish: { code: "tr", name: "Türkçe" },
- italian: { code: "it", name: "Italiano" },
- polish: { code: "pl", name: "Polski" },
- ukrainian: { code: "uk", name: "Українська" },
- persian: { code: "fa", name: "فارسی" },
- dutch: { code: "nl", name: "Nederlands" },
- indonesian: { code: "id", name: "Bahasa Indonesia" },
- kazakh: { code: "kz", name: "Қазақ" },
- norwegian: { code: "no", name: "Norsk" },
- azerbaijani: { code: "az", name: "Azərbaycan" },
- malayalam: { code: "ml", name: "മലയാളം" },
-};
-
-export type Language = keyof typeof Languages;
-export type LanguageCode = (typeof Languages)[keyof typeof Languages]["code"];
diff --git a/apps/dokploy/next.config.mjs b/apps/dokploy/next.config.mjs
index 48231114a..2f12eccee 100644
--- a/apps/dokploy/next.config.mjs
+++ b/apps/dokploy/next.config.mjs
@@ -10,15 +10,6 @@ const nextConfig = {
ignoreBuildErrors: true,
},
transpilePackages: ["@dokploy/server"],
- /**
- * If you are using `appDir` then you must comment the below `i18n` config out.
- *
- * @see https://github.com/vercel/next.js/issues/41980
- */
- i18n: {
- locales: ["en"],
- defaultLocale: "en",
- },
async headers() {
return [
{
diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json
index 4566c71de..15cc543bf 100644
--- a/apps/dokploy/package.json
+++ b/apps/dokploy/package.json
@@ -1,6 +1,6 @@
{
"name": "dokploy",
- "version": "v0.27.1",
+ "version": "v0.28.8",
"private": true,
"license": "Apache-2.0",
"type": "module",
@@ -39,25 +39,27 @@
"generate:openapi": "tsx -r dotenv/config scripts/generate-openapi.ts"
},
"dependencies": {
- "resend": "^6.0.2",
- "@better-auth/sso": "1.4.18",
- "@ai-sdk/anthropic": "^2.0.5",
- "@ai-sdk/azure": "^2.0.16",
- "@ai-sdk/cohere": "^2.0.4",
- "@ai-sdk/deepinfra": "^1.0.10",
- "@ai-sdk/mistral": "^2.0.7",
- "@ai-sdk/openai": "^2.0.16",
- "@ai-sdk/openai-compatible": "^1.0.10",
+ "@ai-sdk/anthropic": "^3.0.44",
+ "@ai-sdk/azure": "^3.0.30",
+ "@ai-sdk/cohere": "^3.0.21",
+ "@ai-sdk/deepinfra": "^2.0.34",
+ "@ai-sdk/mistral": "^3.0.20",
+ "@ai-sdk/openai": "^3.0.29",
+ "@ai-sdk/openai-compatible": "^2.0.30",
+ "@better-auth/api-key": "1.5.4",
+ "@better-auth/sso": "1.5.4",
"@codemirror/autocomplete": "^6.18.6",
+ "@codemirror/lang-css": "^6.3.1",
"@codemirror/lang-json": "^6.0.1",
"@codemirror/lang-yaml": "^6.1.2",
"@codemirror/language": "^6.11.0",
"@codemirror/legacy-modes": "6.4.0",
- "@codemirror/view": "6.29.0",
+ "@codemirror/search": "^6.6.0",
+ "@codemirror/view": "^6.39.15",
"@dokploy/server": "workspace:*",
- "@dokploy/trpc-openapi": "0.0.4",
+ "@dokploy/trpc-openapi": "0.0.18",
"@faker-js/faker": "^8.4.1",
- "@hookform/resolvers": "^3.10.0",
+ "@hookform/resolvers": "^5.2.2",
"@octokit/auth-app": "^6.1.3",
"@octokit/webhooks": "^13.9.0",
"@radix-ui/react-accordion": "1.1.2",
@@ -83,26 +85,25 @@
"@stepperize/react": "4.0.1",
"@stripe/stripe-js": "4.8.0",
"@tailwindcss/typography": "0.5.16",
- "@tanstack/react-query": "^4.36.1",
+ "@tanstack/react-query": "^5.90.21",
"@tanstack/react-table": "^8.21.3",
- "@trpc/client": "^10.45.2",
- "@trpc/next": "^10.45.2",
- "@trpc/react-query": "^10.45.2",
- "@trpc/server": "^10.45.2",
+ "@trpc/client": "^11.10.0",
+ "@trpc/next": "^11.10.0",
+ "@trpc/react-query": "^11.10.0",
+ "@trpc/server": "^11.10.0",
"@uiw/codemirror-theme-github": "^4.23.12",
"@uiw/react-codemirror": "^4.23.12",
"@xterm/addon-attach": "0.10.0",
"@xterm/addon-clipboard": "0.1.0",
"@xterm/xterm": "^5.5.0",
"adm-zip": "^0.5.16",
- "ai": "^5.0.17",
- "ai-sdk-ollama": "^0.5.1",
+ "ai": "^6.0.86",
+ "ai-sdk-ollama": "^3.7.0",
"bcrypt": "5.1.1",
- "better-auth": "1.4.18",
+ "better-auth": "1.5.4",
"bl": "6.0.11",
"boxen": "^7.1.1",
"bullmq": "5.67.3",
- "shell-quote": "^1.8.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^0.2.1",
@@ -110,10 +111,9 @@
"date-fns": "3.6.0",
"dockerode": "4.0.2",
"dotenv": "16.4.5",
- "drizzle-orm": "^0.41.0",
- "drizzle-zod": "0.5.1",
+ "drizzle-orm": "0.45.1",
+ "drizzle-zod": "0.8.3",
"fancy-ansi": "^0.1.3",
- "i18next": "^23.16.8",
"input-otp": "^1.4.2",
"js-cookie": "^3.0.5",
"lodash": "4.17.21",
@@ -121,7 +121,6 @@
"micromatch": "4.0.8",
"nanoid": "3.3.11",
"next": "^16.1.6",
- "next-i18next": "^15.4.2",
"next-themes": "^0.2.1",
"nextjs-toploader": "^3.9.17",
"node-os-utils": "2.0.1",
@@ -138,16 +137,18 @@
"react-confetti-explosion": "2.1.2",
"react-day-picker": "8.10.1",
"react-dom": "18.2.0",
- "react-hook-form": "^7.56.4",
- "react-i18next": "^15.5.2",
+ "react-hook-form": "^7.71.2",
"react-markdown": "^9.1.0",
"recharts": "^2.15.3",
+ "resend": "^6.0.2",
+ "semver": "7.7.3",
+ "shell-quote": "^1.8.1",
"slugify": "^1.6.6",
"sonner": "^1.7.4",
"ssh2": "1.15.0",
"stripe": "17.2.0",
"superjson": "^2.2.2",
- "swagger-ui-react": "^5.22.0",
+ "swagger-ui-react": "^5.31.2",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"toml": "3.0.0",
@@ -156,24 +157,23 @@
"ws": "8.16.0",
"xterm-addon-fit": "^0.8.0",
"yaml": "2.8.1",
- "zod": "^3.25.32",
- "zod-form-data": "^2.0.7",
- "semver": "7.7.3"
+ "zod": "^4.3.6",
+ "zod-form-data": "^3.0.1"
},
"devDependencies": {
- "@types/semver": "7.7.1",
- "@types/shell-quote": "^1.7.5",
"@types/adm-zip": "^0.5.7",
"@types/bcrypt": "5.0.2",
"@types/js-cookie": "^3.0.6",
"@types/lodash": "4.17.4",
"@types/micromatch": "4.0.9",
- "@types/node": "^20.16.0",
+ "@types/node": "^24.4.0",
"@types/node-schedule": "2.1.6",
"@types/nodemailer": "^6.4.17",
"@types/qrcode": "^1.5.5",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
+ "@types/semver": "7.7.1",
+ "@types/shell-quote": "^1.7.5",
"@types/ssh2": "1.15.1",
"@types/swagger-ui-react": "^4.19.0",
"@types/ws": "8.5.10",
@@ -191,10 +191,10 @@
"ct3aMetadata": {
"initVersion": "7.25.2"
},
- "packageManager": "pnpm@9.12.0",
+ "packageManager": "pnpm@10.22.0",
"engines": {
- "node": "^20.16.0",
- "pnpm": ">=9.12.0"
+ "node": "^24.4.0",
+ "pnpm": ">=10.22.0"
},
"lint-staged": {
"*": [
diff --git a/apps/dokploy/pages/_app.tsx b/apps/dokploy/pages/_app.tsx
index 78e9862d0..86af79bd0 100644
--- a/apps/dokploy/pages/_app.tsx
+++ b/apps/dokploy/pages/_app.tsx
@@ -4,13 +4,12 @@ import type { NextPage } from "next";
import type { AppProps } from "next/app";
import { Inter } from "next/font/google";
import Head from "next/head";
-import { appWithTranslation } from "next-i18next";
import { ThemeProvider } from "next-themes";
import NextTopLoader from "nextjs-toploader";
import type { ReactElement, ReactNode } from "react";
import { SearchCommand } from "@/components/dashboard/search-command";
+import { WhitelabelingProvider } from "@/components/proprietary/whitelabeling/whitelabeling-provider";
import { Toaster } from "@/components/ui/sonner";
-import { Languages } from "@/lib/languages";
import { api } from "@/utils/api";
const inter = Inter({ subsets: ["latin"] });
@@ -50,6 +49,7 @@ const MyApp = ({
forcedTheme={Component.theme}
>
+
{getLayout(
)}
@@ -58,14 +58,4 @@ const MyApp = ({
);
};
-export default api.withTRPC(
- appWithTranslation(MyApp, {
- i18n: {
- defaultLocale: "en",
- locales: Object.values(Languages).map((language) => language.code),
- localeDetection: false,
- },
- fallbackLng: "en",
- keySeparator: false,
- }),
-);
+export default api.withTRPC(MyApp);
diff --git a/apps/dokploy/pages/_error.tsx b/apps/dokploy/pages/_error.tsx
index 3cff43610..775e9ca97 100644
--- a/apps/dokploy/pages/_error.tsx
+++ b/apps/dokploy/pages/_error.tsx
@@ -2,6 +2,7 @@ import type { NextPageContext } from "next";
import Link from "next/link";
import { Logo } from "@/components/shared/logo";
import { buttonVariants } from "@/components/ui/button";
+import { useWhitelabelingPublic } from "@/utils/hooks/use-whitelabeling";
interface Props {
statusCode: number;
@@ -10,18 +11,20 @@ interface Props {
export default function Custom404({ statusCode, error }: Props) {
const displayStatusCode = statusCode || 400;
+ const { config: whitelabeling } = useWhitelabelingPublic();
+ const appName = whitelabeling?.appName || "Dokploy";
+ const logoUrl = whitelabeling?.logoUrl || undefined;
+ const errorTitle = whitelabeling?.errorPageTitle;
+ const errorDescription = whitelabeling?.errorPageDescription;
+
return (
-
-
- Dokploy
+
+
+ {appName}
@@ -30,19 +33,18 @@ export default function Custom404({ statusCode, error }: Props) {
{displayStatusCode}
- {/*
-
- Oops, something went wrong.
-
-
- Sorry, we couldn't find your page.
-
- */}
- {statusCode === 404
- ? "Sorry, we couldn't find your page."
- : "Oops, something went wrong."}
+ {errorTitle
+ ? errorTitle
+ : statusCode === 404
+ ? "Sorry, we couldn't find your page."
+ : "Oops, something went wrong."}
+ {errorDescription && (
+
+ {errorDescription}
+
+ )}
{error && (
{error.message}
@@ -80,13 +82,17 @@ export default function Custom404({ statusCode, error }: Props) {
diff --git a/apps/dokploy/pages/api/deploy/[refreshToken].ts b/apps/dokploy/pages/api/deploy/[refreshToken].ts
index 1bd911494..14b45f3d7 100644
--- a/apps/dokploy/pages/api/deploy/[refreshToken].ts
+++ b/apps/dokploy/pages/api/deploy/[refreshToken].ts
@@ -4,9 +4,9 @@ import {
IS_CLOUD,
shouldDeploy,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { eq } from "drizzle-orm";
import type { NextApiRequest, NextApiResponse } from "next";
-import { db } from "@/server/db";
import { applications } from "@/server/db/schema";
import type { DeploymentJob } from "@/server/queues/queue-types";
import { myQueue } from "@/server/queues/queueSetup";
@@ -152,6 +152,10 @@ export default async function handler(
normalizedCommits = req.body?.commits?.flatMap(
(commit: any) => commit.modified,
);
+ } else if (provider === "soft-serve") {
+ normalizedCommits = req.body?.commits?.flatMap(
+ (commit: any) => commit.modified,
+ );
}
const shouldDeployPaths = shouldDeploy(
@@ -439,6 +443,13 @@ export const extractCommitMessage = (headers: any, body: any) => {
: "NEW COMMIT";
}
+ // Soft Serve
+ if (headers["x-softserve-event"]) {
+ return body.commits && body.commits.length > 0
+ ? body.commits[0].message
+ : "NEW COMMIT";
+ }
+
if (headers["user-agent"]?.includes("Go-http-client")) {
if (body.push_data && body.repository) {
return `DockerHub image pushed: ${body.repository.repo_name}:${body.push_data.tag} by ${body.push_data.pusher}`;
@@ -476,6 +487,11 @@ export const extractHash = (headers: any, body: any) => {
return body.after || "NEW COMMIT";
}
+ // Soft Serve
+ if (headers["x-softserve-event"]) {
+ return body.after || "NEW COMMIT";
+ }
+
return "";
};
@@ -484,7 +500,10 @@ export const extractBranchName = (headers: any, body: any) => {
return body?.ref?.replace("refs/heads/", "");
}
- if (headers["x-gitlab-event"]) {
+ if (
+ headers["x-gitlab-event"] ||
+ headers["x-softserve-event"]?.includes("push")
+ ) {
return body?.ref ? body?.ref.replace("refs/heads/", "") : null;
}
@@ -512,6 +531,10 @@ export const getProviderByHeader = (headers: any) => {
return "bitbucket";
}
+ if (headers["x-softserve-event"]) {
+ return "soft-serve";
+ }
+
return null;
};
diff --git a/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts b/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts
index f41b41198..da3082bb7 100644
--- a/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts
+++ b/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts
@@ -1,7 +1,7 @@
import { IS_CLOUD, shouldDeploy } from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { eq } from "drizzle-orm";
import type { NextApiRequest, NextApiResponse } from "next";
-import { db } from "@/server/db";
import { compose } from "@/server/db/schema";
import type { DeploymentJob } from "@/server/queues/queue-types";
import { myQueue } from "@/server/queues/queueSetup";
diff --git a/apps/dokploy/pages/api/deploy/github.ts b/apps/dokploy/pages/api/deploy/github.ts
index ba031e71a..4438366f6 100644
--- a/apps/dokploy/pages/api/deploy/github.ts
+++ b/apps/dokploy/pages/api/deploy/github.ts
@@ -9,10 +9,10 @@ import {
removePreviewDeployment,
shouldDeploy,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { Webhooks } from "@octokit/webhooks";
import { and, eq } from "drizzle-orm";
import type { NextApiRequest, NextApiResponse } from "next";
-import { db } from "@/server/db";
import { applications, compose, github } from "@/server/db/schema";
import type { DeploymentJob } from "@/server/queues/queue-types";
import { myQueue } from "@/server/queues/queueSetup";
@@ -358,7 +358,8 @@ export default async function handler(
const shouldCreateDeployment =
action === "opened" ||
action === "synchronize" ||
- action === "reopened";
+ action === "reopened" ||
+ action === "labeled";
const repository = githubBody?.repository?.name;
const deploymentHash = githubBody?.pull_request?.head?.sha;
diff --git a/apps/dokploy/pages/api/providers/gitea/helper.ts b/apps/dokploy/pages/api/providers/gitea/helper.ts
index 207eb9075..67d630436 100644
--- a/apps/dokploy/pages/api/providers/gitea/helper.ts
+++ b/apps/dokploy/pages/api/providers/gitea/helper.ts
@@ -38,3 +38,5 @@ export const redirectWithError = (res: NextApiResponse, error: string) => {
`/dashboard/settings/git-providers?error=${encodeURIComponent(error)}`,
);
};
+
+export default findGitea;
diff --git a/apps/dokploy/pages/api/providers/github/setup.ts b/apps/dokploy/pages/api/providers/github/setup.ts
index bd540058d..663939c5e 100644
--- a/apps/dokploy/pages/api/providers/github/setup.ts
+++ b/apps/dokploy/pages/api/providers/github/setup.ts
@@ -1,8 +1,8 @@
import { createGithub } from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { eq } from "drizzle-orm";
import type { NextApiRequest, NextApiResponse } from "next";
import { Octokit } from "octokit";
-import { db } from "@/server/db";
import { github } from "@/server/db/schema";
type Query = {
@@ -10,22 +10,29 @@ type Query = {
state: string;
installation_id: string;
setup_action: string;
- userId: string;
};
export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
) {
- const { code, state, installation_id, userId }: Query = req.query as Query;
+ const { code, state, installation_id }: Query = req.query as Query;
if (!code) {
return res.status(400).json({ error: "Missing code parameter" });
}
- const [action, value] = state?.split(":");
- // Value could be the organizationId or the githubProviderId
+ const [action, ...rest] = state?.split(":");
+ // For gh_init: rest[0] = organizationId, rest[1] = userId
+ // For gh_setup: rest[0] = githubProviderId
if (action === "gh_init") {
+ const organizationId = rest[0];
+ const userId = rest[1] || (req.query.userId as string);
+
+ if (!userId) {
+ return res.status(400).json({ error: "Missing userId parameter" });
+ }
+
const octokit = new Octokit({});
const { data } = await octokit.request(
"POST /app-manifests/{code}/conversions",
@@ -44,7 +51,7 @@ export default async function handler(
githubWebhookSecret: data.webhook_secret,
githubPrivateKey: data.pem,
},
- value as string,
+ organizationId as string,
userId,
);
} else if (action === "gh_setup") {
@@ -53,7 +60,7 @@ export default async function handler(
.set({
githubInstallationId: installation_id,
})
- .where(eq(github.githubId, value as string))
+ .where(eq(github.githubId, rest[0] as string))
.returning();
}
diff --git a/apps/dokploy/pages/api/stripe/webhook.ts b/apps/dokploy/pages/api/stripe/webhook.ts
index b44b63d45..60468bd2c 100644
--- a/apps/dokploy/pages/api/stripe/webhook.ts
+++ b/apps/dokploy/pages/api/stripe/webhook.ts
@@ -1,13 +1,32 @@
import { buffer } from "node:stream/consumers";
import { findUserById, type Server } from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { asc, eq } from "drizzle-orm";
import type { NextApiRequest, NextApiResponse } from "next";
import Stripe from "stripe";
-import { db } from "@/server/db";
import { organization, server, user } from "@/server/db/schema";
const endpointSecret = process.env.STRIPE_WEBHOOK_SECRET!;
+const STARTUP_BASE_PRICE_IDS = [
+ process.env.STARTUP_BASE_PRICE_MONTHLY_ID,
+ process.env.STARTUP_BASE_PRICE_ANNUAL_ID,
+].filter(Boolean) as string[];
+
+const STARTUP_SERVERS_INCLUDED = 3;
+
+function getSubscriptionServersQuantity(
+ items: Stripe.SubscriptionItem[],
+): number {
+ return items.reduce((sum, item) => {
+ const priceId = (item.price as Stripe.Price).id;
+ if (STARTUP_BASE_PRICE_IDS.includes(priceId)) {
+ return sum + STARTUP_SERVERS_INCLUDED;
+ }
+ return sum + (item.quantity ?? 0);
+ }, 0);
+}
+
export const config = {
api: {
bodyParser: false,
@@ -63,12 +82,15 @@ export default async function handler(
const subscription = await stripe.subscriptions.retrieve(
session.subscription as string,
);
+ const serversQuantity = getSubscriptionServersQuantity(
+ subscription?.items?.data ?? [],
+ );
await db
.update(user)
.set({
stripeCustomerId: session.customer as string,
stripeSubscriptionId: session.subscription as string,
- serversQuantity: subscription?.items?.data?.[0]?.quantity ?? 0,
+ serversQuantity,
})
.where(eq(user.id, adminId))
.returning();
@@ -130,15 +152,15 @@ export default async function handler(
}
if (newSubscription.status === "active") {
+ const serversQuantity = getSubscriptionServersQuantity(
+ newSubscription?.items?.data ?? [],
+ );
await db
.update(user)
- .set({
- serversQuantity: newSubscription?.items?.data?.[0]?.quantity ?? 0,
- })
+ .set({ serversQuantity })
.where(eq(user.stripeCustomerId, newSubscription.customer as string));
- const newServersQuantity = admin.serversQuantity;
- await updateServersBasedOnQuantity(admin.id, newServersQuantity);
+ await updateServersBasedOnQuantity(admin.id, serversQuantity);
} else {
await disableServers(admin.id);
await db
@@ -163,11 +185,12 @@ export default async function handler(
break;
}
+ const serversQuantity = getSubscriptionServersQuantity(
+ suscription?.items?.data ?? [],
+ );
await db
.update(user)
- .set({
- serversQuantity: suscription?.items?.data?.[0]?.quantity ?? 0,
- })
+ .set({ serversQuantity })
.where(eq(user.stripeCustomerId, suscription.customer as string));
const admin = await findUserByStripeCustomerId(
diff --git a/apps/dokploy/pages/api/trpc/[trpc].ts b/apps/dokploy/pages/api/trpc/[trpc].ts
index d49eddebd..33bb8bf15 100644
--- a/apps/dokploy/pages/api/trpc/[trpc].ts
+++ b/apps/dokploy/pages/api/trpc/[trpc].ts
@@ -1,10 +1,8 @@
import { createNextApiHandler } from "@trpc/server/adapters/next";
-import { nodeHTTPFormDataContentTypeHandler } from "@trpc/server/adapters/node-http/content-type/form-data";
-import { nodeHTTPJSONContentTypeHandler } from "@trpc/server/adapters/node-http/content-type/json";
import { appRouter } from "@/server/api/root";
import { createTRPCContext } from "@/server/api/trpc";
-// export API handler
+// export API handler (v11: body parsed by Content-Type automatically, no experimental_contentTypeHandlers)
export default createNextApiHandler({
router: appRouter,
createContext: createTRPCContext,
@@ -16,10 +14,6 @@ export default createNextApiHandler({
);
}
: undefined,
- experimental_contentTypeHandlers: [
- nodeHTTPFormDataContentTypeHandler(),
- nodeHTTPJSONContentTypeHandler(),
- ],
});
export const config = {
diff --git a/apps/dokploy/pages/dashboard/deployments.tsx b/apps/dokploy/pages/dashboard/deployments.tsx
new file mode 100644
index 000000000..c39e4b156
--- /dev/null
+++ b/apps/dokploy/pages/dashboard/deployments.tsx
@@ -0,0 +1,113 @@
+import { validateRequest } from "@dokploy/server/lib/auth";
+import { hasPermission } from "@dokploy/server/services/permission";
+import { Rocket } from "lucide-react";
+import type { GetServerSidePropsContext } from "next";
+import { useRouter } from "next/router";
+import type { ReactElement } from "react";
+import { ShowDeploymentsTable } from "@/components/dashboard/deployments/show-deployments-table";
+import { ShowQueueTable } from "@/components/dashboard/deployments/show-queue-table";
+import { DashboardLayout } from "@/components/layouts/dashboard-layout";
+import {
+ Card,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
+
+const TAB_VALUES = ["deployments", "queue"] as const;
+type TabValue = (typeof TAB_VALUES)[number];
+
+function isValidTab(t: string): t is TabValue {
+ return TAB_VALUES.includes(t as TabValue);
+}
+
+function DeploymentsPage() {
+ const router = useRouter();
+ const tab =
+ router.query.tab && isValidTab(router.query.tab as string)
+ ? (router.query.tab as TabValue)
+ : "deployments";
+
+ const setTab = (value: string) => {
+ if (!isValidTab(value)) return;
+ router.replace(
+ { pathname: "/dashboard/deployments", query: { tab: value } },
+ undefined,
+ { shallow: true },
+ );
+ };
+
+ return (
+
+
+
+
+
+
+
+
+ Deployments
+
+
+ All application and compose deployments in one place.
+
+
+
+
+
+ Deployments
+ Queue
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+export default DeploymentsPage;
+
+DeploymentsPage.getLayout = (page: ReactElement) => {
+ return
{page} ;
+};
+
+export async function getServerSideProps(ctx: GetServerSidePropsContext) {
+ const { user, session } = await validateRequest(ctx.req);
+ if (!user) {
+ return {
+ redirect: {
+ permanent: true,
+ destination: "/",
+ },
+ };
+ }
+
+ const canView = await hasPermission(
+ {
+ user: { id: user.id },
+ session: { activeOrganizationId: session?.activeOrganizationId || "" },
+ },
+ { deployment: ["read"] },
+ );
+
+ if (!canView) {
+ return {
+ redirect: {
+ permanent: false,
+ destination: "/dashboard/projects",
+ },
+ };
+ }
+
+ return {
+ props: {},
+ };
+}
diff --git a/apps/dokploy/pages/dashboard/docker.tsx b/apps/dokploy/pages/dashboard/docker.tsx
index a61931a33..384380a4d 100644
--- a/apps/dokploy/pages/dashboard/docker.tsx
+++ b/apps/dokploy/pages/dashboard/docker.tsx
@@ -53,19 +53,15 @@ export async function getServerSideProps(
try {
await helpers.project.all.prefetch();
- if (user.role === "member") {
- const userR = await helpers.user.one.fetch({
- userId: user.id,
- });
+ const userPermissions = await helpers.user.getPermissions.fetch();
- if (!userR?.canAccessToDocker) {
- return {
- redirect: {
- permanent: true,
- destination: "/",
- },
- };
- }
+ if (!userPermissions?.docker.read) {
+ return {
+ redirect: {
+ permanent: true,
+ destination: "/",
+ },
+ };
}
return {
props: {
diff --git a/apps/dokploy/pages/dashboard/monitoring.tsx b/apps/dokploy/pages/dashboard/monitoring.tsx
index 51339e6ba..02e7da48e 100644
--- a/apps/dokploy/pages/dashboard/monitoring.tsx
+++ b/apps/dokploy/pages/dashboard/monitoring.tsx
@@ -1,5 +1,6 @@
import { IS_CLOUD } from "@dokploy/server/constants";
import { validateRequest } from "@dokploy/server/lib/auth";
+import { hasPermission } from "@dokploy/server/services/permission";
import { Loader2 } from "lucide-react";
import type { GetServerSidePropsContext } from "next";
import type { ReactElement } from "react";
@@ -20,7 +21,7 @@ const Dashboard = () => {
false,
);
- const { data: monitoring, isLoading } = api.user.getMetricsToken.useQuery();
+ const { data: monitoring, isPending } = api.user.getMetricsToken.useQuery();
return (
{/*
@@ -35,7 +36,7 @@ const Dashboard = () => {
{" "}
to get more features.
*/}
- {isLoading ? (
+ {isPending ? (
Loading...
@@ -99,7 +100,7 @@ export async function getServerSideProps(
},
};
}
- const { user } = await validateRequest(ctx.req);
+ const { user, session } = await validateRequest(ctx.req);
if (!user) {
return {
redirect: {
@@ -109,6 +110,23 @@ export async function getServerSideProps(
};
}
+ const canView = await hasPermission(
+ {
+ user: { id: user.id },
+ session: { activeOrganizationId: session?.activeOrganizationId || "" },
+ },
+ { monitoring: ["read"] },
+ );
+
+ if (!canView) {
+ return {
+ redirect: {
+ permanent: false,
+ destination: "/dashboard/projects",
+ },
+ };
+ }
+
return {
props: {},
};
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId].tsx
index af901311e..c13fe559f 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId].tsx
@@ -23,7 +23,7 @@ import type {
InferGetServerSidePropsType,
} from "next";
import Head from "next/head";
-import { useRouter } from "next/router";
+import Link from "next/link";
import { type ReactElement, useEffect, useMemo, useState } from "react";
import { toast } from "sonner";
import superjson from "superjson";
@@ -44,8 +44,8 @@ import {
RedisIcon,
} from "@/components/icons/data-tools-icons";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
+import { AdvanceBreadcrumb } from "@/components/shared/advance-breadcrumb";
import { AlertBlock } from "@/components/shared/alert-block";
-import { BreadcrumbSidebar } from "@/components/shared/breadcrumb-sidebar";
import { DateTooltip } from "@/components/shared/date-tooltip";
import { DialogAction } from "@/components/shared/dialog-action";
import { FocusShortcutInput } from "@/components/shared/focus-shortcut-input";
@@ -98,9 +98,9 @@ import {
import { cn } from "@/lib/utils";
import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
+import { useWhitelabeling } from "@/utils/hooks/use-whitelabeling";
export type Services = {
- appName: string;
serverId?: string | null;
serverName?: string | null;
name: string;
@@ -146,7 +146,6 @@ export const extractServicesFromEnvironment = (
}
}
return {
- appName: item.appName,
name: item.name,
type: "application",
id: item.applicationId,
@@ -161,7 +160,6 @@ export const extractServicesFromEnvironment = (
const mariadb: Services[] =
environment.mariadb?.map((item) => ({
- appName: item.appName,
name: item.name,
type: "mariadb",
id: item.mariadbId,
@@ -174,7 +172,6 @@ export const extractServicesFromEnvironment = (
const postgres: Services[] =
environment.postgres?.map((item) => ({
- appName: item.appName,
name: item.name,
type: "postgres",
id: item.postgresId,
@@ -187,7 +184,6 @@ export const extractServicesFromEnvironment = (
const mongo: Services[] =
environment.mongo?.map((item) => ({
- appName: item.appName,
name: item.name,
type: "mongo",
id: item.mongoId,
@@ -200,7 +196,6 @@ export const extractServicesFromEnvironment = (
const redis: Services[] =
environment.redis?.map((item) => ({
- appName: item.appName,
name: item.name,
type: "redis",
id: item.redisId,
@@ -213,7 +208,6 @@ export const extractServicesFromEnvironment = (
const mysql: Services[] =
environment.mysql?.map((item) => ({
- appName: item.appName,
name: item.name,
type: "mysql",
id: item.mysqlId,
@@ -242,7 +236,6 @@ export const extractServicesFromEnvironment = (
}
}
return {
- appName: item.appName,
name: item.name,
type: "compose",
id: item.composeId,
@@ -279,6 +272,7 @@ const EnvironmentPage = (
const [isBulkActionLoading, setIsBulkActionLoading] = useState(false);
const { projectId, environmentId } = props;
const { data: auth } = api.user.get.useQuery();
+ const { data: permissions } = api.user.getPermissions.useQuery();
const { data: environments } = api.environment.byProjectId.useQuery({
projectId: projectId,
@@ -366,7 +360,6 @@ const EnvironmentPage = (
environmentId,
});
const { data: allProjects } = api.project.all.useQuery();
- const router = useRouter();
const [isMoveDialogOpen, setIsMoveDialogOpen] = useState(false);
const [selectedTargetProject, setSelectedTargetProject] =
@@ -379,6 +372,8 @@ const EnvironmentPage = (
{ projectId: selectedTargetProject },
{ enabled: !!selectedTargetProject },
);
+ const { config: whitelabeling } = useWhitelabeling();
+ const appName = whitelabeling?.appName || "Dokploy";
const emptyServices =
!currentEnvironment ||
@@ -420,6 +415,7 @@ const EnvironmentPage = (
};
const handleServiceSelect = (serviceId: string, event: React.MouseEvent) => {
+ event.preventDefault();
event.stopPropagation();
setSelectedServices((prev) =>
prev.includes(serviceId)
@@ -785,7 +781,7 @@ const EnvironmentPage = (
}
if (success > 0) {
toast.success(
- `${success} service${success !== 1 ? "s" : ""} deployed successfully`,
+ `${success} service${success !== 1 ? "s" : ""} queued for deployment`,
);
}
if (failed > 0) {
@@ -865,21 +861,11 @@ const EnvironmentPage = (
return (
-
+
- Environment: {currentEnvironment.name} | {projectData?.name} | Dokploy
+ Environment: {currentEnvironment.name} | {projectData?.name} |{" "}
+ {appName}
@@ -909,9 +895,7 @@ const EnvironmentPage = (
Project Environment
- {(auth?.role === "owner" ||
- auth?.role === "admin" ||
- auth?.canCreateServices) && (
+ {permissions?.service.create && (
@@ -1033,9 +1017,7 @@ const EnvironmentPage = (
Stop
- {(auth?.role === "owner" ||
- auth?.role === "admin" ||
- auth?.canDeleteServices) && (
+ {permissions?.service.delete && (
<>
{filteredServices?.map((service) => (
-
{
- router.push(
- `/dashboard/project/${projectId}/environment/${environmentId}/services/${service.type}/${service.id}`,
- );
- }}
- className="flex flex-col group relative cursor-pointer bg-transparent transition-colors hover:bg-border"
+ href={`/dashboard/project/${projectId}/environment/${environmentId}/services/${service.type}/${service.id}`}
+ className="block"
>
- {service.serverId && (
-
-
-
- )}
-
-
-
-
-
- handleServiceSelect(service.id, e)
- }
- >
-
-
-
-
-
-
-
-
-
-
- {service.name}
-
- {service.description && (
-
- {service.description}
-
- )}
-
-
-
- {service.type === "postgres" && (
-
- )}
- {service.type === "redis" && (
-
- )}
- {service.type === "mariadb" && (
-
- )}
- {service.type === "mongo" && (
-
- )}
- {service.type === "mysql" && (
-
- )}
- {service.type === "application" && (
-
- )}
- {service.type === "compose" && (
-
- )}
-
+
+ {service.serverId && (
+
+
-
-
-
-
- {service.serverName && (
-
-
-
- {service.serverName}
+ )}
+
+
+
+
+
+ handleServiceSelect(service.id, e)
+ }
+ >
+
+
+
+
+
+
+
+
+
+
+ {service.name}
+
+ {service.description && (
+
+ {service.description}
+
+ )}
+
+
+
+ {service.type === "postgres" && (
+
+ )}
+ {service.type === "redis" && (
+
+ )}
+ {service.type === "mariadb" && (
+
+ )}
+ {service.type === "mongo" && (
+
+ )}
+ {service.type === "mysql" && (
+
+ )}
+ {service.type === "application" && (
+
+ )}
+ {service.type === "compose" && (
+
+ )}
- )}
-
- Created
-
-
-
-
+
+
+
+
+ {service.serverName && (
+
+
+
+ {service.serverName}
+
+
+ )}
+
+ Created
+
+
+
+
+
))}
@@ -1630,6 +1610,7 @@ export async function getServerSideProps(
environmentId: params.environmentId,
});
} catch (error) {
+ console.log(error);
// If user doesn't have access to requested environment, redirect to accessible one
const accessibleEnvironments =
await helpers.environment.byProjectId.fetch({
@@ -1649,11 +1630,11 @@ export async function getServerSideProps(
},
};
}
- // No accessible environments, redirect to home
+ // No accessible environments, redirect to projects
return {
redirect: {
permanent: false,
- destination: "/",
+ destination: "/dashboard/projects",
},
};
}
@@ -1669,7 +1650,8 @@ export async function getServerSideProps(
environmentId: params.environmentId,
},
};
- } catch {
+ } catch (error) {
+ console.log(error);
return {
redirect: {
permanent: false,
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/application/[applicationId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/application/[applicationId].tsx
index 7917bd97c..df2c22179 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/application/[applicationId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/application/[applicationId].tsx
@@ -26,6 +26,7 @@ import { ShowDomains } from "@/components/dashboard/application/domains/show-dom
import { ShowEnvironment } from "@/components/dashboard/application/environment/show";
import { ShowGeneralApplication } from "@/components/dashboard/application/general/show";
import { ShowDockerLogs } from "@/components/dashboard/application/logs/show";
+import { ShowPatches } from "@/components/dashboard/application/patches/show-patches";
import { ShowPreviewDeployments } from "@/components/dashboard/application/preview-deployments/show-preview-deployments";
import { ShowSchedules } from "@/components/dashboard/application/schedules/show-schedules";
import { UpdateApplication } from "@/components/dashboard/application/update-application";
@@ -34,7 +35,7 @@ import { DeleteService } from "@/components/dashboard/compose/delete-service";
import { ContainerFreeMonitoring } from "@/components/dashboard/monitoring/free/container/show-free-container-monitoring";
import { ContainerPaidMonitoring } from "@/components/dashboard/monitoring/paid/container/show-paid-container-monitoring";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
-import { BreadcrumbSidebar } from "@/components/shared/breadcrumb-sidebar";
+import { AdvanceBreadcrumb } from "@/components/shared/advance-breadcrumb";
import { StatusTooltip } from "@/components/shared/status-tooltip";
import { Badge } from "@/components/ui/badge";
import {
@@ -55,6 +56,7 @@ import {
import { UseKeyboardNav } from "@/hooks/use-keyboard-nav";
import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
+import { useWhitelabeling } from "@/utils/hooks/use-whitelabeling";
type TabState =
| "projects"
@@ -90,10 +92,13 @@ const Service = (
const { data: isCloud } = api.settings.isCloud.useQuery();
const { data: auth } = api.user.get.useQuery();
+ const { data: permissions } = api.user.getPermissions.useQuery();
const { data: environments } = api.environment.byProjectId.useQuery({
projectId: data?.environment?.project?.projectId || "",
});
+ const { config: whitelabeling } = useWhitelabeling();
+ const appName = whitelabeling?.appName || "Dokploy";
const environmentDropdownItems =
environments?.map((env) => ({
name: env.name,
@@ -103,25 +108,11 @@ const Service = (
return (
-
+
- Application: {data?.name} - {data?.environment.project.name} | Dokploy
+ Application: {data?.name} - {data?.environment.project.name} |{" "}
+ {appName}
@@ -192,10 +183,10 @@ const Service = (
-
- {(auth?.role === "owner" ||
- auth?.role === "admin" ||
- auth?.canDeleteServices) && (
+ {permissions?.service.create && (
+
+ )}
+ {permissions?.service.delete && (
)}
@@ -237,21 +228,47 @@ const Service = (
General
- Environment
- Domains
- Deployments
-
- Preview Deployments
-
- Schedules
-
- Volume Backups
-
- Logs
- {((data?.serverId && isCloud) || !data?.server) && (
- Monitoring
+ {permissions?.envVars.read && (
+
+ Environment
+
+ )}
+ {permissions?.domain.read && (
+ Domains
+ )}
+ {permissions?.deployment.read && (
+
+ Deployments
+
+ )}
+ {permissions?.deployment.read && (
+
+ Preview Deployments
+
+ )}
+ {permissions?.schedule.read && (
+ Schedules
+ )}
+ {permissions?.volumeBackup.read && (
+
+ Volume Backups
+
+ )}
+ {permissions?.logs.read && (
+ Logs
+ )}
+ {data?.sourceType !== "docker" && (
+ Patches
+ )}
+ {permissions?.monitoring.read &&
+ ((data?.serverId && isCloud) || !data?.server) && (
+
+ Monitoring
+
+ )}
+ {permissions?.service.create && (
+ Advanced
)}
- Advanced
@@ -260,26 +277,29 @@ const Service = (
-
-
-
-
-
+ {permissions?.envVars.read && (
+
+
+
+
+
+ )}
-
-
-
- {data?.serverId && isCloud ? (
-
- ) : (
- <>
- {/* {monitoring?.enabledFeatures &&
+ {permissions?.monitoring.read && (
+
+
+
+ {data?.serverId && isCloud ? (
+
+ ) : (
+ <>
+ {/* {monitoring?.enabledFeatures &&
isCloud &&
data?.serverId && (
@@ -293,7 +313,7 @@ const Service = (
)} */}
- {/* {toggleMonitoring ? (
+ {/* {toggleMonitoring ? (
) : ( */}
-
-
-
- {/* )} */}
- >
- )}
+
+
+
+ {/* )} */}
+ >
+ )}
+
-
-
+
+ )}
-
+ {permissions?.logs.read && (
+
+
+
+
+
+ )}
+ {permissions?.schedule.read && (
+
+
+
+
+
+ )}
+ {permissions?.deployment.read && (
+
+
+
+
+
+ )}
+ {permissions?.volumeBackup.read && (
+
+
+
+
+
+ )}
+ {permissions?.deployment.read && (
+
+
+
+
+
+ )}
+ {permissions?.domain.read && (
+
+
+
+
+
+ )}
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ {permissions?.service.create && (
+
+
+
+ )}
)}
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/compose/[composeId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/compose/[composeId].tsx
index 1d6902c59..078bf5b6b 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/compose/[composeId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/compose/[composeId].tsx
@@ -17,6 +17,7 @@ import { ShowVolumes } from "@/components/dashboard/application/advanced/volumes
import { ShowDeployments } from "@/components/dashboard/application/deployments/show-deployments";
import { ShowDomains } from "@/components/dashboard/application/domains/show-domains";
import { ShowEnvironment } from "@/components/dashboard/application/environment/show-enviroment";
+import { ShowPatches } from "@/components/dashboard/application/patches/show-patches";
import { ShowSchedules } from "@/components/dashboard/application/schedules/show-schedules";
import { ShowVolumeBackups } from "@/components/dashboard/application/volume-backups/show-volume-backups";
import { AddCommandCompose } from "@/components/dashboard/compose/advanced/add-command";
@@ -30,7 +31,7 @@ import { ShowBackups } from "@/components/dashboard/database/backups/show-backup
import { ComposeFreeMonitoring } from "@/components/dashboard/monitoring/free/container/show-free-compose-monitoring";
import { ComposePaidMonitoring } from "@/components/dashboard/monitoring/paid/container/show-paid-compose-monitoring";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
-import { BreadcrumbSidebar } from "@/components/shared/breadcrumb-sidebar";
+import { AdvanceBreadcrumb } from "@/components/shared/advance-breadcrumb";
import { StatusTooltip } from "@/components/shared/status-tooltip";
import { Badge } from "@/components/ui/badge";
import {
@@ -51,6 +52,7 @@ import {
import { UseKeyboardNav } from "@/hooks/use-keyboard-nav";
import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
+import { useWhitelabeling } from "@/utils/hooks/use-whitelabeling";
type TabState =
| "projects"
@@ -79,10 +81,13 @@ const Service = (
const { data } = api.compose.one.useQuery({ composeId });
const { data: auth } = api.user.get.useQuery();
+ const { data: permissions } = api.user.getPermissions.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
const { data: environments } = api.environment.byProjectId.useQuery({
projectId: data?.environment?.projectId || "",
});
+ const { config: whitelabeling } = useWhitelabeling();
+ const appName = whitelabeling?.appName || "Dokploy";
const environmentDropdownItems =
environments?.map((env) => ({
name: env.name,
@@ -92,25 +97,10 @@ const Service = (
return (
-
+
- Compose: {data?.name} - {data?.environment?.project?.name} | Dokploy
+ Compose: {data?.name} - {data?.environment?.project?.name} | {appName}
@@ -181,11 +171,11 @@ const Service = (
)}
-
+ {permissions?.service.create && (
+
+ )}
- {(auth?.role === "owner" ||
- auth?.role === "admin" ||
- auth?.canDeleteServices) && (
+ {permissions?.service.delete && (
)}
@@ -228,19 +218,45 @@ const Service = (
General
- Environment
- Domains
- Deployments
- Backups
- Schedules
-
- Volume Backups
-
- Logs
- {((data?.serverId && isCloud) || !data?.server) && (
- Monitoring
+ {permissions?.envVars.read && (
+
+ Environment
+
+ )}
+ {permissions?.domain.read && (
+ Domains
+ )}
+ {permissions?.deployment.read && (
+
+ Deployments
+
+ )}
+ {permissions?.service.create && (
+ Backups
+ )}
+ {permissions?.schedule.read && (
+ Schedules
+ )}
+ {permissions?.volumeBackup.read && (
+
+ Volume Backups
+
+ )}
+ {permissions?.logs.read && (
+ Logs
+ )}
+ {data?.sourceType !== "raw" && (
+ Patches
+ )}
+ {permissions?.monitoring.read &&
+ ((data?.serverId && isCloud) || !data?.server) && (
+
+ Monitoring
+
+ )}
+ {permissions?.service.create && (
+ Advanced
)}
- Advanced
@@ -249,47 +265,56 @@ const Service = (
-
-
-
-
-
-
-
-
-
-
+ {permissions?.envVars.read && (
+
+
+
+
+
+ )}
+ {permissions?.service.create && (
+
+
+
+
+
+ )}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {data?.serverId && isCloud ? (
-
- ) : (
- <>
- {/* {monitoring?.enabledFeatures &&
+ {permissions?.schedule.read && (
+
+
+
+
+
+ )}
+ {permissions?.volumeBackup.read && (
+
+
+
+
+
+ )}
+ {permissions?.monitoring.read && (
+
+
+
+ {data?.serverId && isCloud ? (
+
+ ) : (
+ <>
+ {/* {monitoring?.enabledFeatures &&
isCloud &&
data?.serverId && (
@@ -313,62 +338,77 @@ const Service = (
appType={data?.composeType || "docker-compose"}
/>
) : ( */}
- {/*
*/}
-
- {/*
*/}
- {/* )} */}
- >
+ {/*
*/}
+
+ {/*
*/}
+ {/* )} */}
+ >
+ )}
+
+
+
+ )}
+
+ {permissions?.logs.read && (
+
+
+ {data?.composeType === "docker-compose" ? (
+
+ ) : (
+
)}
-
-
+
+ )}
-
-
- {data?.composeType === "docker-compose" ? (
-
+
+
- ) : (
-
- )}
-
-
+
+
+ )}
-
-
-
-
-
+ {permissions?.domain.read && (
+
+
+
+
+
+ )}
-
+
-
+
-
-
-
+ {permissions?.service.create && (
+
+
+
+ )}
)}
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/mariadb/[mariadbId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/mariadb/[mariadbId].tsx
index 0a1e8501d..3e3a7d7de 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/mariadb/[mariadbId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/mariadb/[mariadbId].tsx
@@ -23,7 +23,7 @@ import { ContainerPaidMonitoring } from "@/components/dashboard/monitoring/paid/
import { ShowDatabaseAdvancedSettings } from "@/components/dashboard/shared/show-database-advanced-settings";
import { MariadbIcon } from "@/components/icons/data-tools-icons";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
-import { BreadcrumbSidebar } from "@/components/shared/breadcrumb-sidebar";
+import { AdvanceBreadcrumb } from "@/components/shared/advance-breadcrumb";
import { StatusTooltip } from "@/components/shared/status-tooltip";
import { Badge } from "@/components/ui/badge";
import {
@@ -45,6 +45,7 @@ import { UseKeyboardNav } from "@/hooks/use-keyboard-nav";
import { cn } from "@/lib/utils";
import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
+import { useWhitelabeling } from "@/utils/hooks/use-whitelabeling";
type TabState = "projects" | "monitoring" | "settings" | "backups" | "advanced";
@@ -59,12 +60,15 @@ const Mariadb = (
const [tab, setSab] = useState(activeTab);
const { data } = api.mariadb.one.useQuery({ mariadbId });
const { data: auth } = api.user.get.useQuery();
+ const { data: permissions } = api.user.getPermissions.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
const { data: environments } = api.environment.byProjectId.useQuery({
projectId: data?.environment?.projectId || "",
});
+ const { config: whitelabeling } = useWhitelabeling();
+ const appName = whitelabeling?.appName || "Dokploy";
const environmentDropdownItems =
environments?.map((env) => ({
name: env.name,
@@ -74,27 +78,12 @@ const Mariadb = (
return (
-
+
Database: {data?.name} - {data?.environment?.project?.name} |
- Dokploy
+ {appName}
@@ -156,10 +145,10 @@ const Mariadb = (
)}
-
- {(auth?.role === "owner" ||
- auth?.role === "admin" ||
- auth?.canDeleteServices) && (
+ {permissions?.service.create && (
+
+ )}
+ {permissions?.service.delete && (
)}
@@ -211,13 +200,24 @@ const Mariadb = (
)}
>
General
-
Environment
-
Logs
- {((data?.serverId && isCloud) || !data?.server) && (
-
Monitoring
+ {permissions?.envVars.read && (
+
+ Environment
+
)}
+ {permissions?.logs.read && (
+
Logs
+ )}
+ {permissions?.monitoring.read &&
+ ((data?.serverId && isCloud) || !data?.server) && (
+
+ Monitoring
+
+ )}
Backups
-
Advanced
+ {permissions?.service.create && (
+
Advanced
+ )}
@@ -228,25 +228,28 @@ const Mariadb = (
-
-
-
-
-
-
-
-
- {data?.serverId && isCloud ? (
-
- ) : (
- <>
- {/* {monitoring?.enabledFeatures && (
+ {permissions?.envVars.read && (
+
+
+
+
+
+ )}
+ {permissions?.monitoring.read && (
+
+
+
+ {data?.serverId && isCloud ? (
+
+ ) : (
+ <>
+ {/* {monitoring?.enabledFeatures && (
Change Monitoring
@@ -268,37 +271,42 @@ const Mariadb = (
/>
) : (
*/}
-
- {/*
*/}
- {/* )} */}
- >
- )}
+
+ {/* */}
+ {/* )} */}
+ >
+ )}
+
-
-
-
-
-
-
-
+
+ )}
+ {permissions?.logs.read && (
+
+
+
+
+
+ )}
-
-
-
-
-
+ {permissions?.service.create && (
+
+
+
+
+
+ )}
)}
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/mongo/[mongoId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/mongo/[mongoId].tsx
index bae83cb2b..ea6483499 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/mongo/[mongoId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/mongo/[mongoId].tsx
@@ -23,7 +23,7 @@ import { ContainerPaidMonitoring } from "@/components/dashboard/monitoring/paid/
import { ShowDatabaseAdvancedSettings } from "@/components/dashboard/shared/show-database-advanced-settings";
import { MongodbIcon } from "@/components/icons/data-tools-icons";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
-import { BreadcrumbSidebar } from "@/components/shared/breadcrumb-sidebar";
+import { AdvanceBreadcrumb } from "@/components/shared/advance-breadcrumb";
import { StatusTooltip } from "@/components/shared/status-tooltip";
import { Badge } from "@/components/ui/badge";
import {
@@ -45,6 +45,7 @@ import { UseKeyboardNav } from "@/hooks/use-keyboard-nav";
import { cn } from "@/lib/utils";
import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
+import { useWhitelabeling } from "@/utils/hooks/use-whitelabeling";
type TabState = "projects" | "monitoring" | "settings" | "backups" | "advanced";
@@ -59,11 +60,14 @@ const Mongo = (
const { data } = api.mongo.one.useQuery({ mongoId });
const { data: auth } = api.user.get.useQuery();
+ const { data: permissions } = api.user.getPermissions.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
const { data: environments } = api.environment.byProjectId.useQuery({
projectId: data?.environment?.projectId || "",
});
+ const { config: whitelabeling } = useWhitelabeling();
+ const appName = whitelabeling?.appName || "Dokploy";
const environmentDropdownItems =
environments?.map((env) => ({
name: env.name,
@@ -73,25 +77,11 @@ const Mongo = (
return (
-
+
- Database: {data?.name} - {data?.environment?.project?.name} | Dokploy
+ Database: {data?.name} - {data?.environment?.project?.name} |{" "}
+ {appName}
@@ -155,10 +145,10 @@ const Mongo = (
-
- {(auth?.role === "owner" ||
- auth?.role === "admin" ||
- auth?.canDeleteServices) && (
+ {permissions?.service.create && (
+
+ )}
+ {permissions?.service.delete && (
)}
@@ -210,13 +200,24 @@ const Mongo = (
)}
>
General
-
Environment
-
Logs
- {((data?.serverId && isCloud) || !data?.server) && (
-
Monitoring
+ {permissions?.envVars.read && (
+
+ Environment
+
)}
+ {permissions?.logs.read && (
+
Logs
+ )}
+ {permissions?.monitoring.read &&
+ ((data?.serverId && isCloud) || !data?.server) && (
+
+ Monitoring
+
+ )}
Backups
-
Advanced
+ {permissions?.service.create && (
+
Advanced
+ )}
@@ -227,25 +228,28 @@ const Mongo = (
-
-
-
-
-
-
-
-
- {data?.serverId && isCloud ? (
-
- ) : (
- <>
- {/* {monitoring?.enabledFeatures && (
+ {permissions?.envVars.read && (
+
+
+
+
+
+ )}
+ {permissions?.monitoring.read && (
+
+
+
+ {data?.serverId && isCloud ? (
+
+ ) : (
+ <>
+ {/* {monitoring?.enabledFeatures && (
Change Monitoring
@@ -267,24 +271,27 @@ const Mongo = (
/>
) : (
*/}
-
- {/*
*/}
- {/* )} */}
- >
- )}
+
+ {/* */}
+ {/* )} */}
+ >
+ )}
+
-
-
-
-
-
-
-
+
+ )}
+ {permissions?.logs.read && (
+
+
+
+
+
+ )}
-
-
-
-
-
+ {permissions?.service.create && (
+
+
+
+
+
+ )}
)}
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/mysql/[mysqlId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/mysql/[mysqlId].tsx
index ba2b9d8a0..ff45c0694 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/mysql/[mysqlId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/mysql/[mysqlId].tsx
@@ -23,7 +23,7 @@ import { UpdateMysql } from "@/components/dashboard/mysql/update-mysql";
import { ShowDatabaseAdvancedSettings } from "@/components/dashboard/shared/show-database-advanced-settings";
import { MysqlIcon } from "@/components/icons/data-tools-icons";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
-import { BreadcrumbSidebar } from "@/components/shared/breadcrumb-sidebar";
+import { AdvanceBreadcrumb } from "@/components/shared/advance-breadcrumb";
import { StatusTooltip } from "@/components/shared/status-tooltip";
import { Badge } from "@/components/ui/badge";
import {
@@ -45,6 +45,7 @@ import { UseKeyboardNav } from "@/hooks/use-keyboard-nav";
import { cn } from "@/lib/utils";
import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
+import { useWhitelabeling } from "@/utils/hooks/use-whitelabeling";
type TabState = "projects" | "monitoring" | "settings" | "backups" | "advanced";
@@ -58,11 +59,14 @@ const MySql = (
const [tab, setSab] = useState
(activeTab);
const { data } = api.mysql.one.useQuery({ mysqlId });
const { data: auth } = api.user.get.useQuery();
+ const { data: permissions } = api.user.getPermissions.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
const { data: environments } = api.environment.byProjectId.useQuery({
projectId: data?.environment?.projectId || "",
});
+ const { config: whitelabeling } = useWhitelabeling();
+ const appName = whitelabeling?.appName || "Dokploy";
const environmentDropdownItems =
environments?.map((env) => ({
name: env.name,
@@ -72,27 +76,12 @@ const MySql = (
return (
-
+
Database: {data?.name} - {data?.environment?.project?.name} |
- Dokploy
+ {appName}
@@ -156,10 +145,10 @@ const MySql = (
-
- {(auth?.role === "owner" ||
- auth?.role === "admin" ||
- auth?.canDeleteServices) && (
+ {permissions?.service.create && (
+
+ )}
+ {permissions?.service.delete && (
)}
@@ -211,17 +200,24 @@ const MySql = (
)}
>
General
-
- Environment
-
-
Logs
- {((data?.serverId && isCloud) || !data?.server) && (
-
- Monitoring
+ {permissions?.envVars.read && (
+
+ Environment
)}
+ {permissions?.logs.read && (
+ Logs
+ )}
+ {permissions?.monitoring.read &&
+ ((data?.serverId && isCloud) || !data?.server) && (
+
+ Monitoring
+
+ )}
Backups
- Advanced
+ {permissions?.service.create && (
+ Advanced
+ )}
@@ -232,40 +228,47 @@ const MySql = (
-
-
-
-
-
-
-
-
- {data?.serverId && isCloud ? (
-
- ) : (
- <>
-
- >
- )}
+ {permissions?.envVars.read && (
+
+
+
-
-
-
-
-
-
-
+
+ )}
+ {permissions?.monitoring.read && (
+
+
+
+ {data?.serverId && isCloud ? (
+
+ ) : (
+ <>
+
+ >
+ )}
+
+
+
+ )}
+ {permissions?.logs.read && (
+
+
+
+
+
+ )}
-
-
-
-
-
+ {permissions?.service.create && (
+
+
+
+
+
+ )}
)}
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/postgres/[postgresId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/postgres/[postgresId].tsx
index 1d90e3e13..15e91a0bd 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/postgres/[postgresId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/postgres/[postgresId].tsx
@@ -23,7 +23,7 @@ import { UpdatePostgres } from "@/components/dashboard/postgres/update-postgres"
import { ShowDatabaseAdvancedSettings } from "@/components/dashboard/shared/show-database-advanced-settings";
import { PostgresqlIcon } from "@/components/icons/data-tools-icons";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
-import { BreadcrumbSidebar } from "@/components/shared/breadcrumb-sidebar";
+import { AdvanceBreadcrumb } from "@/components/shared/advance-breadcrumb";
import { StatusTooltip } from "@/components/shared/status-tooltip";
import { Badge } from "@/components/ui/badge";
import {
@@ -45,6 +45,7 @@ import { UseKeyboardNav } from "@/hooks/use-keyboard-nav";
import { cn } from "@/lib/utils";
import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
+import { useWhitelabeling } from "@/utils/hooks/use-whitelabeling";
type TabState = "projects" | "monitoring" | "settings" | "backups" | "advanced";
@@ -58,11 +59,14 @@ const Postgresql = (
const [tab, setSab] = useState
(activeTab);
const { data } = api.postgres.one.useQuery({ postgresId });
const { data: auth } = api.user.get.useQuery();
+ const { data: permissions } = api.user.getPermissions.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
const { data: environments } = api.environment.byProjectId.useQuery({
projectId: data?.environment?.projectId || "",
});
+ const { config: whitelabeling } = useWhitelabeling();
+ const appName = whitelabeling?.appName || "Dokploy";
const environmentDropdownItems =
environments?.map((env) => ({
name: env.name,
@@ -72,25 +76,11 @@ const Postgresql = (
return (
-
+
- Database: {data?.name} - {data?.environment?.project?.name} | Dokploy
+ Database: {data?.name} - {data?.environment?.project?.name} |{" "}
+ {appName}
@@ -154,10 +144,10 @@ const Postgresql = (
-
- {(auth?.role === "owner" ||
- auth?.role === "admin" ||
- auth?.canDeleteServices) && (
+ {permissions?.service.create && (
+
+ )}
+ {permissions?.service.delete && (
)}
@@ -211,13 +201,24 @@ const Postgresql = (
)}
>
General
-
Environment
-
Logs
- {((data?.serverId && isCloud) || !data?.server) && (
-
Monitoring
+ {permissions?.envVars.read && (
+
+ Environment
+
)}
+ {permissions?.logs.read && (
+
Logs
+ )}
+ {permissions?.monitoring.read &&
+ ((data?.serverId && isCloud) || !data?.server) && (
+
+ Monitoring
+
+ )}
Backups
-
Advanced
+ {permissions?.service.create && (
+
Advanced
+ )}
@@ -232,44 +233,50 @@ const Postgresql = (
/>
-
-
-
-
-
-
-
-
- {data?.serverId && isCloud ? (
-
- ) : (
- <>
-
- >
- )}
+ {permissions?.envVars.read && (
+
+
+
-
-
-
-
-
-
-
+
+ )}
+ {permissions?.monitoring.read && (
+
+
+
+ {data?.serverId && isCloud ? (
+
+ ) : (
+ <>
+
+ >
+ )}
+
+
+
+ )}
+ {permissions?.logs.read && (
+
+
+
+
+
+ )}
-
-
-
-
-
+ {permissions?.service.create && (
+
+
+
+
+
+ )}
)}
@@ -339,6 +348,7 @@ export async function getServerSideProps(
postgresId: params?.postgresId,
});
await helpers.settings.isCloud.prefetch();
+
return {
props: {
trpcState: helpers.dehydrate(),
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/redis/[redisId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/redis/[redisId].tsx
index 47eb82a74..05a9e0c91 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/redis/[redisId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/environment/[environmentId]/services/redis/[redisId].tsx
@@ -22,7 +22,7 @@ import { UpdateRedis } from "@/components/dashboard/redis/update-redis";
import { ShowDatabaseAdvancedSettings } from "@/components/dashboard/shared/show-database-advanced-settings";
import { RedisIcon } from "@/components/icons/data-tools-icons";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
-import { BreadcrumbSidebar } from "@/components/shared/breadcrumb-sidebar";
+import { AdvanceBreadcrumb } from "@/components/shared/advance-breadcrumb";
import { StatusTooltip } from "@/components/shared/status-tooltip";
import { Badge } from "@/components/ui/badge";
import {
@@ -44,6 +44,7 @@ import { UseKeyboardNav } from "@/hooks/use-keyboard-nav";
import { cn } from "@/lib/utils";
import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
+import { useWhitelabeling } from "@/utils/hooks/use-whitelabeling";
type TabState = "projects" | "monitoring" | "settings" | "advanced";
@@ -58,11 +59,14 @@ const Redis = (
const { data } = api.redis.one.useQuery({ redisId });
const { data: auth } = api.user.get.useQuery();
+ const { data: permissions } = api.user.getPermissions.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
const { data: environments } = api.environment.byProjectId.useQuery({
projectId: data?.environment?.projectId || "",
});
+ const { config: whitelabeling } = useWhitelabeling();
+ const appName = whitelabeling?.appName || "Dokploy";
const environmentDropdownItems =
environments?.map((env) => ({
name: env.name,
@@ -72,25 +76,11 @@ const Redis = (
return (
-
+
- Database: {data?.name} - {data?.environment?.project?.name} | Dokploy
+ Database: {data?.name} - {data?.environment?.project?.name} |{" "}
+ {appName}
@@ -154,10 +144,10 @@ const Redis = (
-
- {(auth?.role === "owner" ||
- auth?.role === "admin" ||
- auth?.canDeleteServices) && (
+ {permissions?.service.create && (
+
+ )}
+ {permissions?.service.delete && (
)}
@@ -209,12 +199,23 @@ const Redis = (
)}
>
General
-
Environment
-
Logs
- {((data?.serverId && isCloud) || !data?.server) && (
-
Monitoring
+ {permissions?.envVars.read && (
+
+ Environment
+
+ )}
+ {permissions?.logs.read && (
+
Logs
+ )}
+ {permissions?.monitoring.read &&
+ ((data?.serverId && isCloud) || !data?.server) && (
+
+ Monitoring
+
+ )}
+ {permissions?.service.create && (
+
Advanced
)}
-
Advanced
@@ -225,25 +226,28 @@ const Redis = (
-
-
-
-
-
-
-
-
- {data?.serverId && isCloud ? (
-
- ) : (
- <>
- {/* {monitoring?.enabledFeatures && (
+ {permissions?.envVars.read && (
+
+
+
+
+
+ )}
+ {permissions?.monitoring.read && (
+
+
+
+ {data?.serverId && isCloud ? (
+
+ ) : (
+ <>
+ {/* {monitoring?.enabledFeatures && (
Change Monitoring
@@ -265,29 +269,37 @@ const Redis = (
/>
) : (
*/}
-
- {/*
*/}
- {/* )} */}
- >
- )}
+
+ {/* */}
+ {/* )} */}
+ >
+ )}
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+ )}
+ {permissions?.logs.read && (
+
+
+
+
+
+ )}
+ {permissions?.service.create && (
+
+
+
+
+
+ )}
)}
diff --git a/apps/dokploy/pages/dashboard/settings/ai.tsx b/apps/dokploy/pages/dashboard/settings/ai.tsx
index 925bc561a..0dc9b203e 100644
--- a/apps/dokploy/pages/dashboard/settings/ai.tsx
+++ b/apps/dokploy/pages/dashboard/settings/ai.tsx
@@ -6,7 +6,6 @@ import superjson from "superjson";
import { AiForm } from "@/components/dashboard/settings/ai-form";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { appRouter } from "@/server/api/root";
-import { getLocale, serverSideTranslations } from "@/utils/i18n";
const Page = () => {
return (
@@ -26,7 +25,6 @@ export async function getServerSideProps(
) {
const { req, res } = ctx;
const { user, session } = await validateRequest(req);
- const locale = getLocale(req.cookies);
const helpers = createServerSideHelpers({
router: appRouter,
@@ -55,7 +53,6 @@ export async function getServerSideProps(
return {
props: {
trpcState: helpers.dehydrate(),
- ...(await serverSideTranslations(locale, ["settings"])),
},
};
}
diff --git a/apps/dokploy/pages/dashboard/settings/audit-logs.tsx b/apps/dokploy/pages/dashboard/settings/audit-logs.tsx
new file mode 100644
index 000000000..1172b2c02
--- /dev/null
+++ b/apps/dokploy/pages/dashboard/settings/audit-logs.tsx
@@ -0,0 +1,66 @@
+import { validateRequest } from "@dokploy/server";
+import { createServerSideHelpers } from "@trpc/react-query/server";
+import type { GetServerSidePropsContext } from "next";
+import type { ReactElement } from "react";
+import superjson from "superjson";
+import { DashboardLayout } from "@/components/layouts/dashboard-layout";
+import { ShowAuditLogs } from "@/components/proprietary/audit-logs/show-audit-logs";
+import { appRouter } from "@/server/api/root";
+
+const Page = () => {
+ return (
+
+
+
+ );
+};
+
+export default Page;
+
+Page.getLayout = (page: ReactElement) => {
+ return
{page} ;
+};
+
+export async function getServerSideProps(ctx: GetServerSidePropsContext) {
+ const { req, res } = ctx;
+ const { user, session } = await validateRequest(req);
+
+ if (!user) {
+ return {
+ redirect: { destination: "/", permanent: true },
+ };
+ }
+
+ const helpers = createServerSideHelpers({
+ router: appRouter,
+ ctx: {
+ req: req as any,
+ res: res as any,
+ db: null as any,
+ session: session as any,
+ user: user as any,
+ },
+ transformer: superjson,
+ });
+
+ try {
+ const userPermissions = await helpers.user.getPermissions.fetch();
+
+ if (!userPermissions?.auditLog.read) {
+ return {
+ redirect: {
+ destination: "/dashboard/settings/profile",
+ permanent: false,
+ },
+ };
+ }
+
+ return {
+ props: {
+ trpcState: helpers.dehydrate(),
+ },
+ };
+ } catch {
+ return { props: {} };
+ }
+}
diff --git a/apps/dokploy/pages/dashboard/settings/git-providers.tsx b/apps/dokploy/pages/dashboard/settings/git-providers.tsx
index 6b54f45a5..492f0b850 100644
--- a/apps/dokploy/pages/dashboard/settings/git-providers.tsx
+++ b/apps/dokploy/pages/dashboard/settings/git-providers.tsx
@@ -48,19 +48,15 @@ export async function getServerSideProps(
try {
await helpers.project.all.prefetch();
await helpers.settings.isCloud.prefetch();
- if (user.role === "member") {
- const userR = await helpers.user.one.fetch({
- userId: user.id,
- });
+ const userPermissions = await helpers.user.getPermissions.fetch();
- if (!userR?.canAccessToGitProviders) {
- return {
- redirect: {
- permanent: true,
- destination: "/",
- },
- };
- }
+ if (!userPermissions?.gitProviders.read) {
+ return {
+ redirect: {
+ permanent: true,
+ destination: "/",
+ },
+ };
}
return {
props: {
diff --git a/apps/dokploy/pages/dashboard/settings/license.tsx b/apps/dokploy/pages/dashboard/settings/license.tsx
index 28e0d54ae..6a0f0f854 100644
--- a/apps/dokploy/pages/dashboard/settings/license.tsx
+++ b/apps/dokploy/pages/dashboard/settings/license.tsx
@@ -7,7 +7,6 @@ import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { LicenseKeySettings } from "@/components/proprietary/license-keys/license-key";
import { Card } from "@/components/ui/card";
import { appRouter } from "@/server/api/root";
-import { getLocale, serverSideTranslations } from "@/utils/i18n";
const Page = () => {
return (
@@ -35,7 +34,6 @@ export async function getServerSideProps(
ctx: GetServerSidePropsContext<{ serviceId: string }>,
) {
const { req, res } = ctx;
- const locale = await getLocale(req.cookies);
const { user, session } = await validateRequest(ctx.req);
if (!user) {
return {
@@ -70,7 +68,6 @@ export async function getServerSideProps(
return {
props: {
trpcState: helpers.dehydrate(),
- ...(await serverSideTranslations(locale, ["settings"])),
},
};
}
diff --git a/apps/dokploy/pages/dashboard/settings/profile.tsx b/apps/dokploy/pages/dashboard/settings/profile.tsx
index 7e0ccdc83..b02d59c0e 100644
--- a/apps/dokploy/pages/dashboard/settings/profile.tsx
+++ b/apps/dokploy/pages/dashboard/settings/profile.tsx
@@ -9,10 +9,9 @@ import { ProfileForm } from "@/components/dashboard/settings/profile/profile-for
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
-import { getLocale, serverSideTranslations } from "@/utils/i18n";
const Page = () => {
- const { data } = api.user.get.useQuery();
+ const { data: permissions } = api.user.getPermissions.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
return (
@@ -20,9 +19,7 @@ const Page = () => {
{isCloud &&
}
- {(data?.canAccessToAPI ||
- data?.role === "owner" ||
- data?.role === "admin") &&
}
+ {permissions?.api.read &&
}
);
@@ -37,7 +34,6 @@ export async function getServerSideProps(
ctx: GetServerSidePropsContext<{ serviceId: string }>,
) {
const { req, res } = ctx;
- const locale = getLocale(req.cookies);
const { user, session } = await validateRequest(req);
const helpers = createServerSideHelpers({
@@ -67,7 +63,6 @@ export async function getServerSideProps(
return {
props: {
trpcState: helpers.dehydrate(),
- ...(await serverSideTranslations(locale, ["settings"])),
},
};
}
diff --git a/apps/dokploy/pages/dashboard/settings/server.tsx b/apps/dokploy/pages/dashboard/settings/server.tsx
index dbe4917dd..eba6c8764 100644
--- a/apps/dokploy/pages/dashboard/settings/server.tsx
+++ b/apps/dokploy/pages/dashboard/settings/server.tsx
@@ -10,7 +10,6 @@ import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { Card } from "@/components/ui/card";
import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
-import { getLocale, serverSideTranslations } from "@/utils/i18n";
const Page = () => {
const { data: user } = api.user.get.useQuery();
@@ -42,7 +41,6 @@ export async function getServerSideProps(
ctx: GetServerSidePropsContext<{ serviceId: string }>,
) {
const { req, res } = ctx;
- const locale = await getLocale(req.cookies);
if (IS_CLOUD) {
return {
redirect: {
@@ -85,7 +83,6 @@ export async function getServerSideProps(
return {
props: {
trpcState: helpers.dehydrate(),
- ...(await serverSideTranslations(locale, ["settings"])),
},
};
}
diff --git a/apps/dokploy/pages/dashboard/settings/servers.tsx b/apps/dokploy/pages/dashboard/settings/servers.tsx
index 5562f460b..9912f1e82 100644
--- a/apps/dokploy/pages/dashboard/settings/servers.tsx
+++ b/apps/dokploy/pages/dashboard/settings/servers.tsx
@@ -6,7 +6,6 @@ import superjson from "superjson";
import { ShowServers } from "@/components/dashboard/settings/servers/show-servers";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { appRouter } from "@/server/api/root";
-import { getLocale, serverSideTranslations } from "@/utils/i18n";
const Page = () => {
return (
@@ -25,7 +24,6 @@ export async function getServerSideProps(
ctx: GetServerSidePropsContext<{ serviceId: string }>,
) {
const { req, res } = ctx;
- const locale = await getLocale(req.cookies);
const { user, session } = await validateRequest(req);
if (!user) {
return {
@@ -61,7 +59,6 @@ export async function getServerSideProps(
return {
props: {
trpcState: helpers.dehydrate(),
- ...(await serverSideTranslations(locale, ["settings"])),
},
};
}
diff --git a/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx b/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx
index 928c45a12..72ac60280 100644
--- a/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx
+++ b/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx
@@ -49,19 +49,15 @@ export async function getServerSideProps(
await helpers.project.all.prefetch();
await helpers.settings.isCloud.prefetch();
- if (user.role === "member") {
- const userR = await helpers.user.one.fetch({
- userId: user.id,
- });
+ const userPermissions = await helpers.user.getPermissions.fetch();
- if (!userR?.canAccessToSSHKeys) {
- return {
- redirect: {
- permanent: true,
- destination: "/",
- },
- };
- }
+ if (!userPermissions?.sshKeys.read) {
+ return {
+ redirect: {
+ permanent: true,
+ destination: "/",
+ },
+ };
}
return {
props: {
diff --git a/apps/dokploy/pages/dashboard/settings/sso.tsx b/apps/dokploy/pages/dashboard/settings/sso.tsx
index 164e2c3da..4203d7725 100644
--- a/apps/dokploy/pages/dashboard/settings/sso.tsx
+++ b/apps/dokploy/pages/dashboard/settings/sso.tsx
@@ -8,7 +8,6 @@ import { EnterpriseFeatureGate } from "@/components/proprietary/enterprise-featu
import { SSOSettings } from "@/components/proprietary/sso/sso-settings";
import { Card } from "@/components/ui/card";
import { appRouter } from "@/server/api/root";
-import { getLocale, serverSideTranslations } from "@/utils/i18n";
const Page = () => {
return (
@@ -43,7 +42,6 @@ Page.getLayout = (page: ReactElement) => {
export async function getServerSideProps(ctx: GetServerSidePropsContext) {
const { req, res } = ctx;
- const locale = await getLocale(req.cookies);
const { user, session } = await validateRequest(ctx.req);
if (!user) {
return {
@@ -78,7 +76,6 @@ export async function getServerSideProps(ctx: GetServerSidePropsContext) {
return {
props: {
trpcState: helpers.dehydrate(),
- ...(await serverSideTranslations(locale, ["settings"])),
},
};
}
diff --git a/apps/dokploy/pages/dashboard/settings/users.tsx b/apps/dokploy/pages/dashboard/settings/users.tsx
index 29941679d..43c014279 100644
--- a/apps/dokploy/pages/dashboard/settings/users.tsx
+++ b/apps/dokploy/pages/dashboard/settings/users.tsx
@@ -3,16 +3,24 @@ import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
import type { ReactElement } from "react";
import superjson from "superjson";
+import { DashboardLayout } from "@/components/layouts/dashboard-layout";
+import { ManageCustomRoles } from "@/components/proprietary/roles/manage-custom-roles";
import { ShowInvitations } from "@/components/dashboard/settings/users/show-invitations";
import { ShowUsers } from "@/components/dashboard/settings/users/show-users";
-import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { appRouter } from "@/server/api/root";
+import { api } from "@/utils/api";
const Page = () => {
+ const { data: auth } = api.user.get.useQuery();
+ const { data: permissions } = api.user.getPermissions.useQuery();
+ const isOwnerOrAdmin = auth?.role === "owner" || auth?.role === "admin";
+ const canCreateMembers = permissions?.member.create ?? false;
+
return (
-
+ {canCreateMembers && }
+ {isOwnerOrAdmin && }
);
};
@@ -28,7 +36,7 @@ export async function getServerSideProps(
const { req, res } = ctx;
const { user, session } = await validateRequest(req);
- if (!user || user.role === "member") {
+ if (!user) {
return {
redirect: {
permanent: true,
@@ -48,12 +56,30 @@ export async function getServerSideProps(
},
transformer: superjson,
});
- await helpers.user.get.prefetch();
- await helpers.settings.isCloud.prefetch();
- return {
- props: {
- trpcState: helpers.dehydrate(),
- },
- };
+ try {
+ await helpers.user.get.prefetch();
+ await helpers.settings.isCloud.prefetch();
+
+ const userPermissions = await helpers.user.getPermissions.fetch();
+
+ if (!userPermissions?.member.read) {
+ return {
+ redirect: {
+ permanent: true,
+ destination: "/",
+ },
+ };
+ }
+
+ return {
+ props: {
+ trpcState: helpers.dehydrate(),
+ },
+ };
+ } catch {
+ return {
+ props: {},
+ };
+ }
}
diff --git a/apps/dokploy/pages/dashboard/settings/whitelabeling.tsx b/apps/dokploy/pages/dashboard/settings/whitelabeling.tsx
new file mode 100644
index 000000000..09d5e3e20
--- /dev/null
+++ b/apps/dokploy/pages/dashboard/settings/whitelabeling.tsx
@@ -0,0 +1,81 @@
+import { validateRequest } from "@dokploy/server";
+import { createServerSideHelpers } from "@trpc/react-query/server";
+import type { GetServerSidePropsContext } from "next";
+import type { ReactElement } from "react";
+import superjson from "superjson";
+import { DashboardLayout } from "@/components/layouts/dashboard-layout";
+import { EnterpriseFeatureGate } from "@/components/proprietary/enterprise-feature-gate";
+import { WhitelabelingSettings } from "@/components/proprietary/whitelabeling/whitelabeling-settings";
+import { Card } from "@/components/ui/card";
+import { appRouter } from "@/server/api/root";
+
+const Page = () => {
+ return (
+
+ );
+};
+
+export default Page;
+
+Page.getLayout = (page: ReactElement) => {
+ return {page} ;
+};
+
+export async function getServerSideProps(ctx: GetServerSidePropsContext) {
+ const { req, res } = ctx;
+ const { user, session } = await validateRequest(ctx.req);
+ if (!user) {
+ return {
+ redirect: {
+ permanent: true,
+ destination: "/",
+ },
+ };
+ }
+ if (user.role !== "owner") {
+ return {
+ redirect: {
+ permanent: true,
+ destination: "/dashboard/settings/profile",
+ },
+ };
+ }
+
+ const helpers = createServerSideHelpers({
+ router: appRouter,
+ ctx: {
+ req: req as any,
+ res: res as any,
+ db: null as any,
+ session: session as any,
+ user: user as any,
+ },
+ transformer: superjson,
+ });
+ await helpers.user.get.prefetch();
+
+ return {
+ props: {
+ trpcState: helpers.dehydrate(),
+ },
+ };
+}
diff --git a/apps/dokploy/pages/dashboard/swarm.tsx b/apps/dokploy/pages/dashboard/swarm.tsx
index 0711d843e..3ded13c28 100644
--- a/apps/dokploy/pages/dashboard/swarm.tsx
+++ b/apps/dokploy/pages/dashboard/swarm.tsx
@@ -53,19 +53,15 @@ export async function getServerSideProps(
try {
await helpers.project.all.prefetch();
- if (user.role === "member") {
- const userR = await helpers.user.one.fetch({
- userId: user.id,
- });
+ const userPermissions = await helpers.user.getPermissions.fetch();
- if (!userR?.canAccessToDocker) {
- return {
- redirect: {
- permanent: true,
- destination: "/",
- },
- };
- }
+ if (!userPermissions?.docker.read) {
+ return {
+ redirect: {
+ permanent: true,
+ destination: "/",
+ },
+ };
}
return {
props: {
diff --git a/apps/dokploy/pages/dashboard/traefik.tsx b/apps/dokploy/pages/dashboard/traefik.tsx
index d46eb63a7..7342de6e4 100644
--- a/apps/dokploy/pages/dashboard/traefik.tsx
+++ b/apps/dokploy/pages/dashboard/traefik.tsx
@@ -53,19 +53,15 @@ export async function getServerSideProps(
try {
await helpers.project.all.prefetch();
- if (user.role === "member") {
- const userR = await helpers.user.one.fetch({
- userId: user.id,
- });
+ const userPermissions = await helpers.user.getPermissions.fetch();
- if (!userR?.canAccessToTraefikFiles) {
- return {
- redirect: {
- permanent: true,
- destination: "/",
- },
- };
- }
+ if (!userPermissions?.traefikFiles.read) {
+ return {
+ redirect: {
+ permanent: true,
+ destination: "/",
+ },
+ };
}
return {
props: {
diff --git a/apps/dokploy/pages/index.tsx b/apps/dokploy/pages/index.tsx
index de4294581..e589da3b6 100644
--- a/apps/dokploy/pages/index.tsx
+++ b/apps/dokploy/pages/index.tsx
@@ -1,6 +1,6 @@
import { IS_CLOUD, isAdminPresent } from "@dokploy/server";
import { validateRequest } from "@dokploy/server/lib/auth";
-import { zodResolver } from "@hookform/resolvers/zod";
+import { standardSchemaResolver as zodResolver } from "@hookform/resolvers/standard-schema";
import { REGEXP_ONLY_DIGITS } from "input-otp";
import type { GetServerSidePropsContext } from "next";
import Link from "next/link";
@@ -41,6 +41,7 @@ import {
import { Label } from "@/components/ui/label";
import { authClient } from "@/lib/auth-client";
import { api } from "@/utils/api";
+import { useWhitelabelingPublic } from "@/utils/hooks/use-whitelabeling";
const LoginSchema = z.object({
email: z.string().email(),
@@ -58,6 +59,7 @@ interface Props {
}
export default function Home({ IS_CLOUD }: Props) {
const router = useRouter();
+ const { config: whitelabeling } = useWhitelabelingPublic();
const { data: showSignInWithSSO } = api.sso.showSignInWithSSO.useQuery();
const [isLoginLoading, setIsLoginLoading] = useState(false);
const [isTwoFactorLoading, setIsTwoFactorLoading] = useState(false);
@@ -105,7 +107,6 @@ export default function Home({ IS_CLOUD }: Props) {
setIsLoginLoading(false);
}
};
-
const onTwoFactorSubmit = async (e: React.FormEvent) => {
e.preventDefault();
if (twoFactorCode.length !== 6) {
@@ -217,7 +218,14 @@ export default function Home({ IS_CLOUD }: Props) {
-
+
Sign in
@@ -254,7 +262,6 @@ export default function Home({ IS_CLOUD }: Props) {
onChange={setTwoFactorCode}
maxLength={6}
pattern={REGEXP_ONLY_DIGITS}
- autoComplete="off"
autoFocus
>
diff --git a/apps/dokploy/pages/invitation.tsx b/apps/dokploy/pages/invitation.tsx
index a6df106e7..7d54793d4 100644
--- a/apps/dokploy/pages/invitation.tsx
+++ b/apps/dokploy/pages/invitation.tsx
@@ -1,5 +1,5 @@
import { getUserByToken, IS_CLOUD } from "@dokploy/server";
-import { zodResolver } from "@hookform/resolvers/zod";
+import { standardSchemaResolver as zodResolver } from "@hookform/resolvers/standard-schema";
import type { GetServerSidePropsContext } from "next";
import Link from "next/link";
import { useRouter } from "next/router";
@@ -23,6 +23,7 @@ import {
import { Input } from "@/components/ui/input";
import { authClient } from "@/lib/auth-client";
import { api } from "@/utils/api";
+import { useWhitelabelingPublic } from "@/utils/hooks/use-whitelabeling";
const registerSchema = z
.object({
@@ -82,6 +83,7 @@ const Invitation = ({
userAlreadyExists,
}: Props) => {
const router = useRouter();
+ const { config: whitelabeling } = useWhitelabelingPublic();
const { data } = api.user.getUserByToken.useQuery(
{
token,
@@ -148,12 +150,15 @@ const Invitation = ({
-
-
+
+
Invitation
diff --git a/apps/dokploy/pages/register.tsx b/apps/dokploy/pages/register.tsx
index d41749d4d..53ffe2505 100644
--- a/apps/dokploy/pages/register.tsx
+++ b/apps/dokploy/pages/register.tsx
@@ -1,5 +1,5 @@
import { IS_CLOUD, isAdminPresent, validateRequest } from "@dokploy/server";
-import { zodResolver } from "@hookform/resolvers/zod";
+import { standardSchemaResolver as zodResolver } from "@hookform/resolvers/standard-schema";
import { AlertTriangle } from "lucide-react";
import type { GetServerSidePropsContext } from "next";
import Link from "next/link";
@@ -25,6 +25,7 @@ import {
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { authClient } from "@/lib/auth-client";
+import { useWhitelabelingPublic } from "@/utils/hooks/use-whitelabeling";
const registerSchema = z
.object({
@@ -77,6 +78,7 @@ interface Props {
const Register = ({ isCloud }: Props) => {
const router = useRouter();
+ const { config: whitelabeling } = useWhitelabelingPublic();
const [isError, setIsError] = useState(false);
const [error, setError] = useState
(null);
const [data, setData] = useState(null);
@@ -123,12 +125,15 @@ const Register = ({ isCloud }: Props) => {
-
-
+
+
{isCloud ? "Sign Up" : "Setup the server"}
diff --git a/apps/dokploy/pages/reset-password.tsx b/apps/dokploy/pages/reset-password.tsx
index a11738557..3bc5593b0 100644
--- a/apps/dokploy/pages/reset-password.tsx
+++ b/apps/dokploy/pages/reset-password.tsx
@@ -1,5 +1,5 @@
import { IS_CLOUD } from "@dokploy/server";
-import { zodResolver } from "@hookform/resolvers/zod";
+import { standardSchemaResolver as zodResolver } from "@hookform/resolvers/standard-schema";
import type { GetServerSidePropsContext } from "next";
import Link from "next/link";
import { useRouter } from "next/router";
@@ -22,6 +22,7 @@ import {
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { authClient } from "@/lib/auth-client";
+import { useWhitelabelingPublic } from "@/utils/hooks/use-whitelabeling";
const loginSchema = z
.object({
@@ -53,6 +54,7 @@ interface Props {
tokenResetPassword: string;
}
export default function Home({ tokenResetPassword }: Props) {
+ const { config: whitelabeling } = useWhitelabelingPublic();
const [token, setToken] = useState
(tokenResetPassword);
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState(null);
@@ -97,7 +99,14 @@ export default function Home({ tokenResetPassword }: Props) {
-
+
Reset Password
diff --git a/apps/dokploy/pages/send-reset-password.tsx b/apps/dokploy/pages/send-reset-password.tsx
index 739c45cd8..8fa6be81f 100644
--- a/apps/dokploy/pages/send-reset-password.tsx
+++ b/apps/dokploy/pages/send-reset-password.tsx
@@ -1,5 +1,5 @@
import { IS_CLOUD } from "@dokploy/server";
-import { zodResolver } from "@hookform/resolvers/zod";
+import { standardSchemaResolver as zodResolver } from "@hookform/resolvers/standard-schema";
import type { GetServerSidePropsContext } from "next";
import Link from "next/link";
import { useRouter } from "next/router";
@@ -22,6 +22,7 @@ import {
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { authClient } from "@/lib/auth-client";
+import { useWhitelabelingPublic } from "@/utils/hooks/use-whitelabeling";
const loginSchema = z.object({
email: z
@@ -42,6 +43,7 @@ type AuthResponse = {
};
export default function Home() {
+ const { config: whitelabeling } = useWhitelabelingPublic();
const [temp, _setTemp] = useState
({
is2FAEnabled: false,
authId: "",
@@ -81,8 +83,14 @@ export default function Home() {
-
-
Dokploy
+
+
+ {whitelabeling?.appName || "Dokploy"}
+
Reset Password
diff --git a/apps/dokploy/pages/swagger.tsx b/apps/dokploy/pages/swagger.tsx
index cc01cd342..b461a85ec 100644
--- a/apps/dokploy/pages/swagger.tsx
+++ b/apps/dokploy/pages/swagger.tsx
@@ -17,13 +17,19 @@ const Home: NextPage = () => {
useEffect(() => {
if (data) {
const protocolAndHost = `${window.location.protocol}//${window.location.host}/api`;
+ // Force OpenAPI 3.0 so Swagger UI uses the 3.0 parser (avoids ApiDOM 3.1 refract bug)
const newSpec = {
...data,
+ openapi: "3.0.3",
servers: [{ url: protocolAndHost }],
externalDocs: {
- url: `${protocolAndHost}/settings.getOpenApiDocument`,
+ url: `${protocolAndHost}/trpc/settings.getOpenApiDocument`,
},
};
+ // Remove 3.1-only fields that could confuse the 3.0 parser
+ if ("jsonSchemaDialect" in newSpec) {
+ delete (newSpec as Record).jsonSchemaDialect;
+ }
setSpec(newSpec);
}
}, [data]);
@@ -92,19 +98,15 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
},
transformer: superjson,
});
- if (user.role === "member") {
- const userR = await helpers.user.one.fetch({
- userId: user.id,
- });
+ const userPermissions = await helpers.user.getPermissions.fetch();
- if (!userR?.canAccessToAPI) {
- return {
- redirect: {
- permanent: true,
- destination: "/",
- },
- };
- }
+ if (!userPermissions?.api.read) {
+ return {
+ redirect: {
+ permanent: true,
+ destination: "/",
+ },
+ };
}
return {
diff --git a/apps/dokploy/proprietary/README.md b/apps/dokploy/proprietary/README.md
deleted file mode 100644
index b1af288e6..000000000
--- a/apps/dokploy/proprietary/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Proprietary Features
-
-This directory contains all proprietary functionality of Dokploy.
-
-## Purpose
-
-This folder will house all **paid features** and premium functionality that are not part of the open source code.
-
-## License
-
-The code in this directory is under Dokploy's proprietary license. See [LICENSE_PROPRIETARY.md](../../../LICENSE_PROPRIETARY.md) for more details.
-
-## Contact
-
-If you want to learn more about our paid features or have any questions, please contact us at:
-
-- Email: [sales@dokploy.com](mailto:sales@dokploy.com)
-- Contact Form: [https://dokploy.com/contact](https://dokploy.com/contact)
diff --git a/apps/dokploy/server/api/root.ts b/apps/dokploy/server/api/root.ts
index 8581e8279..1d05e9c21 100644
--- a/apps/dokploy/server/api/root.ts
+++ b/apps/dokploy/server/api/root.ts
@@ -22,12 +22,16 @@ import { mountRouter } from "./routers/mount";
import { mysqlRouter } from "./routers/mysql";
import { notificationRouter } from "./routers/notification";
import { organizationRouter } from "./routers/organization";
+import { patchRouter } from "./routers/patch";
import { portRouter } from "./routers/port";
import { postgresRouter } from "./routers/postgres";
import { previewDeploymentRouter } from "./routers/preview-deployment";
import { projectRouter } from "./routers/project";
+import { auditLogRouter } from "./routers/proprietary/audit-log";
+import { customRoleRouter } from "./routers/proprietary/custom-role";
import { licenseKeyRouter } from "./routers/proprietary/license-key";
import { ssoRouter } from "./routers/proprietary/sso";
+import { whitelabelingRouter } from "./routers/proprietary/whitelabeling";
import { redirectsRouter } from "./routers/redirects";
import { redisRouter } from "./routers/redis";
import { registryRouter } from "./routers/registry";
@@ -87,11 +91,15 @@ export const appRouter = createTRPCRouter({
organization: organizationRouter,
licenseKey: licenseKeyRouter,
sso: ssoRouter,
+ whitelabeling: whitelabelingRouter,
+ customRole: customRoleRouter,
+ auditLog: auditLogRouter,
schedule: scheduleRouter,
rollback: rollbackRouter,
volumeBackups: volumeBackupsRouter,
environment: environmentRouter,
tag: tagRouter,
+ patch: patchRouter,
});
// export type definition of API
diff --git a/apps/dokploy/server/api/routers/ai.ts b/apps/dokploy/server/api/routers/ai.ts
index ff2d1ee8a..b46fcf99a 100644
--- a/apps/dokploy/server/api/routers/ai.ts
+++ b/apps/dokploy/server/api/routers/ai.ts
@@ -21,7 +21,7 @@ import { findProjectById } from "@dokploy/server/services/project";
import {
addNewService,
checkServiceAccess,
-} from "@dokploy/server/services/user";
+} from "@dokploy/server/services/permission";
import {
getProviderHeaders,
getProviderName,
@@ -38,17 +38,10 @@ import {
import { generatePassword } from "@/templates/utils";
export const aiRouter = createTRPCRouter({
- one: protectedProcedure
+ one: adminProcedure
.input(z.object({ aiId: z.string() }))
- .query(async ({ ctx, input }) => {
- const aiSetting = await getAiSettingById(input.aiId);
- if (aiSetting.organizationId !== ctx.session.activeOrganizationId) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You don't have access to this AI configuration",
- });
- }
- return aiSetting;
+ .query(async ({ input }) => {
+ return await getAiSettingById(input.aiId);
}),
getModels: protectedProcedure
@@ -159,11 +152,9 @@ export const aiRouter = createTRPCRouter({
return await saveAiSettings(ctx.session.activeOrganizationId, input);
}),
- update: protectedProcedure
- .input(apiUpdateAi)
- .mutation(async ({ ctx, input }) => {
- return await saveAiSettings(ctx.session.activeOrganizationId, input);
- }),
+ update: adminProcedure.input(apiUpdateAi).mutation(async ({ ctx, input }) => {
+ return await saveAiSettings(ctx.session.activeOrganizationId, input);
+ }),
getAll: adminProcedure.query(async ({ ctx }) => {
return await getAiSettingsByOrganizationId(
@@ -171,29 +162,15 @@ export const aiRouter = createTRPCRouter({
);
}),
- get: protectedProcedure
+ get: adminProcedure
.input(z.object({ aiId: z.string() }))
- .query(async ({ ctx, input }) => {
- const aiSetting = await getAiSettingById(input.aiId);
- if (aiSetting.organizationId !== ctx.session.activeOrganizationId) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You don't have access to this AI configuration",
- });
- }
- return aiSetting;
+ .query(async ({ input }) => {
+ return await getAiSettingById(input.aiId);
}),
- delete: protectedProcedure
+ delete: adminProcedure
.input(z.object({ aiId: z.string() }))
- .mutation(async ({ ctx, input }) => {
- const aiSetting = await getAiSettingById(input.aiId);
- if (aiSetting.organizationId !== ctx.session.activeOrganizationId) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You don't have access to this AI configuration",
- });
- }
+ .mutation(async ({ input }) => {
return await deleteAiSettings(input.aiId);
}),
@@ -223,13 +200,7 @@ export const aiRouter = createTRPCRouter({
.mutation(async ({ ctx, input }) => {
const environment = await findEnvironmentById(input.environmentId);
const project = await findProjectById(environment.projectId);
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.session.activeOrganizationId,
- environment.projectId,
- "create",
- );
- }
+ await checkServiceAccess(ctx, environment.projectId, "create");
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
@@ -275,13 +246,7 @@ export const aiRouter = createTRPCRouter({
}
}
- if (ctx.user.role === "member") {
- await addNewService(
- ctx.session.activeOrganizationId,
- ctx.user.ownerId,
- compose.composeId,
- );
- }
+ await addNewService(ctx, compose.composeId);
return null;
}),
diff --git a/apps/dokploy/server/api/routers/application.ts b/apps/dokploy/server/api/routers/application.ts
index 9240a1cb3..51b1d00bc 100644
--- a/apps/dokploy/server/api/routers/application.ts
+++ b/apps/dokploy/server/api/routers/application.ts
@@ -1,6 +1,5 @@
import {
- addNewService,
- checkServiceAccess,
+ clearOldDeployments,
createApplication,
deleteAllMiddlewares,
findApplicationById,
@@ -27,18 +26,25 @@ import {
updateDeploymentStatus,
writeConfig,
writeConfigRemote,
- // uploadFileSchema
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
+import {
+ addNewService,
+ checkServiceAccess,
+ checkServicePermissionAndAccess,
+ findMemberByUserId,
+} from "@dokploy/server/services/permission";
import { TRPCError } from "@trpc/server";
-import { eq } from "drizzle-orm";
+import { and, desc, eq, ilike, or, sql } from "drizzle-orm";
import { nanoid } from "nanoid";
import { z } from "zod";
+import { zfd } from "zod-form-data";
import {
createTRPCRouter,
protectedProcedure,
- uploadProcedure,
+ withPermission,
} from "@/server/api/trpc";
-import { db } from "@/server/db";
+import { audit } from "@/server/api/utils/audit";
import {
apiCreateApplication,
apiDeployApplication,
@@ -56,6 +62,8 @@ import {
apiSaveGitProvider,
apiUpdateApplication,
applications,
+ environments,
+ projects,
} from "@/server/db/schema";
import { deploymentWorker } from "@/server/queues/deployments-queue";
import type { DeploymentJob } from "@/server/queues/queue-types";
@@ -66,25 +74,16 @@ import {
myQueue,
} from "@/server/queues/queueSetup";
import { cancelDeployment, deploy } from "@/server/utils/deploy";
-import { uploadFileSchema } from "@/utils/schema";
export const applicationRouter = createTRPCRouter({
create: protectedProcedure
.input(apiCreateApplication)
.mutation(async ({ input, ctx }) => {
try {
- // Get project from environment
const environment = await findEnvironmentById(input.environmentId);
const project = await findProjectById(environment.projectId);
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- project.projectId,
- ctx.session.activeOrganizationId,
- "create",
- );
- }
+ await checkServiceAccess(ctx, project.projectId, "create");
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
@@ -102,13 +101,13 @@ export const applicationRouter = createTRPCRouter({
const newApplication = await createApplication(input);
- if (ctx.user.role === "member") {
- await addNewService(
- ctx.user.id,
- newApplication.applicationId,
- project.organizationId,
- );
- }
+ await addNewService(ctx, newApplication.applicationId);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "service",
+ resourceId: newApplication.applicationId,
+ resourceName: newApplication.appName,
+ });
return newApplication;
} catch (error: unknown) {
console.log("error", error);
@@ -125,14 +124,7 @@ export const applicationRouter = createTRPCRouter({
one: protectedProcedure
.input(apiFindOneApplication)
.query(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.applicationId,
- ctx.session.activeOrganizationId,
- "access",
- );
- }
+ await checkServiceAccess(ctx, input.applicationId, "read");
const application = await findApplicationById(input.applicationId);
if (
application.environment.project.organizationId !==
@@ -187,22 +179,21 @@ export const applicationRouter = createTRPCRouter({
reload: protectedProcedure
.input(apiReloadApplication)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ deployment: ["create"],
+ });
const application = await findApplicationById(input.applicationId);
try {
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to reload this application",
- });
- }
-
await updateApplicationStatus(input.applicationId, "idle");
await mechanizeDockerContainer(application);
await updateApplicationStatus(input.applicationId, "done");
+ await audit(ctx, {
+ action: "reload",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
} catch (error) {
await updateApplicationStatus(input.applicationId, "error");
@@ -217,14 +208,7 @@ export const applicationRouter = createTRPCRouter({
delete: protectedProcedure
.input(apiFindOneApplication)
.mutation(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.applicationId,
- ctx.session.activeOrganizationId,
- "delete",
- );
- }
+ await checkServiceAccess(ctx, input.applicationId, "delete");
const application = await findApplicationById(input.applicationId);
if (
@@ -273,69 +257,66 @@ export const applicationRouter = createTRPCRouter({
} catch (_) {}
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "service",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return application;
}),
stop: protectedProcedure
.input(apiFindOneApplication)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ deployment: ["create"],
+ });
const service = await findApplicationById(input.applicationId);
- if (
- service.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to stop this application",
- });
- }
if (service.serverId) {
await stopServiceRemote(service.serverId, service.appName);
} else {
await stopService(service.appName);
}
await updateApplicationStatus(input.applicationId, "idle");
-
+ await audit(ctx, {
+ action: "stop",
+ resourceType: "application",
+ resourceId: service.applicationId,
+ resourceName: service.appName,
+ });
return service;
}),
start: protectedProcedure
.input(apiFindOneApplication)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ deployment: ["create"],
+ });
const service = await findApplicationById(input.applicationId);
- if (
- service.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to start this application",
- });
- }
-
if (service.serverId) {
await startServiceRemote(service.serverId, service.appName);
} else {
await startService(service.appName);
}
await updateApplicationStatus(input.applicationId, "done");
-
+ await audit(ctx, {
+ action: "start",
+ resourceType: "application",
+ resourceId: service.applicationId,
+ resourceName: service.appName,
+ });
return service;
}),
redeploy: protectedProcedure
.input(apiRedeployApplication)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ deployment: ["create"],
+ });
const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to redeploy this application",
- });
- }
const jobData: DeploymentJob = {
applicationId: input.applicationId,
titleLog: input.title || "Rebuild deployment",
@@ -350,6 +331,12 @@ export const applicationRouter = createTRPCRouter({
deploy(jobData).catch((error) => {
console.error("Background deployment failed:", error);
});
+ await audit(ctx, {
+ action: "rebuild",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}
await myQueue.add(
@@ -360,41 +347,40 @@ export const applicationRouter = createTRPCRouter({
removeOnFail: true,
},
);
+ await audit(ctx, {
+ action: "rebuild",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
}),
saveEnvironment: protectedProcedure
.input(apiSaveEnvironmentVariables)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this environment",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ envVars: ["write"],
+ });
await updateApplication(input.applicationId, {
env: input.env,
buildArgs: input.buildArgs,
buildSecrets: input.buildSecrets,
createEnvFile: input.createEnvFile,
});
+ const application = await findApplicationById(input.applicationId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}),
saveBuildType: protectedProcedure
.input(apiSaveBuildType)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this build type",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
await updateApplication(input.applicationId, {
buildType: input.buildType,
dockerfile: input.dockerfile,
@@ -405,22 +391,21 @@ export const applicationRouter = createTRPCRouter({
isStaticSpa: input.isStaticSpa,
railpackVersion: input.railpackVersion,
});
-
+ const application = await findApplicationById(input.applicationId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}),
saveGithubProvider: protectedProcedure
.input(apiSaveGithubProvider)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this github provider",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
await updateApplication(input.applicationId, {
repository: input.repository,
branch: input.branch,
@@ -433,22 +418,21 @@ export const applicationRouter = createTRPCRouter({
triggerType: input.triggerType,
enableSubmodules: input.enableSubmodules,
});
-
+ const application = await findApplicationById(input.applicationId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}),
saveGitlabProvider: protectedProcedure
.input(apiSaveGitlabProvider)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this gitlab provider",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
await updateApplication(input.applicationId, {
gitlabRepository: input.gitlabRepository,
gitlabOwner: input.gitlabOwner,
@@ -462,22 +446,21 @@ export const applicationRouter = createTRPCRouter({
watchPaths: input.watchPaths,
enableSubmodules: input.enableSubmodules,
});
-
+ const application = await findApplicationById(input.applicationId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}),
saveBitbucketProvider: protectedProcedure
.input(apiSaveBitbucketProvider)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this bitbucket provider",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
await updateApplication(input.applicationId, {
bitbucketRepository: input.bitbucketRepository,
bitbucketRepositorySlug: input.bitbucketRepositorySlug,
@@ -490,22 +473,21 @@ export const applicationRouter = createTRPCRouter({
watchPaths: input.watchPaths,
enableSubmodules: input.enableSubmodules,
});
-
+ const application = await findApplicationById(input.applicationId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}),
saveGiteaProvider: protectedProcedure
.input(apiSaveGiteaProvider)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this gitea provider",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
await updateApplication(input.applicationId, {
giteaRepository: input.giteaRepository,
giteaOwner: input.giteaOwner,
@@ -517,22 +499,21 @@ export const applicationRouter = createTRPCRouter({
watchPaths: input.watchPaths,
enableSubmodules: input.enableSubmodules,
});
-
+ const application = await findApplicationById(input.applicationId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}),
saveDockerProvider: protectedProcedure
.input(apiSaveDockerProvider)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this docker provider",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
await updateApplication(input.applicationId, {
dockerImage: input.dockerImage,
username: input.username,
@@ -541,22 +522,21 @@ export const applicationRouter = createTRPCRouter({
applicationStatus: "idle",
registryUrl: input.registryUrl,
});
-
+ const application = await findApplicationById(input.applicationId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}),
saveGitProvider: protectedProcedure
.input(apiSaveGitProvider)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this git provider",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
await updateApplication(input.applicationId, {
customGitBranch: input.customGitBranch,
customGitBuildPath: input.customGitBuildPath,
@@ -567,26 +547,22 @@ export const applicationRouter = createTRPCRouter({
watchPaths: input.watchPaths,
enableSubmodules: input.enableSubmodules,
});
-
+ const application = await findApplicationById(input.applicationId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}),
disconnectGitProvider: protectedProcedure
.input(apiFindOneApplication)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to disconnect this git provider",
- });
- }
-
- // Reset all git provider related fields
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
await updateApplication(input.applicationId, {
- // GitHub fields
repository: null,
branch: null,
owner: null,
@@ -594,7 +570,6 @@ export const applicationRouter = createTRPCRouter({
githubId: null,
triggerType: "push",
- // GitLab fields
gitlabRepository: null,
gitlabOwner: null,
gitlabBranch: null,
@@ -603,63 +578,58 @@ export const applicationRouter = createTRPCRouter({
gitlabProjectId: null,
gitlabPathNamespace: null,
- // Bitbucket fields
bitbucketRepository: null,
bitbucketOwner: null,
bitbucketBranch: null,
bitbucketBuildPath: null,
bitbucketId: null,
- // Gitea fields
giteaRepository: null,
giteaOwner: null,
giteaBranch: null,
giteaBuildPath: null,
giteaId: null,
- // Custom Git fields
customGitBranch: null,
customGitBuildPath: null,
customGitUrl: null,
customGitSSHKeyId: null,
- // Common fields
sourceType: "github", // Reset to default
applicationStatus: "idle",
watchPaths: null,
enableSubmodules: false,
});
-
+ const application = await findApplicationById(input.applicationId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}),
markRunning: protectedProcedure
.input(apiFindOneApplication)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to mark this application as running",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ deployment: ["create"],
+ });
await updateApplicationStatus(input.applicationId, "running");
+ const application = await findApplicationById(input.applicationId);
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
}),
update: protectedProcedure
.input(apiUpdateApplication)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to update this application",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
const { applicationId, ...rest } = input;
const updateApp = await updateApplication(applicationId, {
...rest,
@@ -671,40 +641,39 @@ export const applicationRouter = createTRPCRouter({
message: "Error updating application",
});
}
-
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: updateApp.applicationId,
+ resourceName: updateApp.appName,
+ });
return true;
}),
refreshToken: protectedProcedure
.input(apiFindOneApplication)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to refresh this application",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
await updateApplication(input.applicationId, {
refreshToken: nanoid(),
});
+ const application = await findApplicationById(input.applicationId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}),
deploy: protectedProcedure
.input(apiDeployApplication)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ deployment: ["create"],
+ });
const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this application",
- });
- }
const jobData: DeploymentJob = {
applicationId: input.applicationId,
titleLog: input.title || "Manual deployment",
@@ -718,7 +687,12 @@ export const applicationRouter = createTRPCRouter({
deploy(jobData).catch((error) => {
console.error("Background deployment failed:", error);
});
-
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}
await myQueue.add(
@@ -729,52 +703,60 @@ export const applicationRouter = createTRPCRouter({
removeOnFail: true,
},
);
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
}),
cleanQueues: protectedProcedure
.input(apiFindOneApplication)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to clean this application",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ deployment: ["cancel"],
+ });
await cleanQueuesByApplication(input.applicationId);
}),
+ clearDeployments: protectedProcedure
+ .input(apiFindOneApplication)
+ .mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ deployment: ["create"],
+ });
+ const application = await findApplicationById(input.applicationId);
+ await clearOldDeployments(application.appName, application.serverId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
+ return true;
+ }),
killBuild: protectedProcedure
.input(apiFindOneApplication)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ deployment: ["cancel"],
+ });
const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to kill this build",
- });
- }
await killDockerBuild("application", application.serverId);
+ await audit(ctx, {
+ action: "stop",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
}),
readTraefikConfig: protectedProcedure
.input(apiFindOneApplication)
.query(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ traefikFiles: ["read"],
+ });
const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to read this application",
- });
- }
-
let traefikConfig = null;
if (application.serverId) {
traefikConfig = await readRemoteConfig(
@@ -788,34 +770,26 @@ export const applicationRouter = createTRPCRouter({
}),
dropDeployment: protectedProcedure
- .meta({
- openapi: {
- path: "/drop-deployment",
- method: "POST",
- override: true,
- enabled: false,
- },
- })
- .use(uploadProcedure)
- .input(uploadFileSchema)
+ .input(
+ zfd.formData({
+ applicationId: z.string(),
+ zip: zfd.file(),
+ dropBuildPath: z.string().optional(),
+ }),
+ )
.mutation(async ({ input, ctx }) => {
const zipFile = input.zip;
+ const applicationId = input.applicationId;
+ const dropBuildPath = input.dropBuildPath ?? null;
- const app = await findApplicationById(input.applicationId as string);
+ await checkServicePermissionAndAccess(ctx, applicationId, {
+ deployment: ["create"],
+ });
+ const app = await findApplicationById(applicationId);
- if (
- app.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this application",
- });
- }
-
- await updateApplication(input.applicationId as string, {
+ await updateApplication(applicationId, {
sourceType: "drop",
- dropBuildPath: input.dropBuildPath || "",
+ dropBuildPath: dropBuildPath || "",
});
await unzipDrop(zipFile, app);
@@ -843,23 +817,21 @@ export const applicationRouter = createTRPCRouter({
removeOnFail: true,
},
);
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "application",
+ resourceId: app.applicationId,
+ resourceName: app.appName,
+ });
return true;
}),
updateTraefikConfig: protectedProcedure
.input(z.object({ applicationId: z.string(), traefikConfig: z.string() }))
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ traefikFiles: ["write"],
+ });
const application = await findApplicationById(input.applicationId);
-
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to update this application",
- });
- }
-
if (application.serverId) {
await writeConfigRemote(
application.serverId,
@@ -869,9 +841,15 @@ export const applicationRouter = createTRPCRouter({
} else {
writeConfig(application.appName, input.traefikConfig);
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return true;
}),
- readAppMonitoring: protectedProcedure
+ readAppMonitoring: withPermission("monitoring", "read")
.input(apiFindMonitoringStats)
.query(async ({ input }) => {
if (IS_CLOUD) {
@@ -892,31 +870,10 @@ export const applicationRouter = createTRPCRouter({
}),
)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move this application",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
- const targetEnvironment = await findEnvironmentById(
- input.targetEnvironmentId,
- );
- if (
- targetEnvironment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move to this environment",
- });
- }
-
- // Update the application's projectId
const updatedApplication = await db
.update(applications)
.set({
@@ -932,23 +889,22 @@ export const applicationRouter = createTRPCRouter({
message: "Failed to move application",
});
}
-
+ await audit(ctx, {
+ action: "update",
+ resourceType: "application",
+ resourceId: updatedApplication.applicationId,
+ resourceName: updatedApplication.appName,
+ });
return updatedApplication;
}),
cancelDeployment: protectedProcedure
.input(apiFindOneApplication)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ deployment: ["cancel"],
+ });
const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to cancel this deployment",
- });
- }
if (IS_CLOUD && application.serverId) {
try {
@@ -965,7 +921,12 @@ export const applicationRouter = createTRPCRouter({
applicationId: input.applicationId,
applicationType: "application",
});
-
+ await audit(ctx, {
+ action: "stop",
+ resourceType: "application",
+ resourceId: application.applicationId,
+ resourceName: application.appName,
+ });
return {
success: true,
message: "Deployment cancellation requested",
@@ -986,4 +947,136 @@ export const applicationRouter = createTRPCRouter({
message: "Deployment cancellation only available in cloud version",
});
}),
+
+ search: protectedProcedure
+ .input(
+ z.object({
+ q: z.string().optional(),
+ name: z.string().optional(),
+ appName: z.string().optional(),
+ description: z.string().optional(),
+ repository: z.string().optional(),
+ owner: z.string().optional(),
+ dockerImage: z.string().optional(),
+ projectId: z.string().optional(),
+ environmentId: z.string().optional(),
+ limit: z.number().min(1).max(100).default(20),
+ offset: z.number().min(0).default(0),
+ }),
+ )
+ .query(async ({ ctx, input }) => {
+ const baseConditions = [
+ eq(projects.organizationId, ctx.session.activeOrganizationId),
+ ];
+
+ if (input.projectId) {
+ baseConditions.push(eq(environments.projectId, input.projectId));
+ }
+ if (input.environmentId) {
+ baseConditions.push(
+ eq(applications.environmentId, input.environmentId),
+ );
+ }
+
+ if (input.q?.trim()) {
+ const term = `%${input.q.trim()}%`;
+ baseConditions.push(
+ or(
+ ilike(applications.name, term),
+ ilike(applications.appName, term),
+ ilike(applications.description ?? "", term),
+ ilike(applications.repository ?? "", term),
+ ilike(applications.owner ?? "", term),
+ ilike(applications.dockerImage ?? "", term),
+ )!,
+ );
+ }
+
+ if (input.name?.trim()) {
+ baseConditions.push(ilike(applications.name, `%${input.name.trim()}%`));
+ }
+ if (input.appName?.trim()) {
+ baseConditions.push(
+ ilike(applications.appName, `%${input.appName.trim()}%`),
+ );
+ }
+ if (input.description?.trim()) {
+ baseConditions.push(
+ ilike(
+ applications.description ?? "",
+ `%${input.description.trim()}%`,
+ ),
+ );
+ }
+ if (input.repository?.trim()) {
+ baseConditions.push(
+ ilike(applications.repository ?? "", `%${input.repository.trim()}%`),
+ );
+ }
+ if (input.owner?.trim()) {
+ baseConditions.push(
+ ilike(applications.owner ?? "", `%${input.owner.trim()}%`),
+ );
+ }
+ if (input.dockerImage?.trim()) {
+ baseConditions.push(
+ ilike(
+ applications.dockerImage ?? "",
+ `%${input.dockerImage.trim()}%`,
+ ),
+ );
+ }
+
+ const { accessedServices } = await findMemberByUserId(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
+ if (accessedServices.length === 0) return { items: [], total: 0 };
+ baseConditions.push(
+ sql`${applications.applicationId} IN (${sql.join(
+ accessedServices.map((id) => sql`${id}`),
+ sql`, `,
+ )})`,
+ );
+
+ const where = and(...baseConditions);
+
+ const [items, countResult] = await Promise.all([
+ db
+ .select({
+ applicationId: applications.applicationId,
+ name: applications.name,
+ appName: applications.appName,
+ description: applications.description,
+ environmentId: applications.environmentId,
+ applicationStatus: applications.applicationStatus,
+ sourceType: applications.sourceType,
+ createdAt: applications.createdAt,
+ })
+ .from(applications)
+ .innerJoin(
+ environments,
+ eq(applications.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where)
+ .orderBy(desc(applications.createdAt))
+ .limit(input.limit)
+ .offset(input.offset),
+ db
+ .select({ count: sql`count(*)::int` })
+ .from(applications)
+ .innerJoin(
+ environments,
+ eq(applications.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where),
+ ]);
+
+ return {
+ items,
+ total: countResult[0]?.count ?? 0,
+ };
+ }),
});
diff --git a/apps/dokploy/server/api/routers/backup.ts b/apps/dokploy/server/api/routers/backup.ts
index 600fa5f51..d84eb7e9d 100644
--- a/apps/dokploy/server/api/routers/backup.ts
+++ b/apps/dokploy/server/api/routers/backup.ts
@@ -43,9 +43,14 @@ import {
restoreWebServerBackup,
} from "@dokploy/server/utils/restore";
import { TRPCError } from "@trpc/server";
-import { observable } from "@trpc/server/observable";
import { z } from "zod";
-import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
+import {
+ createTRPCRouter,
+ protectedProcedure,
+ withPermission,
+} from "@/server/api/trpc";
+import { checkServicePermissionAndAccess } from "@dokploy/server/services/permission";
+import { audit } from "@/server/api/utils/audit";
import {
apiCreateBackup,
apiFindOneBackup,
@@ -70,10 +75,21 @@ interface RcloneFile {
export const backupRouter = createTRPCRouter({
create: protectedProcedure
.input(apiCreateBackup)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
try {
- const newBackup = await createBackup(input);
+ const serviceId =
+ input.postgresId ||
+ input.mysqlId ||
+ input.mariadbId ||
+ input.mongoId ||
+ input.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ backup: ["create"],
+ });
+ }
+ const newBackup = await createBackup(input);
const backup = await findBackupById(newBackup.backupId);
if (IS_CLOUD && backup.enabled) {
@@ -111,6 +127,11 @@ export const backupRouter = createTRPCRouter({
scheduleBackup(backup);
}
}
+ await audit(ctx, {
+ action: "create",
+ resourceType: "backup",
+ resourceId: backup.backupId,
+ });
} catch (error) {
console.error(error);
throw new TRPCError({
@@ -123,15 +144,42 @@ export const backupRouter = createTRPCRouter({
});
}
}),
- one: protectedProcedure.input(apiFindOneBackup).query(async ({ input }) => {
- const backup = await findBackupById(input.backupId);
+ one: protectedProcedure
+ .input(apiFindOneBackup)
+ .query(async ({ input, ctx }) => {
+ const backup = await findBackupById(input.backupId);
- return backup;
- }),
+ const serviceId =
+ backup.postgresId ||
+ backup.mysqlId ||
+ backup.mariadbId ||
+ backup.mongoId ||
+ backup.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ backup: ["read"],
+ });
+ }
+
+ return backup;
+ }),
update: protectedProcedure
.input(apiUpdateBackup)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
try {
+ const existing = await findBackupById(input.backupId);
+ const serviceId =
+ existing.postgresId ||
+ existing.mysqlId ||
+ existing.mariadbId ||
+ existing.mongoId ||
+ existing.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ backup: ["update"],
+ });
+ }
+
await updateBackupById(input.backupId, input);
const backup = await findBackupById(input.backupId);
@@ -157,6 +205,11 @@ export const backupRouter = createTRPCRouter({
removeScheduleBackup(input.backupId);
}
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "backup",
+ resourceId: backup.backupId,
+ });
} catch (error) {
const message =
error instanceof Error ? error.message : "Error updating this Backup";
@@ -168,8 +221,21 @@ export const backupRouter = createTRPCRouter({
}),
remove: protectedProcedure
.input(apiRemoveBackup)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
try {
+ const backup = await findBackupById(input.backupId);
+ const serviceId =
+ backup.postgresId ||
+ backup.mysqlId ||
+ backup.mariadbId ||
+ backup.mongoId ||
+ backup.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ backup: ["delete"],
+ });
+ }
+
const value = await removeBackupById(input.backupId);
if (IS_CLOUD && value) {
removeJob({
@@ -180,6 +246,11 @@ export const backupRouter = createTRPCRouter({
} else if (!IS_CLOUD) {
removeScheduleBackup(input.backupId);
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "backup",
+ resourceId: input.backupId,
+ });
return value;
} catch (error) {
const message =
@@ -192,13 +263,22 @@ export const backupRouter = createTRPCRouter({
}),
manualBackupPostgres: protectedProcedure
.input(apiFindOneBackup)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
try {
const backup = await findBackupById(input.backupId);
+ if (backup.postgresId) {
+ await checkServicePermissionAndAccess(ctx, backup.postgresId, {
+ backup: ["create"],
+ });
+ }
const postgres = await findPostgresByBackupId(backup.backupId);
await runPostgresBackup(postgres, backup);
-
await keepLatestNBackups(backup, postgres?.serverId);
+ await audit(ctx, {
+ action: "run",
+ resourceType: "backup",
+ resourceId: backup.backupId,
+ });
return true;
} catch (error) {
const message =
@@ -214,12 +294,22 @@ export const backupRouter = createTRPCRouter({
manualBackupMySql: protectedProcedure
.input(apiFindOneBackup)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
try {
const backup = await findBackupById(input.backupId);
+ if (backup.mysqlId) {
+ await checkServicePermissionAndAccess(ctx, backup.mysqlId, {
+ backup: ["create"],
+ });
+ }
const mysql = await findMySqlByBackupId(backup.backupId);
await runMySqlBackup(mysql, backup);
await keepLatestNBackups(backup, mysql?.serverId);
+ await audit(ctx, {
+ action: "run",
+ resourceType: "backup",
+ resourceId: backup.backupId,
+ });
return true;
} catch (error) {
throw new TRPCError({
@@ -231,12 +321,22 @@ export const backupRouter = createTRPCRouter({
}),
manualBackupMariadb: protectedProcedure
.input(apiFindOneBackup)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
try {
const backup = await findBackupById(input.backupId);
+ if (backup.mariadbId) {
+ await checkServicePermissionAndAccess(ctx, backup.mariadbId, {
+ backup: ["create"],
+ });
+ }
const mariadb = await findMariadbByBackupId(backup.backupId);
await runMariadbBackup(mariadb, backup);
await keepLatestNBackups(backup, mariadb?.serverId);
+ await audit(ctx, {
+ action: "run",
+ resourceType: "backup",
+ resourceId: backup.backupId,
+ });
return true;
} catch (error) {
throw new TRPCError({
@@ -248,12 +348,22 @@ export const backupRouter = createTRPCRouter({
}),
manualBackupCompose: protectedProcedure
.input(apiFindOneBackup)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
try {
const backup = await findBackupById(input.backupId);
+ if (backup.composeId) {
+ await checkServicePermissionAndAccess(ctx, backup.composeId, {
+ backup: ["create"],
+ });
+ }
const compose = await findComposeByBackupId(backup.backupId);
await runComposeBackup(compose, backup);
await keepLatestNBackups(backup, compose?.serverId);
+ await audit(ctx, {
+ action: "run",
+ resourceType: "backup",
+ resourceId: backup.backupId,
+ });
return true;
} catch (error) {
throw new TRPCError({
@@ -265,12 +375,22 @@ export const backupRouter = createTRPCRouter({
}),
manualBackupMongo: protectedProcedure
.input(apiFindOneBackup)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
try {
const backup = await findBackupById(input.backupId);
+ if (backup.mongoId) {
+ await checkServicePermissionAndAccess(ctx, backup.mongoId, {
+ backup: ["create"],
+ });
+ }
const mongo = await findMongoByBackupId(backup.backupId);
await runMongoBackup(mongo, backup);
await keepLatestNBackups(backup, mongo?.serverId);
+ await audit(ctx, {
+ action: "run",
+ resourceType: "backup",
+ resourceId: backup.backupId,
+ });
return true;
} catch (error) {
throw new TRPCError({
@@ -280,15 +400,20 @@ export const backupRouter = createTRPCRouter({
});
}
}),
- manualBackupWebServer: protectedProcedure
+ manualBackupWebServer: withPermission("backup", "create")
.input(apiFindOneBackup)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
const backup = await findBackupById(input.backupId);
await runWebServerBackup(backup);
await keepLatestNBackups(backup);
+ await audit(ctx, {
+ action: "run",
+ resourceType: "backup",
+ resourceId: backup.backupId,
+ });
return true;
}),
- listBackupFiles: protectedProcedure
+ listBackupFiles: withPermission("backup", "read")
.input(
z.object({
destinationId: z.string(),
@@ -375,58 +500,64 @@ export const backupRouter = createTRPCRouter({
},
})
.input(apiRestoreBackup)
- .subscription(async ({ input }) => {
+ .subscription(async function* ({ input, ctx, signal }) {
+ if (input.databaseId) {
+ await checkServicePermissionAndAccess(ctx, input.databaseId, {
+ backup: ["restore"],
+ });
+ }
const destination = await findDestinationById(input.destinationId);
+ const queue: string[] = [];
+ const done = false;
if (input.backupType === "database") {
if (input.databaseType === "postgres") {
const postgres = await findPostgresById(input.databaseId);
- return observable((emit) => {
- restorePostgresBackup(postgres, destination, input, (log) => {
- emit.next(log);
- });
+ restorePostgresBackup(postgres, destination, input, (log) => {
+ queue.push(log);
});
}
+
if (input.databaseType === "mysql") {
const mysql = await findMySqlById(input.databaseId);
- return observable((emit) => {
- restoreMySqlBackup(mysql, destination, input, (log) => {
- emit.next(log);
- });
+ restoreMySqlBackup(mysql, destination, input, (log) => {
+ queue.push(log);
});
}
if (input.databaseType === "mariadb") {
const mariadb = await findMariadbById(input.databaseId);
- return observable((emit) => {
- restoreMariadbBackup(mariadb, destination, input, (log) => {
- emit.next(log);
- });
+ restoreMariadbBackup(mariadb, destination, input, (log) => {
+ queue.push(log);
});
}
if (input.databaseType === "mongo") {
const mongo = await findMongoById(input.databaseId);
- return observable((emit) => {
- restoreMongoBackup(mongo, destination, input, (log) => {
- emit.next(log);
- });
+ restoreMongoBackup(mongo, destination, input, (log) => {
+ queue.push(log);
});
}
if (input.databaseType === "web-server") {
- return observable((emit) => {
- restoreWebServerBackup(destination, input.backupFile, (log) => {
- emit.next(log);
- });
+ restoreWebServerBackup(destination, input.backupFile, (log) => {
+ queue.push(log);
});
}
}
if (input.backupType === "compose") {
const compose = await findComposeById(input.databaseId);
- return observable((emit) => {
- restoreComposeBackup(compose, destination, input, (log) => {
- emit.next(log);
- });
+ restoreComposeBackup(compose, destination, input, (log) => {
+ queue.push(log);
});
}
- return true;
+ while (!done || queue.length > 0) {
+ if (queue.length > 0) {
+ yield queue.shift()!;
+ } else {
+ await new Promise((r) => setTimeout(r, 50));
+ }
+
+ if (signal?.aborted) {
+ return;
+ }
+ }
}),
});
diff --git a/apps/dokploy/server/api/routers/bitbucket.ts b/apps/dokploy/server/api/routers/bitbucket.ts
index e3107105a..bfaa68540 100644
--- a/apps/dokploy/server/api/routers/bitbucket.ts
+++ b/apps/dokploy/server/api/routers/bitbucket.ts
@@ -6,9 +6,14 @@ import {
testBitbucketConnection,
updateBitbucket,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
-import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
+import {
+ createTRPCRouter,
+ protectedProcedure,
+ withPermission,
+} from "@/server/api/trpc";
+import { audit } from "@/server/api/utils/audit";
import {
apiBitbucketTestConnection,
apiCreateBitbucket,
@@ -18,15 +23,23 @@ import {
} from "@/server/db/schema";
export const bitbucketRouter = createTRPCRouter({
- create: protectedProcedure
+ create: withPermission("gitProviders", "create")
.input(apiCreateBitbucket)
.mutation(async ({ input, ctx }) => {
try {
- return await createBitbucket(
+ const result = await createBitbucket(
input,
ctx.session.activeOrganizationId,
ctx.session.userId,
);
+
+ await audit(ctx, {
+ action: "create",
+ resourceType: "gitProvider",
+ resourceName: input.name,
+ });
+
+ return result;
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -37,19 +50,8 @@ export const bitbucketRouter = createTRPCRouter({
}),
one: protectedProcedure
.input(apiFindOneBitbucket)
- .query(async ({ input, ctx }) => {
- const bitbucketProvider = await findBitbucketById(input.bitbucketId);
- if (
- bitbucketProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- bitbucketProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this bitbucket provider",
- });
- }
- return bitbucketProvider;
+ .query(async ({ input }) => {
+ return await findBitbucketById(input.bitbucketId);
}),
bitbucketProviders: protectedProcedure.query(async ({ ctx }) => {
let result = await db.query.bitbucket.findMany({
@@ -73,53 +75,18 @@ export const bitbucketRouter = createTRPCRouter({
getBitbucketRepositories: protectedProcedure
.input(apiFindOneBitbucket)
- .query(async ({ input, ctx }) => {
- const bitbucketProvider = await findBitbucketById(input.bitbucketId);
- if (
- bitbucketProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- bitbucketProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this bitbucket provider",
- });
- }
+ .query(async ({ input }) => {
return await getBitbucketRepositories(input.bitbucketId);
}),
getBitbucketBranches: protectedProcedure
.input(apiFindBitbucketBranches)
- .query(async ({ input, ctx }) => {
- const bitbucketProvider = await findBitbucketById(
- input.bitbucketId || "",
- );
- if (
- bitbucketProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- bitbucketProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this bitbucket provider",
- });
- }
+ .query(async ({ input }) => {
return await getBitbucketBranches(input);
}),
testConnection: protectedProcedure
.input(apiBitbucketTestConnection)
- .mutation(async ({ input, ctx }) => {
+ .mutation(async ({ input }) => {
try {
- const bitbucketProvider = await findBitbucketById(input.bitbucketId);
- if (
- bitbucketProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- bitbucketProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this bitbucket provider",
- });
- }
const result = await testBitbucketConnection(input);
return `Found ${result} repositories`;
@@ -130,23 +97,21 @@ export const bitbucketRouter = createTRPCRouter({
});
}
}),
- update: protectedProcedure
+ update: withPermission("gitProviders", "create")
.input(apiUpdateBitbucket)
.mutation(async ({ input, ctx }) => {
- const bitbucketProvider = await findBitbucketById(input.bitbucketId);
- if (
- bitbucketProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- bitbucketProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this bitbucket provider",
- });
- }
- return await updateBitbucket(input.bitbucketId, {
+ const result = await updateBitbucket(input.bitbucketId, {
...input,
organizationId: ctx.session.activeOrganizationId,
});
+
+ await audit(ctx, {
+ action: "update",
+ resourceType: "gitProvider",
+ resourceId: input.bitbucketId,
+ resourceName: input.name,
+ });
+
+ return result;
}),
});
diff --git a/apps/dokploy/server/api/routers/certificate.ts b/apps/dokploy/server/api/routers/certificate.ts
index ba57ee089..0ebd33e7f 100644
--- a/apps/dokploy/server/api/routers/certificate.ts
+++ b/apps/dokploy/server/api/routers/certificate.ts
@@ -4,10 +4,11 @@ import {
IS_CLOUD,
removeCertificateById,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
-import { adminProcedure, createTRPCRouter } from "@/server/api/trpc";
-import { db } from "@/server/db";
+import { audit } from "@/server/api/utils/audit";
+import { createTRPCRouter, withPermission } from "@/server/api/trpc";
import {
apiCreateCertificate,
apiFindCertificate,
@@ -15,7 +16,7 @@ import {
} from "@/server/db/schema";
export const certificateRouter = createTRPCRouter({
- create: adminProcedure
+ create: withPermission("certificate", "create")
.input(apiCreateCertificate)
.mutation(async ({ input, ctx }) => {
if (IS_CLOUD && !input.serverId) {
@@ -24,10 +25,20 @@ export const certificateRouter = createTRPCRouter({
message: "Please set a server to create a certificate",
});
}
- return await createCertificate(input, ctx.session.activeOrganizationId);
+ const cert = await createCertificate(
+ input,
+ ctx.session.activeOrganizationId,
+ );
+ await audit(ctx, {
+ action: "create",
+ resourceType: "certificate",
+ resourceId: cert.certificateId,
+ resourceName: cert.name,
+ });
+ return cert;
}),
- one: adminProcedure
+ one: withPermission("certificate", "read")
.input(apiFindCertificate)
.query(async ({ input, ctx }) => {
const certificates = await findCertificateById(input.certificateId);
@@ -39,7 +50,7 @@ export const certificateRouter = createTRPCRouter({
}
return certificates;
}),
- remove: adminProcedure
+ remove: withPermission("certificate", "delete")
.input(apiFindCertificate)
.mutation(async ({ input, ctx }) => {
const certificates = await findCertificateById(input.certificateId);
@@ -49,10 +60,16 @@ export const certificateRouter = createTRPCRouter({
message: "You are not allowed to delete this certificate",
});
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "certificate",
+ resourceId: certificates.certificateId,
+ resourceName: certificates.name,
+ });
await removeCertificateById(input.certificateId);
return true;
}),
- all: adminProcedure.query(async ({ ctx }) => {
+ all: withPermission("certificate", "read").query(async ({ ctx }) => {
return await db.query.certificates.findMany({
where: eq(certificates.organizationId, ctx.session.activeOrganizationId),
});
diff --git a/apps/dokploy/server/api/routers/cluster.ts b/apps/dokploy/server/api/routers/cluster.ts
index 6c118d802..afd8a0e92 100644
--- a/apps/dokploy/server/api/routers/cluster.ts
+++ b/apps/dokploy/server/api/routers/cluster.ts
@@ -7,10 +7,12 @@ import {
} from "@dokploy/server";
import { TRPCError } from "@trpc/server";
import { z } from "zod";
+import { audit } from "@/server/api/utils/audit";
import { getLocalServerIp } from "@/server/wss/terminal";
-import { createTRPCRouter, protectedProcedure } from "../trpc";
+import { createTRPCRouter, withPermission } from "../trpc";
+
export const clusterRouter = createTRPCRouter({
- getNodes: protectedProcedure
+ getNodes: withPermission("server", "read")
.input(
z.object({
serverId: z.string().optional(),
@@ -19,17 +21,17 @@ export const clusterRouter = createTRPCRouter({
.query(async ({ input }) => {
const docker = await getRemoteDocker(input.serverId);
const workers: DockerNode[] = await docker.listNodes();
-
return workers;
}),
- removeWorker: protectedProcedure
+
+ removeWorker: withPermission("server", "delete")
.input(
z.object({
nodeId: z.string(),
serverId: z.string().optional(),
}),
)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
try {
const drainCommand = `docker node update --availability drain ${input.nodeId}`;
const removeCommand = `docker node rm ${input.nodeId} --force`;
@@ -41,6 +43,12 @@ export const clusterRouter = createTRPCRouter({
await execAsync(drainCommand);
await execAsync(removeCommand);
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "cluster",
+ resourceId: input.nodeId,
+ resourceName: input.nodeId,
+ });
return true;
} catch (error) {
throw new TRPCError({
@@ -50,7 +58,8 @@ export const clusterRouter = createTRPCRouter({
});
}
}),
- addWorker: protectedProcedure
+
+ addWorker: withPermission("server", "create")
.input(
z.object({
serverId: z.string().optional(),
@@ -68,13 +77,12 @@ export const clusterRouter = createTRPCRouter({
}
return {
- command: `docker swarm join --token ${
- result.JoinTokens.Worker
- } ${ip}:2377`,
+ command: `docker swarm join --token ${result.JoinTokens.Worker} ${ip}:2377`,
version: docker_version.Version,
};
}),
- addManager: protectedProcedure
+
+ addManager: withPermission("server", "create")
.input(
z.object({
serverId: z.string().optional(),
@@ -91,9 +99,7 @@ export const clusterRouter = createTRPCRouter({
ip = server?.ipAddress;
}
return {
- command: `docker swarm join --token ${
- result.JoinTokens.Manager
- } ${ip}:2377`,
+ command: `docker swarm join --token ${result.JoinTokens.Manager} ${ip}:2377`,
version: docker_version.Version,
};
}),
diff --git a/apps/dokploy/server/api/routers/compose.ts b/apps/dokploy/server/api/routers/compose.ts
index 01f9c8b04..0d3782eab 100644
--- a/apps/dokploy/server/api/routers/compose.ts
+++ b/apps/dokploy/server/api/routers/compose.ts
@@ -1,7 +1,6 @@
import {
addDomainToCompose,
- addNewService,
- checkServiceAccess,
+ clearOldDeployments,
cloneCompose,
createCommand,
createCompose,
@@ -32,6 +31,13 @@ import {
updateCompose,
updateDeploymentStatus,
} from "@dokploy/server";
+import {
+ addNewService,
+ checkServiceAccess,
+ checkServicePermissionAndAccess,
+ findMemberByUserId,
+} from "@dokploy/server/services/permission";
+import { db } from "@dokploy/server/db";
import {
type CompleteTemplate,
fetchTemplateFiles,
@@ -39,14 +45,13 @@ import {
} from "@dokploy/server/templates/github";
import { processTemplate } from "@dokploy/server/templates/processors";
import { TRPCError } from "@trpc/server";
-import { eq } from "drizzle-orm";
+import { and, desc, eq, ilike, or, sql } from "drizzle-orm";
import _ from "lodash";
import { nanoid } from "nanoid";
import { parse } from "toml";
import { stringify } from "yaml";
import { z } from "zod";
import { slugify } from "@/lib/slug";
-import { db } from "@/server/db";
import {
apiCreateCompose,
apiDeleteCompose,
@@ -57,6 +62,8 @@ import {
apiRedeployCompose,
apiUpdateCompose,
compose as composeTable,
+ environments,
+ projects,
} from "@/server/db/schema";
import { deploymentWorker } from "@/server/queues/deployments-queue";
import type { DeploymentJob } from "@/server/queues/queue-types";
@@ -68,6 +75,7 @@ import {
} from "@/server/queues/queueSetup";
import { cancelDeployment, deploy } from "@/server/utils/deploy";
import { generatePassword } from "@/templates/utils";
+import { audit } from "../utils/audit";
import { createTRPCRouter, protectedProcedure, publicProcedure } from "../trpc";
export const composeRouter = createTRPCRouter({
@@ -75,18 +83,10 @@ export const composeRouter = createTRPCRouter({
.input(apiCreateCompose)
.mutation(async ({ ctx, input }) => {
try {
- // Get project from environment
const environment = await findEnvironmentById(input.environmentId);
const project = await findProjectById(environment.projectId);
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- project.projectId,
- ctx.session.activeOrganizationId,
- "create",
- );
- }
+ await checkServiceAccess(ctx, project.projectId, "create");
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
@@ -104,14 +104,14 @@ export const composeRouter = createTRPCRouter({
...input,
});
- if (ctx.user.role === "member") {
- await addNewService(
- ctx.user.id,
- newService.composeId,
- project.organizationId,
- );
- }
+ await addNewService(ctx, newService.composeId);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "service",
+ resourceId: newService.composeId,
+ resourceName: newService.appName,
+ });
return newService;
} catch (error) {
throw error;
@@ -121,14 +121,7 @@ export const composeRouter = createTRPCRouter({
one: protectedProcedure
.input(apiFindCompose)
.query(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.composeId,
- ctx.session.activeOrganizationId,
- "access",
- );
- }
+ await checkServiceAccess(ctx, input.composeId, "read");
const compose = await findComposeById(input.composeId);
if (
@@ -184,29 +177,22 @@ export const composeRouter = createTRPCRouter({
update: protectedProcedure
.input(apiUpdateCompose)
.mutation(async ({ input, ctx }) => {
- const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to update this compose",
- });
- }
- return updateCompose(input.composeId, input);
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
+ const updated = await updateCompose(input.composeId, input);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: updated?.name,
+ });
+ return updated;
}),
delete: protectedProcedure
.input(apiDeleteCompose)
.mutation(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.composeId,
- ctx.session.activeOrganizationId,
- "delete",
- );
- }
+ await checkServiceAccess(ctx, input.composeId, "delete");
const composeResult = await findComposeById(input.composeId);
if (
@@ -245,53 +231,55 @@ export const composeRouter = createTRPCRouter({
} catch (_) {}
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "service",
+ resourceId: composeResult.composeId,
+ resourceName: composeResult.appName,
+ });
return composeResult;
}),
cleanQueues: protectedProcedure
.input(apiFindCompose)
.mutation(async ({ input, ctx }) => {
- const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to clean this compose",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ deployment: ["create"],
+ });
await cleanQueuesByCompose(input.composeId);
return { success: true, message: "Queues cleaned successfully" };
}),
+ clearDeployments: protectedProcedure
+ .input(apiFindCompose)
+ .mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ deployment: ["create"],
+ });
+ const compose = await findComposeById(input.composeId);
+ await clearOldDeployments(compose.appName, compose.serverId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: compose.name,
+ });
+ return true;
+ }),
killBuild: protectedProcedure
.input(apiFindCompose)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ deployment: ["cancel"],
+ });
const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to kill this build",
- });
- }
await killDockerBuild("compose", compose.serverId);
}),
loadServices: protectedProcedure
.input(apiFetchServices)
.query(async ({ input, ctx }) => {
- const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to load this compose",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
return await loadServices(input.composeId, input.type);
}),
loadMountsByService: protectedProcedure
@@ -302,16 +290,10 @@ export const composeRouter = createTRPCRouter({
}),
)
.query(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to load this compose",
- });
- }
const container = await getComposeContainer(compose, input.serviceName);
const mounts = container?.Mounts.filter(
(mount) => mount.Type === "volume" && mount.Source !== "",
@@ -322,18 +304,11 @@ export const composeRouter = createTRPCRouter({
.input(apiFindCompose)
.mutation(async ({ input, ctx }) => {
try {
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to fetch this compose",
- });
- }
-
const command = await cloneCompose(compose);
if (compose.serverId) {
await execAsyncRemote(compose.serverId, command);
@@ -353,49 +328,45 @@ export const composeRouter = createTRPCRouter({
randomizeCompose: protectedProcedure
.input(apiRandomizeCompose)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
+ const result = await randomizeComposeFile(input.composeId, input.suffix);
const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to randomize this compose",
- });
- }
- return await randomizeComposeFile(input.composeId, input.suffix);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: compose.name,
+ });
+ return result;
}),
isolatedDeployment: protectedProcedure
.input(apiRandomizeCompose)
.mutation(async ({ input, ctx }) => {
- const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to randomize this compose",
- });
- }
- return await randomizeIsolatedDeploymentComposeFile(
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
+ const result = await randomizeIsolatedDeploymentComposeFile(
input.composeId,
input.suffix,
);
+ const compose = await findComposeById(input.composeId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: compose.name,
+ });
+ return result;
}),
getConvertedCompose: protectedProcedure
.input(apiFindCompose)
.query(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to get this compose",
- });
- }
const domains = await findDomainsByComposeId(input.composeId);
const composeFile = await addDomainToCompose(compose, domains);
return stringify(composeFile, {
@@ -406,17 +377,11 @@ export const composeRouter = createTRPCRouter({
deploy: protectedProcedure
.input(apiDeployCompose)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ deployment: ["create"],
+ });
const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this compose",
- });
- }
const jobData: DeploymentJob = {
composeId: input.composeId,
titleLog: input.title || "Manual deployment",
@@ -431,6 +396,12 @@ export const composeRouter = createTRPCRouter({
deploy(jobData).catch((error) => {
console.error("Background deployment failed:", error);
});
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: compose.name,
+ });
return true;
}
await myQueue.add(
@@ -441,6 +412,12 @@ export const composeRouter = createTRPCRouter({
removeOnFail: true,
},
);
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: compose.name,
+ });
return {
success: true,
message: "Deployment queued",
@@ -450,16 +427,10 @@ export const composeRouter = createTRPCRouter({
redeploy: protectedProcedure
.input(apiRedeployCompose)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ deployment: ["create"],
+ });
const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to redeploy this compose",
- });
- }
const jobData: DeploymentJob = {
composeId: input.composeId,
titleLog: input.title || "Rebuild deployment",
@@ -473,6 +444,12 @@ export const composeRouter = createTRPCRouter({
deploy(jobData).catch((error) => {
console.error("Background deployment failed:", error);
});
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: compose.name,
+ });
return true;
}
await myQueue.add(
@@ -483,6 +460,12 @@ export const composeRouter = createTRPCRouter({
removeOnFail: true,
},
);
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: compose.name,
+ });
return {
success: true,
message: "Redeployment queued",
@@ -492,70 +475,61 @@ export const composeRouter = createTRPCRouter({
stop: protectedProcedure
.input(apiFindCompose)
.mutation(async ({ input, ctx }) => {
- const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to stop this compose",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ deployment: ["create"],
+ });
await stopCompose(input.composeId);
-
+ const composeForStop = await findComposeById(input.composeId);
+ await audit(ctx, {
+ action: "stop",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: composeForStop.name,
+ });
return true;
}),
start: protectedProcedure
.input(apiFindCompose)
.mutation(async ({ input, ctx }) => {
- const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to stop this compose",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ deployment: ["create"],
+ });
await startCompose(input.composeId);
-
+ const composeForStart = await findComposeById(input.composeId);
+ await audit(ctx, {
+ action: "start",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: composeForStart.name,
+ });
return true;
}),
getDefaultCommand: protectedProcedure
.input(apiFindCompose)
.query(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
const compose = await findComposeById(input.composeId);
-
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to get this compose",
- });
- }
const command = createCommand(compose);
return `docker ${command}`;
}),
refreshToken: protectedProcedure
.input(apiFindCompose)
.mutation(async ({ input, ctx }) => {
- const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to refresh this compose",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
await updateCompose(input.composeId, {
refreshToken: nanoid(),
});
+ const composeForToken = await findComposeById(input.composeId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: composeForToken.name,
+ });
return true;
}),
deployTemplate: protectedProcedure
@@ -570,14 +544,7 @@ export const composeRouter = createTRPCRouter({
.mutation(async ({ ctx, input }) => {
const environment = await findEnvironmentById(input.environmentId);
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- environment.projectId,
- ctx.session.activeOrganizationId,
- "create",
- );
- }
+ await checkServiceAccess(ctx, environment.projectId, "create");
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
@@ -627,13 +594,7 @@ export const composeRouter = createTRPCRouter({
isolatedDeployment: true,
});
- if (ctx.user.role === "member") {
- await addNewService(
- ctx.user.id,
- compose.composeId,
- ctx.session.activeOrganizationId,
- );
- }
+ await addNewService(ctx, compose.composeId);
if (generate.mounts && generate.mounts?.length > 0) {
for (const mount of generate.mounts) {
@@ -660,6 +621,12 @@ export const composeRouter = createTRPCRouter({
}
}
+ await audit(ctx, {
+ action: "create",
+ resourceType: "compose",
+ resourceId: compose.composeId,
+ resourceName: compose.name,
+ });
return compose;
}),
@@ -693,20 +660,11 @@ export const composeRouter = createTRPCRouter({
disconnectGitProvider: protectedProcedure
.input(apiFindCompose)
.mutation(async ({ input, ctx }) => {
- const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to disconnect this git provider",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
- // Reset all git provider related fields
await updateCompose(input.composeId, {
- // GitHub fields
repository: null,
branch: null,
owner: null,
@@ -714,7 +672,6 @@ export const composeRouter = createTRPCRouter({
githubId: null,
triggerType: "push",
- // GitLab fields
gitlabRepository: null,
gitlabOwner: null,
gitlabBranch: null,
@@ -722,30 +679,33 @@ export const composeRouter = createTRPCRouter({
gitlabProjectId: null,
gitlabPathNamespace: null,
- // Bitbucket fields
bitbucketRepository: null,
bitbucketOwner: null,
bitbucketBranch: null,
bitbucketId: null,
- // Gitea fields
giteaRepository: null,
giteaOwner: null,
giteaBranch: null,
giteaId: null,
- // Custom Git fields
customGitBranch: null,
customGitUrl: null,
customGitSSHKeyId: null,
- // Common fields
sourceType: "github", // Reset to default
composeStatus: "idle",
watchPaths: null,
enableSubmodules: false,
});
+ const composeForDisconnect = await findComposeById(input.composeId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: composeForDisconnect.name,
+ });
return true;
}),
@@ -757,29 +717,9 @@ export const composeRouter = createTRPCRouter({
}),
)
.mutation(async ({ input, ctx }) => {
- const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move this compose",
- });
- }
-
- const targetEnvironment = await findEnvironmentById(
- input.targetEnvironmentId,
- );
- if (
- targetEnvironment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move to this environment",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
const updatedCompose = await db
.update(composeTable)
@@ -797,6 +737,12 @@ export const composeRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: updatedCompose.name,
+ });
return updatedCompose;
}),
@@ -809,18 +755,11 @@ export const composeRouter = createTRPCRouter({
)
.mutation(async ({ input, ctx }) => {
try {
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to update this compose",
- });
- }
-
const decodedData = Buffer.from(input.base64, "base64").toString(
"utf-8",
);
@@ -880,21 +819,14 @@ export const composeRouter = createTRPCRouter({
)
.mutation(async ({ input, ctx }) => {
try {
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ service: ["create"],
+ });
const compose = await findComposeById(input.composeId);
const decodedData = Buffer.from(input.base64, "base64").toString(
"utf-8",
);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to update this compose",
- });
- }
-
for (const mount of compose.mounts) {
await deleteMount(mount.mountId);
}
@@ -972,6 +904,12 @@ export const composeRouter = createTRPCRouter({
}
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: compose.appName,
+ });
return {
success: true,
message: "Template imported successfully",
@@ -987,16 +925,10 @@ export const composeRouter = createTRPCRouter({
cancelDeployment: protectedProcedure
.input(apiFindCompose)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ deployment: ["cancel"],
+ });
const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to cancel this deployment",
- });
- }
if (IS_CLOUD && compose.serverId) {
try {
@@ -1016,6 +948,12 @@ export const composeRouter = createTRPCRouter({
applicationType: "compose",
});
+ await audit(ctx, {
+ action: "stop",
+ resourceType: "compose",
+ resourceId: input.composeId,
+ resourceName: compose.name,
+ });
return {
success: true,
message: "Deployment cancellation requested",
@@ -1036,4 +974,112 @@ export const composeRouter = createTRPCRouter({
message: "Deployment cancellation only available in cloud version",
});
}),
+
+ search: protectedProcedure
+ .input(
+ z.object({
+ q: z.string().optional(),
+ name: z.string().optional(),
+ appName: z.string().optional(),
+ description: z.string().optional(),
+ projectId: z.string().optional(),
+ environmentId: z.string().optional(),
+ limit: z.number().min(1).max(100).default(20),
+ offset: z.number().min(0).default(0),
+ }),
+ )
+ .query(async ({ ctx, input }) => {
+ const baseConditions = [
+ eq(projects.organizationId, ctx.session.activeOrganizationId),
+ ];
+
+ if (input.projectId) {
+ baseConditions.push(eq(environments.projectId, input.projectId));
+ }
+ if (input.environmentId) {
+ baseConditions.push(
+ eq(composeTable.environmentId, input.environmentId),
+ );
+ }
+
+ if (input.q?.trim()) {
+ const term = `%${input.q.trim()}%`;
+ baseConditions.push(
+ or(
+ ilike(composeTable.name, term),
+ ilike(composeTable.appName, term),
+ ilike(composeTable.description ?? "", term),
+ )!,
+ );
+ }
+
+ if (input.name?.trim()) {
+ baseConditions.push(ilike(composeTable.name, `%${input.name.trim()}%`));
+ }
+ if (input.appName?.trim()) {
+ baseConditions.push(
+ ilike(composeTable.appName, `%${input.appName.trim()}%`),
+ );
+ }
+ if (input.description?.trim()) {
+ baseConditions.push(
+ ilike(
+ composeTable.description ?? "",
+ `%${input.description.trim()}%`,
+ ),
+ );
+ }
+
+ const { accessedServices } = await findMemberByUserId(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
+ if (accessedServices.length === 0) return { items: [], total: 0 };
+ baseConditions.push(
+ sql`${composeTable.composeId} IN (${sql.join(
+ accessedServices.map((id) => sql`${id}`),
+ sql`, `,
+ )})`,
+ );
+
+ const where = and(...baseConditions);
+
+ const [items, countResult] = await Promise.all([
+ db
+ .select({
+ composeId: composeTable.composeId,
+ name: composeTable.name,
+ appName: composeTable.appName,
+ description: composeTable.description,
+ environmentId: composeTable.environmentId,
+ composeStatus: composeTable.composeStatus,
+ sourceType: composeTable.sourceType,
+ createdAt: composeTable.createdAt,
+ })
+ .from(composeTable)
+ .innerJoin(
+ environments,
+ eq(composeTable.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where)
+ .orderBy(desc(composeTable.createdAt))
+ .limit(input.limit)
+ .offset(input.offset),
+ db
+ .select({ count: sql`count(*)::int` })
+ .from(composeTable)
+ .innerJoin(
+ environments,
+ eq(composeTable.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where),
+ ]);
+
+ return {
+ items,
+ total: countResult[0]?.count ?? 0,
+ };
+ }),
});
diff --git a/apps/dokploy/server/api/routers/deployment.ts b/apps/dokploy/server/api/routers/deployment.ts
index 9004a0a05..03cd3c935 100644
--- a/apps/dokploy/server/api/routers/deployment.ts
+++ b/apps/dokploy/server/api/routers/deployment.ts
@@ -4,73 +4,123 @@ import {
findAllDeploymentsByApplicationId,
findAllDeploymentsByComposeId,
findAllDeploymentsByServerId,
- findApplicationById,
- findComposeById,
+ findAllDeploymentsCentralized,
findDeploymentById,
- findServerById,
+ IS_CLOUD,
+ removeDeployment,
+ resolveServicePath,
updateDeploymentStatus,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
+import {
+ checkServicePermissionAndAccess,
+ findMemberByUserId,
+} from "@dokploy/server/services/permission";
import { TRPCError } from "@trpc/server";
import { desc, eq } from "drizzle-orm";
import { z } from "zod";
-import { db } from "@/server/db";
+import { audit } from "@/server/api/utils/audit";
import {
apiFindAllByApplication,
apiFindAllByCompose,
apiFindAllByServer,
apiFindAllByType,
deployments,
+ server,
} from "@/server/db/schema";
-import { createTRPCRouter, protectedProcedure } from "../trpc";
+import { myQueue } from "@/server/queues/queueSetup";
+import { fetchDeployApiJobs, type QueueJobRow } from "@/server/utils/deploy";
+import { createTRPCRouter, protectedProcedure, withPermission } from "../trpc";
export const deploymentRouter = createTRPCRouter({
all: protectedProcedure
.input(apiFindAllByApplication)
.query(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ deployment: ["read"],
+ });
return await findAllDeploymentsByApplicationId(input.applicationId);
}),
allByCompose: protectedProcedure
.input(apiFindAllByCompose)
.query(async ({ input, ctx }) => {
- const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this compose",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ deployment: ["read"],
+ });
return await findAllDeploymentsByComposeId(input.composeId);
}),
- allByServer: protectedProcedure
+ allByServer: withPermission("deployment", "read")
.input(apiFindAllByServer)
- .query(async ({ input, ctx }) => {
- const server = await findServerById(input.serverId);
- if (server.organizationId !== ctx.session.activeOrganizationId) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this server",
- });
- }
+ .query(async ({ input }) => {
return await findAllDeploymentsByServerId(input.serverId);
}),
+ allCentralized: withPermission("deployment", "read").query(
+ async ({ ctx }) => {
+ const orgId = ctx.session.activeOrganizationId;
+ const accessedServices =
+ ctx.user.role !== "owner" && ctx.user.role !== "admin"
+ ? (await findMemberByUserId(ctx.user.id, orgId)).accessedServices
+ : null;
+ if (accessedServices !== null && accessedServices.length === 0) {
+ return [];
+ }
+ return findAllDeploymentsCentralized(orgId, accessedServices);
+ },
+ ),
+
+ queueList: withPermission("deployment", "read").query(async ({ ctx }) => {
+ const orgId = ctx.session.activeOrganizationId;
+ let rows: QueueJobRow[];
+
+ if (IS_CLOUD) {
+ const servers = await db.query.server.findMany({
+ where: eq(server.organizationId, orgId),
+ columns: { serverId: true },
+ });
+ const serverRowsArrays = await Promise.all(
+ servers.map(({ serverId }) => fetchDeployApiJobs(serverId)),
+ );
+ rows = serverRowsArrays.flat();
+ rows.sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0));
+ } else {
+ const jobs = await myQueue.getJobs();
+ const jobRows = await Promise.all(
+ jobs.map(async (job) => {
+ const state = await job.getState();
+ return {
+ id: String(job.id),
+ name: job.name ?? undefined,
+ data: job.data as Record,
+ timestamp: job.timestamp,
+ processedOn: job.processedOn,
+ finishedOn: job.finishedOn,
+ failedReason: job.failedReason ?? undefined,
+ state,
+ };
+ }),
+ );
+ jobRows.sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0));
+ rows = jobRows;
+ }
+
+ return Promise.all(
+ rows.map(async (row) => ({
+ ...row,
+ servicePath: await resolveServicePath(
+ orgId,
+ (row.data ?? {}) as Record,
+ ),
+ })),
+ );
+ }),
allByType: protectedProcedure
.input(apiFindAllByType)
- .query(async ({ input }) => {
+ .query(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.id, {
+ deployment: ["read"],
+ });
const deploymentsList = await db.query.deployments.findMany({
where: eq(deployments[`${input.type}Id`], input.id),
orderBy: desc(deployments.createdAt),
@@ -78,18 +128,22 @@ export const deploymentRouter = createTRPCRouter({
rollback: true,
},
});
-
return deploymentsList;
}),
-
killProcess: protectedProcedure
.input(
z.object({
deploymentId: z.string().min(1),
}),
)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
const deployment = await findDeploymentById(input.deploymentId);
+ const serviceId = deployment.applicationId || deployment.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ deployment: ["cancel"],
+ });
+ }
if (!deployment.pid) {
throw new TRPCError({
@@ -106,5 +160,33 @@ export const deploymentRouter = createTRPCRouter({
}
await updateDeploymentStatus(deployment.deploymentId, "error");
+ await audit(ctx, {
+ action: "cancel",
+ resourceType: "deployment",
+ resourceId: deployment.deploymentId,
+ });
+ }),
+
+ removeDeployment: protectedProcedure
+ .input(
+ z.object({
+ deploymentId: z.string().min(1),
+ }),
+ )
+ .mutation(async ({ input, ctx }) => {
+ const deployment = await findDeploymentById(input.deploymentId);
+ const serviceId = deployment.applicationId || deployment.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ deployment: ["cancel"],
+ });
+ }
+ const result = await removeDeployment(input.deploymentId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "deployment",
+ resourceId: deployment.deploymentId,
+ });
+ return result;
}),
});
diff --git a/apps/dokploy/server/api/routers/destination.ts b/apps/dokploy/server/api/routers/destination.ts
index d7cbf53d5..81720fc1d 100644
--- a/apps/dokploy/server/api/routers/destination.ts
+++ b/apps/dokploy/server/api/routers/destination.ts
@@ -7,14 +7,11 @@ import {
removeDestinationById,
updateDestinationById,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
import { desc, eq } from "drizzle-orm";
-import {
- adminProcedure,
- createTRPCRouter,
- protectedProcedure,
-} from "@/server/api/trpc";
-import { db } from "@/server/db";
+import { createTRPCRouter, withPermission } from "@/server/api/trpc";
+import { audit } from "@/server/api/utils/audit";
import {
apiCreateDestination,
apiFindOneDestination,
@@ -24,14 +21,21 @@ import {
} from "@/server/db/schema";
export const destinationRouter = createTRPCRouter({
- create: adminProcedure
+ create: withPermission("destination", "create")
.input(apiCreateDestination)
.mutation(async ({ input, ctx }) => {
try {
- return await createDestintation(
+ const result = await createDestintation(
input,
ctx.session.activeOrganizationId,
);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "destination",
+ resourceId: result.destinationId,
+ resourceName: input.name,
+ });
+ return result;
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -40,7 +44,7 @@ export const destinationRouter = createTRPCRouter({
});
}
}),
- testConnection: adminProcedure
+ testConnection: withPermission("destination", "create")
.input(apiCreateDestination)
.mutation(async ({ input }) => {
const { secretAccessKey, bucket, region, endpoint, accessKey, provider } =
@@ -87,7 +91,7 @@ export const destinationRouter = createTRPCRouter({
});
}
}),
- one: protectedProcedure
+ one: withPermission("destination", "read")
.input(apiFindOneDestination)
.query(async ({ input, ctx }) => {
const destination = await findDestinationById(input.destinationId);
@@ -99,13 +103,13 @@ export const destinationRouter = createTRPCRouter({
}
return destination;
}),
- all: protectedProcedure.query(async ({ ctx }) => {
+ all: withPermission("destination", "read").query(async ({ ctx }) => {
return await db.query.destinations.findMany({
where: eq(destinations.organizationId, ctx.session.activeOrganizationId),
orderBy: [desc(destinations.createdAt)],
});
}),
- remove: adminProcedure
+ remove: withPermission("destination", "delete")
.input(apiRemoveDestination)
.mutation(async ({ input, ctx }) => {
try {
@@ -117,15 +121,22 @@ export const destinationRouter = createTRPCRouter({
message: "You are not allowed to delete this destination",
});
}
- return await removeDestinationById(
+ const result = await removeDestinationById(
input.destinationId,
ctx.session.activeOrganizationId,
);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "destination",
+ resourceId: input.destinationId,
+ resourceName: destination.name,
+ });
+ return result;
} catch (error) {
throw error;
}
}),
- update: adminProcedure
+ update: withPermission("destination", "create")
.input(apiUpdateDestination)
.mutation(async ({ input, ctx }) => {
try {
@@ -136,10 +147,17 @@ export const destinationRouter = createTRPCRouter({
message: "You are not allowed to update this destination",
});
}
- return await updateDestinationById(input.destinationId, {
+ const result = await updateDestinationById(input.destinationId, {
...input,
organizationId: ctx.session.activeOrganizationId,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "destination",
+ resourceId: input.destinationId,
+ resourceName: input.name,
+ });
+ return result;
} catch (error) {
throw error;
}
diff --git a/apps/dokploy/server/api/routers/docker.ts b/apps/dokploy/server/api/routers/docker.ts
index cc75f4852..d4a7ddd57 100644
--- a/apps/dokploy/server/api/routers/docker.ts
+++ b/apps/dokploy/server/api/routers/docker.ts
@@ -10,12 +10,13 @@ import {
} from "@dokploy/server";
import { TRPCError } from "@trpc/server";
import { z } from "zod";
-import { createTRPCRouter, protectedProcedure } from "../trpc";
+import { audit } from "@/server/api/utils/audit";
+import { createTRPCRouter, withPermission } from "../trpc";
export const containerIdRegex = /^[a-zA-Z0-9.\-_]+$/;
export const dockerRouter = createTRPCRouter({
- getContainers: protectedProcedure
+ getContainers: withPermission("docker", "read")
.input(
z.object({
serverId: z.string().optional(),
@@ -31,7 +32,7 @@ export const dockerRouter = createTRPCRouter({
return await getContainers(input.serverId);
}),
- restartContainer: protectedProcedure
+ restartContainer: withPermission("docker", "read")
.input(
z.object({
containerId: z
@@ -40,11 +41,18 @@ export const dockerRouter = createTRPCRouter({
.regex(containerIdRegex, "Invalid container id."),
}),
)
- .mutation(async ({ input }) => {
- return await containerRestart(input.containerId);
+ .mutation(async ({ input, ctx }) => {
+ const result = await containerRestart(input.containerId);
+ await audit(ctx, {
+ action: "start",
+ resourceType: "docker",
+ resourceId: input.containerId,
+ resourceName: input.containerId,
+ });
+ return result;
}),
- getConfig: protectedProcedure
+ getConfig: withPermission("docker", "read")
.input(
z.object({
containerId: z
@@ -64,12 +72,10 @@ export const dockerRouter = createTRPCRouter({
return await getConfig(input.containerId, input.serverId);
}),
- getContainersByAppNameMatch: protectedProcedure
+ getContainersByAppNameMatch: withPermission("service", "read")
.input(
z.object({
- appType: z
- .union([z.literal("stack"), z.literal("docker-compose")])
- .optional(),
+ appType: z.enum(["stack", "docker-compose"]).optional(),
appName: z.string().min(1).regex(containerIdRegex, "Invalid app name."),
serverId: z.string().optional(),
}),
@@ -88,7 +94,7 @@ export const dockerRouter = createTRPCRouter({
);
}),
- getContainersByAppLabel: protectedProcedure
+ getContainersByAppLabel: withPermission("docker", "read")
.input(
z.object({
appName: z.string().min(1).regex(containerIdRegex, "Invalid app name."),
@@ -110,7 +116,7 @@ export const dockerRouter = createTRPCRouter({
);
}),
- getStackContainersByAppName: protectedProcedure
+ getStackContainersByAppName: withPermission("docker", "read")
.input(
z.object({
appName: z.string().min(1).regex(containerIdRegex, "Invalid app name."),
@@ -127,7 +133,7 @@ export const dockerRouter = createTRPCRouter({
return await getStackContainersByAppName(input.appName, input.serverId);
}),
- getServiceContainersByAppName: protectedProcedure
+ getServiceContainersByAppName: withPermission("docker", "read")
.input(
z.object({
appName: z.string().min(1).regex(containerIdRegex, "Invalid app name."),
diff --git a/apps/dokploy/server/api/routers/domain.ts b/apps/dokploy/server/api/routers/domain.ts
index 861c3b9b6..8210fcf8a 100644
--- a/apps/dokploy/server/api/routers/domain.ts
+++ b/apps/dokploy/server/api/routers/domain.ts
@@ -1,7 +1,6 @@
import {
createDomain,
findApplicationById,
- findComposeById,
findDomainById,
findDomainsByApplicationId,
findDomainsByComposeId,
@@ -15,9 +14,15 @@ import {
updateDomainById,
validateDomain,
} from "@dokploy/server";
+import { checkServicePermissionAndAccess } from "@dokploy/server/services/permission";
import { TRPCError } from "@trpc/server";
import { z } from "zod";
-import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
+import {
+ createTRPCRouter,
+ protectedProcedure,
+ withPermission,
+} from "@/server/api/trpc";
+import { audit } from "@/server/api/utils/audit";
import {
apiCreateDomain,
apiFindCompose,
@@ -32,29 +37,22 @@ export const domainRouter = createTRPCRouter({
.mutation(async ({ input, ctx }) => {
try {
if (input.domainType === "compose" && input.composeId) {
- const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this compose",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ domain: ["create"],
+ });
} else if (input.domainType === "application" && input.applicationId) {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ domain: ["create"],
+ });
}
- return await createDomain(input);
+ const domain = await createDomain(input);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "domain",
+ resourceId: domain.domainId,
+ resourceName: domain.host,
+ });
+ return domain;
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -69,34 +67,20 @@ export const domainRouter = createTRPCRouter({
byApplicationId: protectedProcedure
.input(apiFindOneApplication)
.query(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ domain: ["read"],
+ });
return await findDomainsByApplicationId(input.applicationId);
}),
byComposeId: protectedProcedure
.input(apiFindCompose)
.query(async ({ input, ctx }) => {
- const compose = await findComposeById(input.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this compose",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.composeId, {
+ domain: ["read"],
+ });
return await findDomainsByComposeId(input.composeId);
}),
- generateDomain: protectedProcedure
+ generateDomain: withPermission("domain", "create")
.input(z.object({ appName: z.string(), serverId: z.string().optional() }))
.mutation(async ({ input, ctx }) => {
return generateTraefikMeDomain(
@@ -105,7 +89,7 @@ export const domainRouter = createTRPCRouter({
input.serverId,
);
}),
- canGenerateTraefikMeDomains: protectedProcedure
+ canGenerateTraefikMeDomains: withPermission("domain", "read")
.input(z.object({ serverId: z.string() }))
.query(async ({ input }) => {
if (input.serverId) {
@@ -120,45 +104,28 @@ export const domainRouter = createTRPCRouter({
.input(apiUpdateDomain)
.mutation(async ({ input, ctx }) => {
const currentDomain = await findDomainById(input.domainId);
-
- if (currentDomain.applicationId) {
- const newApp = await findApplicationById(currentDomain.applicationId);
- if (
- newApp.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
- } else if (currentDomain.composeId) {
- const newCompose = await findComposeById(currentDomain.composeId);
- if (
- newCompose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this compose",
- });
- }
+ const serviceId = currentDomain.applicationId || currentDomain.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ domain: ["create"],
+ });
} else if (currentDomain.previewDeploymentId) {
- const newPreviewDeployment = await findPreviewDeploymentById(
+ const preview = await findPreviewDeploymentById(
currentDomain.previewDeploymentId,
);
- if (
- newPreviewDeployment.application.environment.project
- .organizationId !== ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this preview deployment",
- });
- }
+ await checkServicePermissionAndAccess(ctx, preview.applicationId, {
+ domain: ["create"],
+ });
}
+
const result = await updateDomainById(input.domainId, input);
const domain = await findDomainById(input.domainId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "domain",
+ resourceId: domain.domainId,
+ resourceName: domain.host,
+ });
if (domain.applicationId) {
const application = await findApplicationById(domain.applicationId);
await manageDomain(application, domain);
@@ -176,59 +143,46 @@ export const domainRouter = createTRPCRouter({
}),
one: protectedProcedure.input(apiFindDomain).query(async ({ input, ctx }) => {
const domain = await findDomainById(input.domainId);
- if (domain.applicationId) {
- const application = await findApplicationById(domain.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
- } else if (domain.composeId) {
- const compose = await findComposeById(domain.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this compose",
- });
- }
+ const serviceId = domain.applicationId || domain.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ domain: ["read"],
+ });
+ } else if (domain.previewDeploymentId) {
+ const preview = await findPreviewDeploymentById(
+ domain.previewDeploymentId,
+ );
+ await checkServicePermissionAndAccess(ctx, preview.applicationId, {
+ domain: ["read"],
+ });
}
- return await findDomainById(input.domainId);
+ return domain;
}),
delete: protectedProcedure
.input(apiFindDomain)
.mutation(async ({ input, ctx }) => {
const domain = await findDomainById(input.domainId);
- if (domain.applicationId) {
- const application = await findApplicationById(domain.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
- } else if (domain.composeId) {
- const compose = await findComposeById(domain.composeId);
- if (
- compose.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this compose",
- });
- }
+ const serviceId = domain.applicationId || domain.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ domain: ["delete"],
+ });
+ } else if (domain.previewDeploymentId) {
+ const preview = await findPreviewDeploymentById(
+ domain.previewDeploymentId,
+ );
+ await checkServicePermissionAndAccess(ctx, preview.applicationId, {
+ domain: ["delete"],
+ });
}
+
const result = await removeDomainById(input.domainId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "domain",
+ resourceId: domain.domainId,
+ resourceName: domain.host,
+ });
if (domain.applicationId) {
const application = await findApplicationById(domain.applicationId);
@@ -238,7 +192,7 @@ export const domainRouter = createTRPCRouter({
return result;
}),
- validateDomain: protectedProcedure
+ validateDomain: withPermission("domain", "read")
.input(
z.object({
domain: z.string(),
diff --git a/apps/dokploy/server/api/routers/environment.ts b/apps/dokploy/server/api/routers/environment.ts
index 9f5eb45c2..c773d8ef9 100644
--- a/apps/dokploy/server/api/routers/environment.ts
+++ b/apps/dokploy/server/api/routers/environment.ts
@@ -1,28 +1,35 @@
import {
- addNewEnvironment,
- checkEnvironmentAccess,
- checkEnvironmentCreationPermission,
- checkEnvironmentDeletionPermission,
createEnvironment,
deleteEnvironment,
duplicateEnvironment,
findEnvironmentById,
findEnvironmentsByProjectId,
- findMemberById,
updateEnvironmentById,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
+import {
+ addNewEnvironment,
+ checkEnvironmentAccess,
+ checkEnvironmentCreationPermission,
+ checkEnvironmentDeletionPermission,
+ checkPermission,
+ findMemberByUserId,
+} from "@dokploy/server/services/permission";
import { TRPCError } from "@trpc/server";
+import { and, desc, eq, ilike, or, sql } from "drizzle-orm";
import { z } from "zod";
import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
+import { audit } from "@/server/api/utils/audit";
import {
apiCreateEnvironment,
apiDuplicateEnvironment,
apiFindOneEnvironment,
apiRemoveEnvironment,
apiUpdateEnvironment,
+ environments,
+ projects,
} from "@/server/db/schema";
-// Helper function to filter services within an environment based on user permissions
const filterEnvironmentServices = (
environment: any,
accessedServices: string[],
@@ -56,12 +63,7 @@ export const environmentRouter = createTRPCRouter({
.input(apiCreateEnvironment)
.mutation(async ({ input, ctx }) => {
try {
- // Check if user has permission to create environments
- await checkEnvironmentCreationPermission(
- ctx.user.id,
- input.projectId,
- ctx.session.activeOrganizationId,
- );
+ await checkEnvironmentCreationPermission(ctx, input.projectId);
if (input.name === "production") {
throw new TRPCError({
@@ -71,16 +73,15 @@ export const environmentRouter = createTRPCRouter({
});
}
- // Allow users to create environments with any name, including "production"
const environment = await createEnvironment(input);
- if (ctx.user.role === "member") {
- await addNewEnvironment(
- ctx.user.id,
- environment.environmentId,
- ctx.session.activeOrganizationId,
- );
- }
+ await addNewEnvironment(ctx, environment.environmentId);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "environment",
+ resourceId: environment.environmentId,
+ resourceName: environment.name,
+ });
return environment;
} catch (error) {
if (error instanceof TRPCError) {
@@ -97,54 +98,39 @@ export const environmentRouter = createTRPCRouter({
one: protectedProcedure
.input(apiFindOneEnvironment)
.query(async ({ input, ctx }) => {
- try {
- if (ctx.user.role === "member") {
- await checkEnvironmentAccess(
+ const environment = await findEnvironmentById(input.environmentId);
+ if (
+ environment.project.organizationId !== ctx.session.activeOrganizationId
+ ) {
+ throw new TRPCError({
+ code: "FORBIDDEN",
+ message: "You are not allowed to access this environment",
+ });
+ }
+
+ if (ctx.user.role !== "owner" && ctx.user.role !== "admin") {
+ const { accessedEnvironments, accessedServices } =
+ await findMemberByUserId(
ctx.user.id,
- input.environmentId,
ctx.session.activeOrganizationId,
- "access",
);
- }
- const environment = await findEnvironmentById(input.environmentId);
- if (
- environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
+
+ if (!accessedEnvironments.includes(environment.environmentId)) {
throw new TRPCError({
code: "FORBIDDEN",
message: "You are not allowed to access this environment",
});
}
- // Check environment access and filter services for members
- if (ctx.user.role === "member") {
- const { accessedEnvironments, accessedServices } =
- await findMemberById(ctx.user.id, ctx.session.activeOrganizationId);
+ const filteredEnvironment = filterEnvironmentServices(
+ environment,
+ accessedServices,
+ );
- if (!accessedEnvironments.includes(environment.environmentId)) {
- throw new TRPCError({
- code: "FORBIDDEN",
- message: "You are not allowed to access this environment",
- });
- }
-
- // Filter services based on member permissions
- const filteredEnvironment = filterEnvironmentServices(
- environment,
- accessedServices,
- );
-
- return filteredEnvironment;
- }
-
- return environment;
- } catch (error) {
- throw new TRPCError({
- code: "NOT_FOUND",
- message: "Environment not found",
- });
+ return filteredEnvironment;
}
+
+ return environment;
}),
byProjectId: protectedProcedure
@@ -153,7 +139,6 @@ export const environmentRouter = createTRPCRouter({
try {
const environments = await findEnvironmentsByProjectId(input.projectId);
- // Check organization access
if (
environments.some(
(environment) =>
@@ -167,12 +152,13 @@ export const environmentRouter = createTRPCRouter({
});
}
- // Filter environments for members based on their permissions
- if (ctx.user.role === "member") {
+ if (ctx.user.role !== "owner" && ctx.user.role !== "admin") {
const { accessedEnvironments, accessedServices } =
- await findMemberById(ctx.user.id, ctx.session.activeOrganizationId);
+ await findMemberByUserId(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
- // Filter environments to only show those the member has access to
const filteredEnvironments = environments
.filter((environment) =>
accessedEnvironments.includes(environment.environmentId),
@@ -208,7 +194,6 @@ export const environmentRouter = createTRPCRouter({
});
}
- // Prevent deletion of the default environment
if (environment.isDefault) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -216,24 +201,17 @@ export const environmentRouter = createTRPCRouter({
});
}
- // Check environment deletion permission
- await checkEnvironmentDeletionPermission(
- ctx.user.id,
- environment.projectId,
- ctx.session.activeOrganizationId,
- );
+ await checkEnvironmentDeletionPermission(ctx, environment.projectId);
- // Additional check for environment access for members
- if (ctx.user.role === "member") {
- await checkEnvironmentAccess(
- ctx.user.id,
- input.environmentId,
- ctx.session.activeOrganizationId,
- "access",
- );
- }
+ await checkEnvironmentAccess(ctx, input.environmentId, "read");
const deletedEnvironment = await deleteEnvironment(input.environmentId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "environment",
+ resourceId: deletedEnvironment?.environmentId,
+ resourceName: deletedEnvironment?.name,
+ });
return deletedEnvironment;
} catch (error) {
if (error instanceof TRPCError) {
@@ -253,18 +231,14 @@ export const environmentRouter = createTRPCRouter({
try {
const { environmentId, ...updateData } = input;
- // Allow users to rename environments to any name, including "production"
- if (ctx.user.role === "member") {
- await checkEnvironmentAccess(
- ctx.user.id,
- environmentId,
- ctx.session.activeOrganizationId,
- "access",
- );
+ await checkEnvironmentAccess(ctx, environmentId, "read");
+
+ if (updateData.env !== undefined) {
+ await checkPermission(ctx, { environmentEnvVars: ["write"] });
}
+
const currentEnvironment = await findEnvironmentById(environmentId);
- // Prevent renaming the default environment, but allow updating env and description
if (currentEnvironment.isDefault && updateData.name !== undefined) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -281,9 +255,8 @@ export const environmentRouter = createTRPCRouter({
});
}
- // Check environment access for members
- if (ctx.user.role === "member") {
- const { accessedEnvironments } = await findMemberById(
+ if (ctx.user.role !== "owner" && ctx.user.role !== "admin") {
+ const { accessedEnvironments } = await findMemberByUserId(
ctx.user.id,
ctx.session.activeOrganizationId,
);
@@ -302,6 +275,14 @@ export const environmentRouter = createTRPCRouter({
environmentId,
updateData,
);
+ if (environment) {
+ await audit(ctx, {
+ action: "update",
+ resourceType: "environment",
+ resourceId: environment.environmentId,
+ resourceName: environment.name,
+ });
+ }
return environment;
} catch (error) {
throw new TRPCError({
@@ -315,14 +296,7 @@ export const environmentRouter = createTRPCRouter({
.input(apiDuplicateEnvironment)
.mutation(async ({ input, ctx }) => {
try {
- if (ctx.user.role === "member") {
- await checkEnvironmentAccess(
- ctx.user.id,
- input.environmentId,
- ctx.session.activeOrganizationId,
- "access",
- );
- }
+ await checkEnvironmentAccess(ctx, input.environmentId, "read");
const environment = await findEnvironmentById(input.environmentId);
if (
environment.project.organizationId !==
@@ -334,9 +308,8 @@ export const environmentRouter = createTRPCRouter({
});
}
- // Check environment access for members
- if (ctx.user.role === "member") {
- const { accessedEnvironments } = await findMemberById(
+ if (ctx.user.role !== "owner" && ctx.user.role !== "admin") {
+ const { accessedEnvironments } = await findMemberByUserId(
ctx.user.id,
ctx.session.activeOrganizationId,
);
@@ -350,6 +323,13 @@ export const environmentRouter = createTRPCRouter({
}
const duplicatedEnvironment = await duplicateEnvironment(input);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "environment",
+ resourceId: duplicatedEnvironment.environmentId,
+ resourceName: duplicatedEnvironment.name,
+ metadata: { duplicatedFrom: input.environmentId },
+ });
return duplicatedEnvironment;
} catch (error) {
throw new TRPCError({
@@ -358,4 +338,92 @@ export const environmentRouter = createTRPCRouter({
});
}
}),
+
+ search: protectedProcedure
+ .input(
+ z.object({
+ q: z.string().optional(),
+ name: z.string().optional(),
+ description: z.string().optional(),
+ projectId: z.string().optional(),
+ limit: z.number().min(1).max(100).default(20),
+ offset: z.number().min(0).default(0),
+ }),
+ )
+ .query(async ({ ctx, input }) => {
+ const baseConditions = [
+ eq(projects.organizationId, ctx.session.activeOrganizationId),
+ ];
+
+ if (input.projectId) {
+ baseConditions.push(eq(environments.projectId, input.projectId));
+ }
+
+ if (input.q?.trim()) {
+ const term = `%${input.q.trim()}%`;
+ baseConditions.push(
+ or(
+ ilike(environments.name, term),
+ ilike(environments.description ?? "", term),
+ )!,
+ );
+ }
+
+ if (input.name?.trim()) {
+ baseConditions.push(ilike(environments.name, `%${input.name.trim()}%`));
+ }
+ if (input.description?.trim()) {
+ baseConditions.push(
+ ilike(
+ environments.description ?? "",
+ `%${input.description.trim()}%`,
+ ),
+ );
+ }
+
+ if (ctx.user.role !== "owner" && ctx.user.role !== "admin") {
+ const { accessedEnvironments } = await findMemberByUserId(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
+ if (accessedEnvironments.length === 0) return { items: [], total: 0 };
+ baseConditions.push(
+ sql`${environments.environmentId} IN (${sql.join(
+ accessedEnvironments.map((id) => sql`${id}`),
+ sql`, `,
+ )})`,
+ );
+ }
+
+ const where = and(...baseConditions);
+
+ const [items, countResult] = await Promise.all([
+ db
+ .select({
+ environmentId: environments.environmentId,
+ name: environments.name,
+ description: environments.description,
+ createdAt: environments.createdAt,
+ env: environments.env,
+ projectId: environments.projectId,
+ isDefault: environments.isDefault,
+ })
+ .from(environments)
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where)
+ .orderBy(desc(environments.createdAt))
+ .limit(input.limit)
+ .offset(input.offset),
+ db
+ .select({ count: sql`count(*)::int` })
+ .from(environments)
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where),
+ ]);
+
+ return {
+ items,
+ total: countResult[0]?.count ?? 0,
+ };
+ }),
});
diff --git a/apps/dokploy/server/api/routers/git-provider.ts b/apps/dokploy/server/api/routers/git-provider.ts
index 1c3f34736..b0aa8627d 100644
--- a/apps/dokploy/server/api/routers/git-provider.ts
+++ b/apps/dokploy/server/api/routers/git-provider.ts
@@ -1,8 +1,13 @@
import { findGitProviderById, removeGitProvider } from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
import { and, desc, eq } from "drizzle-orm";
-import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
+import { audit } from "@/server/api/utils/audit";
+import {
+ createTRPCRouter,
+ protectedProcedure,
+ withPermission,
+} from "@/server/api/trpc";
import { apiRemoveGitProvider, gitProvider } from "@/server/db/schema";
export const gitProviderRouter = createTRPCRouter({
@@ -21,7 +26,7 @@ export const gitProviderRouter = createTRPCRouter({
),
});
}),
- remove: protectedProcedure
+ remove: withPermission("gitProviders", "delete")
.input(apiRemoveGitProvider)
.mutation(async ({ input, ctx }) => {
try {
@@ -33,6 +38,12 @@ export const gitProviderRouter = createTRPCRouter({
message: "You are not allowed to delete this Git provider",
});
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "gitProvider",
+ resourceId: gitProvider.gitProviderId,
+ resourceName: gitProvider.name ?? gitProvider.gitProviderId,
+ });
return await removeGitProvider(input.gitProviderId);
} catch (error) {
const message =
diff --git a/apps/dokploy/server/api/routers/gitea.ts b/apps/dokploy/server/api/routers/gitea.ts
index 7ddd1985b..1ab6cd647 100644
--- a/apps/dokploy/server/api/routers/gitea.ts
+++ b/apps/dokploy/server/api/routers/gitea.ts
@@ -8,9 +8,14 @@ import {
updateGitea,
updateGitProvider,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
-import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
+import {
+ createTRPCRouter,
+ protectedProcedure,
+ withPermission,
+} from "@/server/api/trpc";
+import { audit } from "@/server/api/utils/audit";
import {
apiCreateGitea,
apiFindGiteaBranches,
@@ -20,15 +25,24 @@ import {
} from "@/server/db/schema";
export const giteaRouter = createTRPCRouter({
- create: protectedProcedure
+ create: withPermission("gitProviders", "create")
.input(apiCreateGitea)
.mutation(async ({ input, ctx }) => {
try {
- return await createGitea(
+ const result = await createGitea(
input,
ctx.session.activeOrganizationId,
ctx.session.userId,
);
+
+ await audit(ctx, {
+ action: "create",
+ resourceType: "gitProvider",
+ resourceId: result.giteaId,
+ resourceName: input.name,
+ });
+
+ return result;
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -38,24 +52,11 @@ export const giteaRouter = createTRPCRouter({
}
}),
- one: protectedProcedure
- .input(apiFindOneGitea)
- .query(async ({ input, ctx }) => {
- const giteaProvider = await findGiteaById(input.giteaId);
- if (
- giteaProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- giteaProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this Gitea provider",
- });
- }
- return giteaProvider;
- }),
+ one: protectedProcedure.input(apiFindOneGitea).query(async ({ input }) => {
+ return await findGiteaById(input.giteaId);
+ }),
- giteaProviders: protectedProcedure.query(async ({ ctx }: { ctx: any }) => {
+ giteaProviders: protectedProcedure.query(async ({ ctx }) => {
let result = await db.query.gitea.findMany({
with: {
gitProvider: true,
@@ -85,7 +86,7 @@ export const giteaRouter = createTRPCRouter({
getGiteaRepositories: protectedProcedure
.input(apiFindOneGitea)
- .query(async ({ input, ctx }) => {
+ .query(async ({ input }) => {
const { giteaId } = input;
if (!giteaId) {
@@ -95,18 +96,6 @@ export const giteaRouter = createTRPCRouter({
});
}
- const giteaProvider = await findGiteaById(giteaId);
- if (
- giteaProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- giteaProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this Gitea provider",
- });
- }
-
try {
const repositories = await getGiteaRepositories(giteaId);
return repositories;
@@ -121,7 +110,7 @@ export const giteaRouter = createTRPCRouter({
getGiteaBranches: protectedProcedure
.input(apiFindGiteaBranches)
- .query(async ({ input, ctx }) => {
+ .query(async ({ input }) => {
const { giteaId, owner, repositoryName } = input;
if (!giteaId || !owner || !repositoryName) {
@@ -132,18 +121,6 @@ export const giteaRouter = createTRPCRouter({
});
}
- const giteaProvider = await findGiteaById(giteaId);
- if (
- giteaProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- giteaProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this Gitea provider",
- });
- }
-
try {
return await getGiteaBranches({
giteaId,
@@ -161,22 +138,10 @@ export const giteaRouter = createTRPCRouter({
testConnection: protectedProcedure
.input(apiGiteaTestConnection)
- .mutation(async ({ input, ctx }) => {
+ .mutation(async ({ input }) => {
const giteaId = input.giteaId ?? "";
try {
- const giteaProvider = await findGiteaById(giteaId);
- if (
- giteaProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- giteaProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this Gitea provider",
- });
- }
-
const result = await testGiteaConnection({
giteaId,
});
@@ -191,21 +156,9 @@ export const giteaRouter = createTRPCRouter({
}
}),
- update: protectedProcedure
+ update: withPermission("gitProviders", "create")
.input(apiUpdateGitea)
.mutation(async ({ input, ctx }) => {
- const giteaProvider = await findGiteaById(input.giteaId);
- if (
- giteaProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- giteaProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this Gitea provider",
- });
- }
-
if (input.name) {
await updateGitProvider(input.gitProviderId, {
name: input.name,
@@ -221,12 +174,19 @@ export const giteaRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "gitProvider",
+ resourceId: input.giteaId,
+ resourceName: input.name,
+ });
+
return { success: true };
}),
getGiteaUrl: protectedProcedure
.input(apiFindOneGitea)
- .query(async ({ input, ctx }) => {
+ .query(async ({ input }) => {
const { giteaId } = input;
if (!giteaId) {
@@ -237,16 +197,6 @@ export const giteaRouter = createTRPCRouter({
}
const giteaProvider = await findGiteaById(giteaId);
- if (
- giteaProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- giteaProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this Gitea provider",
- });
- }
// Return the base URL of the Gitea instance
return giteaProvider.giteaUrl;
diff --git a/apps/dokploy/server/api/routers/github.ts b/apps/dokploy/server/api/routers/github.ts
index 9e739c25c..e10d05771 100644
--- a/apps/dokploy/server/api/routers/github.ts
+++ b/apps/dokploy/server/api/routers/github.ts
@@ -6,9 +6,14 @@ import {
updateGithub,
updateGitProvider,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
-import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
+import {
+ createTRPCRouter,
+ protectedProcedure,
+ withPermission,
+} from "@/server/api/trpc";
+import { audit } from "@/server/api/utils/audit";
import {
apiFindGithubBranches,
apiFindOneGithub,
@@ -16,53 +21,17 @@ import {
} from "@/server/db/schema";
export const githubRouter = createTRPCRouter({
- one: protectedProcedure
- .input(apiFindOneGithub)
- .query(async ({ input, ctx }) => {
- const githubProvider = await findGithubById(input.githubId);
- if (
- githubProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- githubProvider.gitProvider.userId === ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this github provider",
- });
- }
- return githubProvider;
- }),
+ one: protectedProcedure.input(apiFindOneGithub).query(async ({ input }) => {
+ return await findGithubById(input.githubId);
+ }),
getGithubRepositories: protectedProcedure
.input(apiFindOneGithub)
- .query(async ({ input, ctx }) => {
- const githubProvider = await findGithubById(input.githubId);
- if (
- githubProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- githubProvider.gitProvider.userId === ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this github provider",
- });
- }
+ .query(async ({ input }) => {
return await getGithubRepositories(input.githubId);
}),
getGithubBranches: protectedProcedure
.input(apiFindGithubBranches)
- .query(async ({ input, ctx }) => {
- const githubProvider = await findGithubById(input.githubId || "");
- if (
- githubProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- githubProvider.gitProvider.userId === ctx.session.userId
- ) {
- //TODO: Remove this line when the cloud version is ready
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this github provider",
- });
- }
+ .query(async ({ input }) => {
return await getGithubBranches(input);
}),
githubProviders: protectedProcedure.query(async ({ ctx }) => {
@@ -95,19 +64,8 @@ export const githubRouter = createTRPCRouter({
testConnection: protectedProcedure
.input(apiFindOneGithub)
- .mutation(async ({ input, ctx }) => {
+ .mutation(async ({ input }) => {
try {
- const githubProvider = await findGithubById(input.githubId);
- if (
- githubProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- githubProvider.gitProvider.userId === ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this github provider",
- });
- }
const result = await getGithubRepositories(input.githubId);
return `Found ${result.length} repositories`;
} catch (err) {
@@ -117,20 +75,9 @@ export const githubRouter = createTRPCRouter({
});
}
}),
- update: protectedProcedure
+ update: withPermission("gitProviders", "create")
.input(apiUpdateGithub)
.mutation(async ({ input, ctx }) => {
- const githubProvider = await findGithubById(input.githubId);
- if (
- githubProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- githubProvider.gitProvider.userId === ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this github provider",
- });
- }
await updateGitProvider(input.gitProviderId, {
name: input.name,
organizationId: ctx.session.activeOrganizationId,
@@ -139,5 +86,12 @@ export const githubRouter = createTRPCRouter({
await updateGithub(input.githubId, {
...input,
});
+
+ await audit(ctx, {
+ action: "update",
+ resourceType: "gitProvider",
+ resourceId: input.gitProviderId,
+ resourceName: input.name,
+ });
}),
});
diff --git a/apps/dokploy/server/api/routers/gitlab.ts b/apps/dokploy/server/api/routers/gitlab.ts
index 1ff2b55cc..e4efbd87b 100644
--- a/apps/dokploy/server/api/routers/gitlab.ts
+++ b/apps/dokploy/server/api/routers/gitlab.ts
@@ -8,9 +8,14 @@ import {
updateGitlab,
updateGitProvider,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
-import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
+import {
+ createTRPCRouter,
+ protectedProcedure,
+ withPermission,
+} from "@/server/api/trpc";
+import { audit } from "@/server/api/utils/audit";
import {
apiCreateGitlab,
apiFindGitlabBranches,
@@ -20,15 +25,23 @@ import {
} from "@/server/db/schema";
export const gitlabRouter = createTRPCRouter({
- create: protectedProcedure
+ create: withPermission("gitProviders", "create")
.input(apiCreateGitlab)
.mutation(async ({ input, ctx }) => {
try {
- return await createGitlab(
+ const result = await createGitlab(
input,
ctx.session.activeOrganizationId,
ctx.session.userId,
);
+
+ await audit(ctx, {
+ action: "create",
+ resourceType: "gitProvider",
+ resourceName: input.name,
+ });
+
+ return result;
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -37,22 +50,9 @@ export const gitlabRouter = createTRPCRouter({
});
}
}),
- one: protectedProcedure
- .input(apiFindOneGitlab)
- .query(async ({ input, ctx }) => {
- const gitlabProvider = await findGitlabById(input.gitlabId);
- if (
- gitlabProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- gitlabProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this Gitlab provider",
- });
- }
- return gitlabProvider;
- }),
+ one: protectedProcedure.input(apiFindOneGitlab).query(async ({ input }) => {
+ return await findGitlabById(input.gitlabId);
+ }),
gitlabProviders: protectedProcedure.query(async ({ ctx }) => {
let result = await db.query.gitlab.findMany({
with: {
@@ -83,52 +83,19 @@ export const gitlabRouter = createTRPCRouter({
}),
getGitlabRepositories: protectedProcedure
.input(apiFindOneGitlab)
- .query(async ({ input, ctx }) => {
- const gitlabProvider = await findGitlabById(input.gitlabId);
- if (
- gitlabProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- gitlabProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this Gitlab provider",
- });
- }
+ .query(async ({ input }) => {
return await getGitlabRepositories(input.gitlabId);
}),
getGitlabBranches: protectedProcedure
.input(apiFindGitlabBranches)
- .query(async ({ input, ctx }) => {
- const gitlabProvider = await findGitlabById(input.gitlabId || "");
- if (
- gitlabProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- gitlabProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this Gitlab provider",
- });
- }
+ .query(async ({ input }) => {
return await getGitlabBranches(input);
}),
testConnection: protectedProcedure
.input(apiGitlabTestConnection)
- .mutation(async ({ input, ctx }) => {
+ .mutation(async ({ input }) => {
try {
- const gitlabProvider = await findGitlabById(input.gitlabId || "");
- if (
- gitlabProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- gitlabProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this Gitlab provider",
- });
- }
const result = await testGitlabConnection(input);
return `Found ${result} repositories`;
@@ -139,20 +106,9 @@ export const gitlabRouter = createTRPCRouter({
});
}
}),
- update: protectedProcedure
+ update: withPermission("gitProviders", "create")
.input(apiUpdateGitlab)
.mutation(async ({ input, ctx }) => {
- const gitlabProvider = await findGitlabById(input.gitlabId);
- if (
- gitlabProvider.gitProvider.organizationId !==
- ctx.session.activeOrganizationId &&
- gitlabProvider.gitProvider.userId !== ctx.session.userId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to access this Gitlab provider",
- });
- }
if (input.name) {
await updateGitProvider(input.gitProviderId, {
name: input.name,
@@ -167,5 +123,12 @@ export const gitlabRouter = createTRPCRouter({
...input,
});
}
+
+ await audit(ctx, {
+ action: "update",
+ resourceType: "gitProvider",
+ resourceId: input.gitProviderId,
+ resourceName: input.name,
+ });
}),
});
diff --git a/apps/dokploy/server/api/routers/mariadb.ts b/apps/dokploy/server/api/routers/mariadb.ts
index 1f58eec1b..bb739a43b 100644
--- a/apps/dokploy/server/api/routers/mariadb.ts
+++ b/apps/dokploy/server/api/routers/mariadb.ts
@@ -1,7 +1,5 @@
import {
- addNewService,
checkPortInUse,
- checkServiceAccess,
createMariadb,
createMount,
deployMariadb,
@@ -19,12 +17,19 @@ import {
stopServiceRemote,
updateMariadbById,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
+import {
+ addNewService,
+ checkServiceAccess,
+ checkServicePermissionAndAccess,
+ findMemberByUserId,
+} from "@dokploy/server/services/permission";
import { TRPCError } from "@trpc/server";
import { observable } from "@trpc/server/observable";
-import { eq } from "drizzle-orm";
+import { and, desc, eq, ilike, or, sql } from "drizzle-orm";
import { z } from "zod";
import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
+import { audit } from "@/server/api/utils/audit";
import {
apiChangeMariaDBStatus,
apiCreateMariaDB,
@@ -35,7 +40,9 @@ import {
apiSaveEnvironmentVariablesMariaDB,
apiSaveExternalPortMariaDB,
apiUpdateMariaDB,
+ environments,
mariadb as mariadbTable,
+ projects,
} from "@/server/db/schema";
import { cancelJobs } from "@/server/utils/backup";
export const mariadbRouter = createTRPCRouter({
@@ -43,18 +50,10 @@ export const mariadbRouter = createTRPCRouter({
.input(apiCreateMariaDB)
.mutation(async ({ input, ctx }) => {
try {
- // Get project from environment
const environment = await findEnvironmentById(input.environmentId);
const project = await findProjectById(environment.projectId);
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- project.projectId,
- ctx.session.activeOrganizationId,
- "create",
- );
- }
+ await checkServiceAccess(ctx, project.projectId, "create");
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
@@ -72,13 +71,7 @@ export const mariadbRouter = createTRPCRouter({
const newMariadb = await createMariadb({
...input,
});
- if (ctx.user.role === "member") {
- await addNewService(
- ctx.user.id,
- newMariadb.mariadbId,
- project.organizationId,
- );
- }
+ await addNewService(ctx, newMariadb.mariadbId);
await createMount({
serviceId: newMariadb.mariadbId,
@@ -88,6 +81,12 @@ export const mariadbRouter = createTRPCRouter({
type: "volume",
});
+ await audit(ctx, {
+ action: "create",
+ resourceType: "service",
+ resourceId: newMariadb.mariadbId,
+ resourceName: newMariadb.appName,
+ });
return newMariadb;
} catch (error) {
if (error instanceof TRPCError) {
@@ -99,14 +98,7 @@ export const mariadbRouter = createTRPCRouter({
one: protectedProcedure
.input(apiFindOneMariaDB)
.query(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.mariadbId,
- ctx.session.activeOrganizationId,
- "access",
- );
- }
+ await checkServiceAccess(ctx, input.mariadbId, "read");
const mariadb = await findMariadbById(input.mariadbId);
if (
mariadb.environment.project.organizationId !==
@@ -123,16 +115,10 @@ export const mariadbRouter = createTRPCRouter({
start: protectedProcedure
.input(apiFindOneMariaDB)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mariadbId, {
+ deployment: ["create"],
+ });
const service = await findMariadbById(input.mariadbId);
- if (
- service.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to start this Mariadb",
- });
- }
if (service.serverId) {
await startServiceRemote(service.serverId, service.appName);
} else {
@@ -142,11 +128,20 @@ export const mariadbRouter = createTRPCRouter({
applicationStatus: "done",
});
+ await audit(ctx, {
+ action: "start",
+ resourceType: "service",
+ resourceId: service.mariadbId,
+ resourceName: service.appName,
+ });
return service;
}),
stop: protectedProcedure
.input(apiFindOneMariaDB)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mariadbId, {
+ deployment: ["create"],
+ });
const mariadb = await findMariadbById(input.mariadbId);
if (mariadb.serverId) {
@@ -158,21 +153,21 @@ export const mariadbRouter = createTRPCRouter({
applicationStatus: "idle",
});
+ await audit(ctx, {
+ action: "stop",
+ resourceType: "service",
+ resourceId: mariadb.mariadbId,
+ resourceName: mariadb.appName,
+ });
return mariadb;
}),
saveExternalPort: protectedProcedure
.input(apiSaveExternalPortMariaDB)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mariadbId, {
+ service: ["create"],
+ });
const mariadb = await findMariadbById(input.mariadbId);
- if (
- mariadb.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this external port",
- });
- }
if (input.externalPort) {
const portCheck = await checkPortInUse(
@@ -191,22 +186,28 @@ export const mariadbRouter = createTRPCRouter({
externalPort: input.externalPort,
});
await deployMariadb(input.mariadbId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: mariadb.mariadbId,
+ resourceName: mariadb.appName,
+ });
return mariadb;
}),
deploy: protectedProcedure
.input(apiDeployMariaDB)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mariadbId, {
+ deployment: ["create"],
+ });
const mariadb = await findMariadbById(input.mariadbId);
- if (
- mariadb.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this Mariadb",
- });
- }
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "service",
+ resourceId: mariadb.mariadbId,
+ resourceName: mariadb.appName,
+ });
return deployMariadb(input.mariadbId);
}),
deployWithLogs: protectedProcedure
@@ -220,16 +221,9 @@ export const mariadbRouter = createTRPCRouter({
})
.input(apiDeployMariaDB)
.subscription(async ({ input, ctx }) => {
- const mariadb = await findMariadbById(input.mariadbId);
- if (
- mariadb.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this Mariadb",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.mariadbId, {
+ deployment: ["create"],
+ });
return observable((emit) => {
deployMariadb(input.mariadbId, (log) => {
@@ -240,32 +234,25 @@ export const mariadbRouter = createTRPCRouter({
changeStatus: protectedProcedure
.input(apiChangeMariaDBStatus)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mariadbId, {
+ deployment: ["create"],
+ });
const mongo = await findMariadbById(input.mariadbId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to change this Mariadb status",
- });
- }
await updateMariadbById(input.mariadbId, {
applicationStatus: input.applicationStatus,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: mongo.mariadbId,
+ resourceName: mongo.appName,
+ });
return mongo;
}),
remove: protectedProcedure
.input(apiFindOneMariaDB)
.mutation(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.mariadbId,
- ctx.session.activeOrganizationId,
- "delete",
- );
- }
+ await checkServiceAccess(ctx, input.mariadbId, "delete");
const mongo = await findMariadbById(input.mariadbId);
if (
@@ -278,6 +265,12 @@ export const mariadbRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "service",
+ resourceId: mongo.mariadbId,
+ resourceName: mongo.appName,
+ });
const backups = await findBackupsByDbId(input.mariadbId, "mariadb");
const cleanupOperations = [
async () => await removeService(mongo?.appName, mongo.serverId),
@@ -296,16 +289,9 @@ export const mariadbRouter = createTRPCRouter({
saveEnvironment: protectedProcedure
.input(apiSaveEnvironmentVariablesMariaDB)
.mutation(async ({ input, ctx }) => {
- const mariadb = await findMariadbById(input.mariadbId);
- if (
- mariadb.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this environment",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.mariadbId, {
+ envVars: ["write"],
+ });
const service = await updateMariadbById(input.mariadbId, {
env: input.env,
});
@@ -317,21 +303,20 @@ export const mariadbRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: input.mariadbId,
+ });
return true;
}),
reload: protectedProcedure
.input(apiResetMariadb)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mariadbId, {
+ deployment: ["create"],
+ });
const mariadb = await findMariadbById(input.mariadbId);
- if (
- mariadb.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to reload this Mariadb",
- });
- }
if (mariadb.serverId) {
await stopServiceRemote(mariadb.serverId, mariadb.appName);
} else {
@@ -349,22 +334,21 @@ export const mariadbRouter = createTRPCRouter({
await updateMariadbById(input.mariadbId, {
applicationStatus: "done",
});
+ await audit(ctx, {
+ action: "reload",
+ resourceType: "service",
+ resourceId: mariadb.mariadbId,
+ resourceName: mariadb.appName,
+ });
return true;
}),
update: protectedProcedure
.input(apiUpdateMariaDB)
.mutation(async ({ input, ctx }) => {
const { mariadbId, ...rest } = input;
- const mariadb = await findMariadbById(mariadbId);
- if (
- mariadb.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to update this Mariadb",
- });
- }
+ await checkServicePermissionAndAccess(ctx, mariadbId, {
+ service: ["create"],
+ });
const service = await updateMariadbById(mariadbId, {
...rest,
});
@@ -376,6 +360,12 @@ export const mariadbRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: mariadbId,
+ resourceName: service.appName,
+ });
return true;
}),
move: protectedProcedure
@@ -386,31 +376,10 @@ export const mariadbRouter = createTRPCRouter({
}),
)
.mutation(async ({ input, ctx }) => {
- const mariadb = await findMariadbById(input.mariadbId);
- if (
- mariadb.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move this mariadb",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.mariadbId, {
+ service: ["create"],
+ });
- const targetEnvironment = await findEnvironmentById(
- input.targetEnvironmentId,
- );
- if (
- targetEnvironment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move to this environment",
- });
- }
-
- // Update the mariadb's projectId
const updatedMariadb = await db
.update(mariadbTable)
.set({
@@ -427,23 +396,124 @@ export const mariadbRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "move",
+ resourceType: "service",
+ resourceId: updatedMariadb.mariadbId,
+ resourceName: updatedMariadb.appName,
+ });
return updatedMariadb;
}),
rebuild: protectedProcedure
.input(apiRebuildMariadb)
.mutation(async ({ input, ctx }) => {
- const mariadb = await findMariadbById(input.mariadbId);
- if (
- mariadb.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to rebuild this MariaDB database",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.mariadbId, {
+ deployment: ["create"],
+ });
- await rebuildDatabase(mariadb.mariadbId, "mariadb");
+ await rebuildDatabase(input.mariadbId, "mariadb");
+ await audit(ctx, {
+ action: "rebuild",
+ resourceType: "service",
+ resourceId: input.mariadbId,
+ });
return true;
}),
+ search: protectedProcedure
+ .input(
+ z.object({
+ q: z.string().optional(),
+ name: z.string().optional(),
+ appName: z.string().optional(),
+ description: z.string().optional(),
+ projectId: z.string().optional(),
+ environmentId: z.string().optional(),
+ limit: z.number().min(1).max(100).default(20),
+ offset: z.number().min(0).default(0),
+ }),
+ )
+ .query(async ({ ctx, input }) => {
+ const baseConditions = [
+ eq(projects.organizationId, ctx.session.activeOrganizationId),
+ ];
+ if (input.projectId) {
+ baseConditions.push(eq(environments.projectId, input.projectId));
+ }
+ if (input.environmentId) {
+ baseConditions.push(
+ eq(mariadbTable.environmentId, input.environmentId),
+ );
+ }
+ if (input.q?.trim()) {
+ const term = `%${input.q.trim()}%`;
+ baseConditions.push(
+ or(
+ ilike(mariadbTable.name, term),
+ ilike(mariadbTable.appName, term),
+ ilike(mariadbTable.description ?? "", term),
+ )!,
+ );
+ }
+ if (input.name?.trim()) {
+ baseConditions.push(ilike(mariadbTable.name, `%${input.name.trim()}%`));
+ }
+ if (input.appName?.trim()) {
+ baseConditions.push(
+ ilike(mariadbTable.appName, `%${input.appName.trim()}%`),
+ );
+ }
+ if (input.description?.trim()) {
+ baseConditions.push(
+ ilike(
+ mariadbTable.description ?? "",
+ `%${input.description.trim()}%`,
+ ),
+ );
+ }
+ const { accessedServices } = await findMemberByUserId(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
+ if (accessedServices.length === 0) return { items: [], total: 0 };
+ baseConditions.push(
+ sql`${mariadbTable.mariadbId} IN (${sql.join(
+ accessedServices.map((id) => sql`${id}`),
+ sql`, `,
+ )})`,
+ );
+
+ const where = and(...baseConditions);
+ const [items, countResult] = await Promise.all([
+ db
+ .select({
+ mariadbId: mariadbTable.mariadbId,
+ name: mariadbTable.name,
+ appName: mariadbTable.appName,
+ description: mariadbTable.description,
+ environmentId: mariadbTable.environmentId,
+ applicationStatus: mariadbTable.applicationStatus,
+ createdAt: mariadbTable.createdAt,
+ })
+ .from(mariadbTable)
+ .innerJoin(
+ environments,
+ eq(mariadbTable.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where)
+ .orderBy(desc(mariadbTable.createdAt))
+ .limit(input.limit)
+ .offset(input.offset),
+ db
+ .select({ count: sql`count(*)::int` })
+ .from(mariadbTable)
+ .innerJoin(
+ environments,
+ eq(mariadbTable.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where),
+ ]);
+ return { items, total: countResult[0]?.count ?? 0 };
+ }),
});
diff --git a/apps/dokploy/server/api/routers/mongo.ts b/apps/dokploy/server/api/routers/mongo.ts
index 661c808db..a64535e24 100644
--- a/apps/dokploy/server/api/routers/mongo.ts
+++ b/apps/dokploy/server/api/routers/mongo.ts
@@ -1,7 +1,5 @@
import {
- addNewService,
checkPortInUse,
- checkServiceAccess,
createMongo,
createMount,
deployMongo,
@@ -19,12 +17,18 @@ import {
stopServiceRemote,
updateMongoById,
} from "@dokploy/server";
+import {
+ addNewService,
+ checkServiceAccess,
+ checkServicePermissionAndAccess,
+ findMemberByUserId,
+} from "@dokploy/server/services/permission";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
-import { observable } from "@trpc/server/observable";
-import { eq } from "drizzle-orm";
+import { and, desc, eq, ilike, or, sql } from "drizzle-orm";
import { z } from "zod";
+import { audit } from "@/server/api/utils/audit";
import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
import {
apiChangeMongoStatus,
apiCreateMongo,
@@ -37,24 +41,17 @@ import {
apiUpdateMongo,
mongo as mongoTable,
} from "@/server/db/schema";
+import { environments, projects } from "@/server/db/schema";
import { cancelJobs } from "@/server/utils/backup";
export const mongoRouter = createTRPCRouter({
create: protectedProcedure
.input(apiCreateMongo)
.mutation(async ({ input, ctx }) => {
try {
- // Get project from environment
const environment = await findEnvironmentById(input.environmentId);
const project = await findProjectById(environment.projectId);
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- project.projectId,
- ctx.session.activeOrganizationId,
- "create",
- );
- }
+ await checkServiceAccess(ctx, project.projectId, "create");
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
@@ -72,13 +69,7 @@ export const mongoRouter = createTRPCRouter({
const newMongo = await createMongo({
...input,
});
- if (ctx.user.role === "member") {
- await addNewService(
- ctx.user.id,
- newMongo.mongoId,
- project.organizationId,
- );
- }
+ await addNewService(ctx, newMongo.mongoId);
await createMount({
serviceId: newMongo.mongoId,
@@ -88,6 +79,12 @@ export const mongoRouter = createTRPCRouter({
type: "volume",
});
+ await audit(ctx, {
+ action: "create",
+ resourceType: "service",
+ resourceId: newMongo.mongoId,
+ resourceName: newMongo.appName,
+ });
return newMongo;
} catch (error) {
if (error instanceof TRPCError) {
@@ -103,14 +100,7 @@ export const mongoRouter = createTRPCRouter({
one: protectedProcedure
.input(apiFindOneMongo)
.query(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.mongoId,
- ctx.session.activeOrganizationId,
- "access",
- );
- }
+ await checkServiceAccess(ctx, input.mongoId, "read");
const mongo = await findMongoById(input.mongoId);
if (
@@ -128,18 +118,11 @@ export const mongoRouter = createTRPCRouter({
start: protectedProcedure
.input(apiFindOneMongo)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mongoId, {
+ deployment: ["create"],
+ });
const service = await findMongoById(input.mongoId);
- if (
- service.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to start this mongo",
- });
- }
-
if (service.serverId) {
await startServiceRemote(service.serverId, service.appName);
} else {
@@ -149,23 +132,22 @@ export const mongoRouter = createTRPCRouter({
applicationStatus: "done",
});
+ await audit(ctx, {
+ action: "start",
+ resourceType: "service",
+ resourceId: service.mongoId,
+ resourceName: service.appName,
+ });
return service;
}),
stop: protectedProcedure
.input(apiFindOneMongo)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mongoId, {
+ deployment: ["create"],
+ });
const mongo = await findMongoById(input.mongoId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to stop this mongo",
- });
- }
-
if (mongo.serverId) {
await stopServiceRemote(mongo.serverId, mongo.appName);
} else {
@@ -175,21 +157,21 @@ export const mongoRouter = createTRPCRouter({
applicationStatus: "idle",
});
+ await audit(ctx, {
+ action: "stop",
+ resourceType: "service",
+ resourceId: mongo.mongoId,
+ resourceName: mongo.appName,
+ });
return mongo;
}),
saveExternalPort: protectedProcedure
.input(apiSaveExternalPortMongo)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mongoId, {
+ service: ["create"],
+ });
const mongo = await findMongoById(input.mongoId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this external port",
- });
- }
if (input.externalPort) {
const portCheck = await checkPortInUse(
@@ -208,21 +190,27 @@ export const mongoRouter = createTRPCRouter({
externalPort: input.externalPort,
});
await deployMongo(input.mongoId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: mongo.mongoId,
+ resourceName: mongo.appName,
+ });
return mongo;
}),
deploy: protectedProcedure
.input(apiDeployMongo)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mongoId, {
+ deployment: ["create"],
+ });
const mongo = await findMongoById(input.mongoId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this mongo",
- });
- }
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "service",
+ resourceId: mongo.mongoId,
+ resourceName: mongo.appName,
+ });
return deployMongo(input.mongoId);
}),
deployWithLogs: protectedProcedure
@@ -235,55 +223,55 @@ export const mongoRouter = createTRPCRouter({
},
})
.input(apiDeployMongo)
- .subscription(async ({ input, ctx }) => {
- const mongo = await findMongoById(input.mongoId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this mongo",
- });
- }
- return observable((emit) => {
- deployMongo(input.mongoId, (log) => {
- emit.next(log);
- });
+ .subscription(async function* ({ input, ctx, signal }) {
+ await checkServicePermissionAndAccess(ctx, input.mongoId, {
+ deployment: ["create"],
});
+ const queue: string[] = [];
+ const done = false;
+
+ deployMongo(input.mongoId, (log) => {
+ queue.push(log);
+ });
+
+ while (!done || queue.length > 0) {
+ if (queue.length > 0) {
+ yield queue.shift()!;
+ } else {
+ await new Promise((r) => setTimeout(r, 50));
+ }
+
+ if (signal?.aborted) {
+ return;
+ }
+ }
}),
changeStatus: protectedProcedure
.input(apiChangeMongoStatus)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mongoId, {
+ deployment: ["create"],
+ });
const mongo = await findMongoById(input.mongoId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to change this mongo status",
- });
- }
await updateMongoById(input.mongoId, {
applicationStatus: input.applicationStatus,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: mongo.mongoId,
+ resourceName: mongo.appName,
+ });
return mongo;
}),
reload: protectedProcedure
.input(apiResetMongo)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mongoId, {
+ deployment: ["create"],
+ });
const mongo = await findMongoById(input.mongoId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to reload this mongo",
- });
- }
if (mongo.serverId) {
await stopServiceRemote(mongo.serverId, mongo.appName);
} else {
@@ -301,19 +289,18 @@ export const mongoRouter = createTRPCRouter({
await updateMongoById(input.mongoId, {
applicationStatus: "done",
});
+ await audit(ctx, {
+ action: "reload",
+ resourceType: "service",
+ resourceId: mongo.mongoId,
+ resourceName: mongo.appName,
+ });
return true;
}),
remove: protectedProcedure
.input(apiFindOneMongo)
.mutation(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.mongoId,
- ctx.session.activeOrganizationId,
- "delete",
- );
- }
+ await checkServiceAccess(ctx, input.mongoId, "delete");
const mongo = await findMongoById(input.mongoId);
@@ -326,6 +313,12 @@ export const mongoRouter = createTRPCRouter({
message: "You are not authorized to delete this mongo",
});
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "service",
+ resourceId: mongo.mongoId,
+ resourceName: mongo.appName,
+ });
const backups = await findBackupsByDbId(input.mongoId, "mongo");
const cleanupOperations = [
@@ -345,16 +338,9 @@ export const mongoRouter = createTRPCRouter({
saveEnvironment: protectedProcedure
.input(apiSaveEnvironmentVariablesMongo)
.mutation(async ({ input, ctx }) => {
- const mongo = await findMongoById(input.mongoId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this environment",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.mongoId, {
+ envVars: ["write"],
+ });
const service = await updateMongoById(input.mongoId, {
env: input.env,
});
@@ -366,22 +352,20 @@ export const mongoRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: input.mongoId,
+ });
return true;
}),
update: protectedProcedure
.input(apiUpdateMongo)
.mutation(async ({ input, ctx }) => {
const { mongoId, ...rest } = input;
- const mongo = await findMongoById(mongoId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to update this mongo",
- });
- }
+ await checkServicePermissionAndAccess(ctx, mongoId, {
+ service: ["create"],
+ });
const service = await updateMongoById(mongoId, {
...rest,
});
@@ -393,6 +377,12 @@ export const mongoRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: mongoId,
+ resourceName: service.appName,
+ });
return true;
}),
move: protectedProcedure
@@ -403,31 +393,10 @@ export const mongoRouter = createTRPCRouter({
}),
)
.mutation(async ({ input, ctx }) => {
- const mongo = await findMongoById(input.mongoId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move this mongo",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.mongoId, {
+ service: ["create"],
+ });
- const targetEnvironment = await findEnvironmentById(
- input.targetEnvironmentId,
- );
- if (
- targetEnvironment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move to this environment",
- });
- }
-
- // Update the mongo's projectId
const updatedMongo = await db
.update(mongoTable)
.set({
@@ -444,24 +413,120 @@ export const mongoRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "move",
+ resourceType: "service",
+ resourceId: updatedMongo.mongoId,
+ resourceName: updatedMongo.appName,
+ });
return updatedMongo;
}),
rebuild: protectedProcedure
.input(apiRebuildMongo)
.mutation(async ({ input, ctx }) => {
- const mongo = await findMongoById(input.mongoId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to rebuild this MongoDB database",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.mongoId, {
+ deployment: ["create"],
+ });
- await rebuildDatabase(mongo.mongoId, "mongo");
+ await rebuildDatabase(input.mongoId, "mongo");
+ await audit(ctx, {
+ action: "rebuild",
+ resourceType: "service",
+ resourceId: input.mongoId,
+ });
return true;
}),
+ search: protectedProcedure
+ .input(
+ z.object({
+ q: z.string().optional(),
+ name: z.string().optional(),
+ appName: z.string().optional(),
+ description: z.string().optional(),
+ projectId: z.string().optional(),
+ environmentId: z.string().optional(),
+ limit: z.number().min(1).max(100).default(20),
+ offset: z.number().min(0).default(0),
+ }),
+ )
+ .query(async ({ ctx, input }) => {
+ const baseConditions = [
+ eq(projects.organizationId, ctx.session.activeOrganizationId),
+ ];
+ if (input.projectId) {
+ baseConditions.push(eq(environments.projectId, input.projectId));
+ }
+ if (input.environmentId) {
+ baseConditions.push(eq(mongoTable.environmentId, input.environmentId));
+ }
+ if (input.q?.trim()) {
+ const term = `%${input.q.trim()}%`;
+ baseConditions.push(
+ or(
+ ilike(mongoTable.name, term),
+ ilike(mongoTable.appName, term),
+ ilike(mongoTable.description ?? "", term),
+ )!,
+ );
+ }
+ if (input.name?.trim()) {
+ baseConditions.push(ilike(mongoTable.name, `%${input.name.trim()}%`));
+ }
+ if (input.appName?.trim()) {
+ baseConditions.push(
+ ilike(mongoTable.appName, `%${input.appName.trim()}%`),
+ );
+ }
+ if (input.description?.trim()) {
+ baseConditions.push(
+ ilike(mongoTable.description ?? "", `%${input.description.trim()}%`),
+ );
+ }
+ const { accessedServices } = await findMemberByUserId(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
+ if (accessedServices.length === 0) return { items: [], total: 0 };
+ baseConditions.push(
+ sql`${mongoTable.mongoId} IN (${sql.join(
+ accessedServices.map((id) => sql`${id}`),
+ sql`, `,
+ )})`,
+ );
+
+ const where = and(...baseConditions);
+ const [items, countResult] = await Promise.all([
+ db
+ .select({
+ mongoId: mongoTable.mongoId,
+ name: mongoTable.name,
+ appName: mongoTable.appName,
+ description: mongoTable.description,
+ environmentId: mongoTable.environmentId,
+ applicationStatus: mongoTable.applicationStatus,
+ createdAt: mongoTable.createdAt,
+ })
+ .from(mongoTable)
+ .innerJoin(
+ environments,
+ eq(mongoTable.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where)
+ .orderBy(desc(mongoTable.createdAt))
+ .limit(input.limit)
+ .offset(input.offset),
+ db
+ .select({ count: sql`count(*)::int` })
+ .from(mongoTable)
+ .innerJoin(
+ environments,
+ eq(mongoTable.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where),
+ ]);
+ return { items, total: countResult[0]?.count ?? 0 };
+ }),
});
diff --git a/apps/dokploy/server/api/routers/mount.ts b/apps/dokploy/server/api/routers/mount.ts
index 814d3d392..f641f2106 100644
--- a/apps/dokploy/server/api/routers/mount.ts
+++ b/apps/dokploy/server/api/routers/mount.ts
@@ -2,68 +2,163 @@ import {
createMount,
deleteMount,
findApplicationById,
+ findComposeById,
+ findMariadbById,
+ findMongoById,
findMountById,
- findMountOrganizationId,
+ findMountsByApplicationId,
+ findMySqlById,
+ findPostgresById,
+ findRedisById,
getServiceContainer,
updateMount,
} from "@dokploy/server";
+import {
+ checkServiceAccess,
+ checkServicePermissionAndAccess,
+} from "@dokploy/server/services/permission";
+import type { ServiceType } from "@dokploy/server/db/schema/mount";
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import {
apiCreateMount,
+ apiFindMountByApplicationId,
apiFindOneMount,
apiRemoveMount,
apiUpdateMount,
} from "@/server/db/schema";
import { createTRPCRouter, protectedProcedure } from "../trpc";
+import { audit } from "@/server/api/utils/audit";
+
+async function getServiceOrganizationId(
+ serviceId: string,
+ serviceType: ServiceType,
+): Promise {
+ switch (serviceType) {
+ case "application": {
+ const app = await findApplicationById(serviceId);
+ return app?.environment?.project?.organizationId ?? null;
+ }
+ case "postgres": {
+ const postgres = await findPostgresById(serviceId);
+ return postgres?.environment?.project?.organizationId ?? null;
+ }
+ case "mariadb": {
+ const mariadb = await findMariadbById(serviceId);
+ return mariadb?.environment?.project?.organizationId ?? null;
+ }
+ case "mongo": {
+ const mongo = await findMongoById(serviceId);
+ return mongo?.environment?.project?.organizationId ?? null;
+ }
+ case "mysql": {
+ const mysql = await findMySqlById(serviceId);
+ return mysql?.environment?.project?.organizationId ?? null;
+ }
+ case "redis": {
+ const redis = await findRedisById(serviceId);
+ return redis?.environment?.project?.organizationId ?? null;
+ }
+ case "compose": {
+ const compose = await findComposeById(serviceId);
+ return compose?.environment?.project?.organizationId ?? null;
+ }
+ default:
+ return null;
+ }
+}
export const mountRouter = createTRPCRouter({
create: protectedProcedure
.input(apiCreateMount)
- .mutation(async ({ input }) => {
- await createMount(input);
- return true;
+ .mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.serviceId, {
+ volume: ["create"],
+ });
+ const mount = await createMount(input);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "mount",
+ resourceId: mount.mountId,
+ resourceName: input.mountPath,
+ });
+ return mount;
}),
remove: protectedProcedure
.input(apiRemoveMount)
.mutation(async ({ input, ctx }) => {
- const organizationId = await findMountOrganizationId(input.mountId);
- if (organizationId !== ctx.session.activeOrganizationId) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to delete this mount",
+ const mount = await findMountById(input.mountId);
+ const serviceId =
+ mount.applicationId ||
+ mount.postgresId ||
+ mount.mariadbId ||
+ mount.mongoId ||
+ mount.mysqlId ||
+ mount.redisId ||
+ mount.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ volume: ["delete"],
});
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "mount",
+ resourceId: input.mountId,
+ });
return await deleteMount(input.mountId);
}),
one: protectedProcedure
.input(apiFindOneMount)
.query(async ({ input, ctx }) => {
- const organizationId = await findMountOrganizationId(input.mountId);
- if (organizationId !== ctx.session.activeOrganizationId) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this mount",
+ const mount = await findMountById(input.mountId);
+ const serviceId =
+ mount.applicationId ||
+ mount.postgresId ||
+ mount.mariadbId ||
+ mount.mongoId ||
+ mount.mysqlId ||
+ mount.redisId ||
+ mount.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ volume: ["read"],
});
}
- return await findMountById(input.mountId);
+ return mount;
}),
update: protectedProcedure
.input(apiUpdateMount)
.mutation(async ({ input, ctx }) => {
- const organizationId = await findMountOrganizationId(input.mountId);
- if (organizationId !== ctx.session.activeOrganizationId) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to update this mount",
+ const mount = await findMountById(input.mountId);
+ const serviceId =
+ mount.applicationId ||
+ mount.postgresId ||
+ mount.mariadbId ||
+ mount.mongoId ||
+ mount.mysqlId ||
+ mount.redisId ||
+ mount.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ volume: ["create"],
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "mount",
+ resourceId: input.mountId,
+ resourceName: input.mountPath,
+ });
return await updateMount(input.mountId, input);
}),
allNamedByApplicationId: protectedProcedure
.input(z.object({ applicationId: z.string().min(1) }))
- .query(async ({ input }) => {
+ .query(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ volume: ["read"],
+ });
const app = await findApplicationById(input.applicationId);
const container = await getServiceContainer(app.appName, app.serverId);
const mounts = container?.Mounts.filter(
@@ -71,4 +166,28 @@ export const mountRouter = createTRPCRouter({
);
return mounts;
}),
+ listByServiceId: protectedProcedure
+ .input(apiFindMountByApplicationId)
+ .query(async ({ input, ctx }) => {
+ console.log("input", input);
+ await checkServiceAccess(ctx, input.serviceId, "read");
+ const organizationId = await getServiceOrganizationId(
+ input.serviceId,
+ input.serviceType,
+ );
+ if (
+ organizationId === null ||
+ organizationId !== ctx.session.activeOrganizationId
+ ) {
+ throw new TRPCError({
+ code: "UNAUTHORIZED",
+ message:
+ "You are not authorized to access this service or it does not exist",
+ });
+ }
+ return await findMountsByApplicationId(
+ input.serviceId,
+ input.serviceType,
+ );
+ }),
});
diff --git a/apps/dokploy/server/api/routers/mysql.ts b/apps/dokploy/server/api/routers/mysql.ts
index 9af93b556..abb0f97a7 100644
--- a/apps/dokploy/server/api/routers/mysql.ts
+++ b/apps/dokploy/server/api/routers/mysql.ts
@@ -1,7 +1,5 @@
import {
- addNewService,
checkPortInUse,
- checkServiceAccess,
createMount,
createMysql,
deployMySql,
@@ -19,12 +17,18 @@ import {
stopServiceRemote,
updateMySqlById,
} from "@dokploy/server";
+import {
+ addNewService,
+ checkServiceAccess,
+ checkServicePermissionAndAccess,
+ findMemberByUserId,
+} from "@dokploy/server/services/permission";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
-import { observable } from "@trpc/server/observable";
-import { eq } from "drizzle-orm";
+import { and, desc, eq, ilike, or, sql } from "drizzle-orm";
import { z } from "zod";
+import { audit } from "@/server/api/utils/audit";
import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
import {
apiChangeMySqlStatus,
apiCreateMySql,
@@ -35,7 +39,9 @@ import {
apiSaveEnvironmentVariablesMySql,
apiSaveExternalPortMySql,
apiUpdateMySql,
+ environments,
mysql as mysqlTable,
+ projects,
} from "@/server/db/schema";
import { cancelJobs } from "@/server/utils/backup";
@@ -44,18 +50,10 @@ export const mysqlRouter = createTRPCRouter({
.input(apiCreateMySql)
.mutation(async ({ input, ctx }) => {
try {
- // Get project from environment
const environment = await findEnvironmentById(input.environmentId);
const project = await findProjectById(environment.projectId);
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- project.projectId,
- ctx.session.activeOrganizationId,
- "create",
- );
- }
+ await checkServiceAccess(ctx, project.projectId, "create");
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
@@ -74,13 +72,7 @@ export const mysqlRouter = createTRPCRouter({
const newMysql = await createMysql({
...input,
});
- if (ctx.user.role === "member") {
- await addNewService(
- ctx.user.id,
- newMysql.mysqlId,
- project.organizationId,
- );
- }
+ await addNewService(ctx, newMysql.mysqlId);
await createMount({
serviceId: newMysql.mysqlId,
@@ -90,6 +82,12 @@ export const mysqlRouter = createTRPCRouter({
type: "volume",
});
+ await audit(ctx, {
+ action: "create",
+ resourceType: "service",
+ resourceId: newMysql.mysqlId,
+ resourceName: newMysql.appName,
+ });
return newMysql;
} catch (error) {
if (error instanceof TRPCError) {
@@ -105,14 +103,7 @@ export const mysqlRouter = createTRPCRouter({
one: protectedProcedure
.input(apiFindOneMySql)
.query(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.mysqlId,
- ctx.session.activeOrganizationId,
- "access",
- );
- }
+ await checkServiceAccess(ctx, input.mysqlId, "read");
const mysql = await findMySqlById(input.mysqlId);
if (
mysql.environment.project.organizationId !==
@@ -129,16 +120,10 @@ export const mysqlRouter = createTRPCRouter({
start: protectedProcedure
.input(apiFindOneMySql)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mysqlId, {
+ deployment: ["create"],
+ });
const service = await findMySqlById(input.mysqlId);
- if (
- service.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to start this MySQL",
- });
- }
if (service.serverId) {
await startServiceRemote(service.serverId, service.appName);
@@ -149,21 +134,21 @@ export const mysqlRouter = createTRPCRouter({
applicationStatus: "done",
});
+ await audit(ctx, {
+ action: "start",
+ resourceType: "service",
+ resourceId: service.mysqlId,
+ resourceName: service.appName,
+ });
return service;
}),
stop: protectedProcedure
.input(apiFindOneMySql)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mysqlId, {
+ deployment: ["create"],
+ });
const mongo = await findMySqlById(input.mysqlId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to stop this MySQL",
- });
- }
if (mongo.serverId) {
await stopServiceRemote(mongo.serverId, mongo.appName);
} else {
@@ -173,21 +158,21 @@ export const mysqlRouter = createTRPCRouter({
applicationStatus: "idle",
});
+ await audit(ctx, {
+ action: "stop",
+ resourceType: "service",
+ resourceId: mongo.mysqlId,
+ resourceName: mongo.appName,
+ });
return mongo;
}),
saveExternalPort: protectedProcedure
.input(apiSaveExternalPortMySql)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mysqlId, {
+ service: ["create"],
+ });
const mysql = await findMySqlById(input.mysqlId);
- if (
- mysql.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this external port",
- });
- }
if (input.externalPort) {
const portCheck = await checkPortInUse(
@@ -206,21 +191,27 @@ export const mysqlRouter = createTRPCRouter({
externalPort: input.externalPort,
});
await deployMySql(input.mysqlId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: mysql.mysqlId,
+ resourceName: mysql.appName,
+ });
return mysql;
}),
deploy: protectedProcedure
.input(apiDeployMySql)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mysqlId, {
+ deployment: ["create"],
+ });
const mysql = await findMySqlById(input.mysqlId);
- if (
- mysql.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this MySQL",
- });
- }
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "service",
+ resourceId: mysql.mysqlId,
+ resourceName: mysql.appName,
+ });
return deployMySql(input.mysqlId);
}),
deployWithLogs: protectedProcedure
@@ -233,55 +224,55 @@ export const mysqlRouter = createTRPCRouter({
},
})
.input(apiDeployMySql)
- .subscription(async ({ input, ctx }) => {
- const mysql = await findMySqlById(input.mysqlId);
- if (
- mysql.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this MySQL",
- });
- }
-
- return observable((emit) => {
- deployMySql(input.mysqlId, (log) => {
- emit.next(log);
- });
+ .subscription(async function* ({ input, ctx, signal }) {
+ await checkServicePermissionAndAccess(ctx, input.mysqlId, {
+ deployment: ["create"],
});
+
+ const queue: string[] = [];
+ const done = false;
+
+ deployMySql(input.mysqlId, (log) => {
+ queue.push(log);
+ });
+
+ while (!done || queue.length > 0) {
+ if (queue.length > 0) {
+ yield queue.shift()!;
+ } else {
+ await new Promise((r) => setTimeout(r, 50));
+ }
+
+ if (signal?.aborted) {
+ return;
+ }
+ }
}),
changeStatus: protectedProcedure
.input(apiChangeMySqlStatus)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mysqlId, {
+ deployment: ["create"],
+ });
const mongo = await findMySqlById(input.mysqlId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to change this MySQL status",
- });
- }
await updateMySqlById(input.mysqlId, {
applicationStatus: input.applicationStatus,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: mongo.mysqlId,
+ resourceName: mongo.appName,
+ });
return mongo;
}),
reload: protectedProcedure
.input(apiResetMysql)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.mysqlId, {
+ deployment: ["create"],
+ });
const mysql = await findMySqlById(input.mysqlId);
- if (
- mysql.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to reload this MySQL",
- });
- }
if (mysql.serverId) {
await stopServiceRemote(mysql.serverId, mysql.appName);
} else {
@@ -298,19 +289,18 @@ export const mysqlRouter = createTRPCRouter({
await updateMySqlById(input.mysqlId, {
applicationStatus: "done",
});
+ await audit(ctx, {
+ action: "reload",
+ resourceType: "service",
+ resourceId: mysql.mysqlId,
+ resourceName: mysql.appName,
+ });
return true;
}),
remove: protectedProcedure
.input(apiFindOneMySql)
.mutation(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.mysqlId,
- ctx.session.activeOrganizationId,
- "delete",
- );
- }
+ await checkServiceAccess(ctx, input.mysqlId, "delete");
const mongo = await findMySqlById(input.mysqlId);
if (
mongo.environment.project.organizationId !==
@@ -322,6 +312,12 @@ export const mysqlRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "service",
+ resourceId: mongo.mysqlId,
+ resourceName: mongo.appName,
+ });
const backups = await findBackupsByDbId(input.mysqlId, "mysql");
const cleanupOperations = [
async () => await removeService(mongo?.appName, mongo.serverId),
@@ -340,16 +336,9 @@ export const mysqlRouter = createTRPCRouter({
saveEnvironment: protectedProcedure
.input(apiSaveEnvironmentVariablesMySql)
.mutation(async ({ input, ctx }) => {
- const mysql = await findMySqlById(input.mysqlId);
- if (
- mysql.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this environment",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.mysqlId, {
+ envVars: ["write"],
+ });
const service = await updateMySqlById(input.mysqlId, {
env: input.env,
});
@@ -361,22 +350,20 @@ export const mysqlRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: input.mysqlId,
+ });
return true;
}),
update: protectedProcedure
.input(apiUpdateMySql)
.mutation(async ({ input, ctx }) => {
const { mysqlId, ...rest } = input;
- const mysql = await findMySqlById(mysqlId);
- if (
- mysql.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to update this MySQL",
- });
- }
+ await checkServicePermissionAndAccess(ctx, mysqlId, {
+ service: ["create"],
+ });
const service = await updateMySqlById(mysqlId, {
...rest,
});
@@ -388,6 +375,12 @@ export const mysqlRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: mysqlId,
+ resourceName: service.appName,
+ });
return true;
}),
move: protectedProcedure
@@ -398,31 +391,10 @@ export const mysqlRouter = createTRPCRouter({
}),
)
.mutation(async ({ input, ctx }) => {
- const mysql = await findMySqlById(input.mysqlId);
- if (
- mysql.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move this mysql",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.mysqlId, {
+ service: ["create"],
+ });
- const targetEnvironment = await findEnvironmentById(
- input.targetEnvironmentId,
- );
- if (
- targetEnvironment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move to this environment",
- });
- }
-
- // Update the mysql's projectId
const updatedMysql = await db
.update(mysqlTable)
.set({
@@ -439,24 +411,120 @@ export const mysqlRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "move",
+ resourceType: "service",
+ resourceId: updatedMysql.mysqlId,
+ resourceName: updatedMysql.appName,
+ });
return updatedMysql;
}),
rebuild: protectedProcedure
.input(apiRebuildMysql)
.mutation(async ({ input, ctx }) => {
- const mysql = await findMySqlById(input.mysqlId);
- if (
- mysql.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to rebuild this MySQL database",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.mysqlId, {
+ deployment: ["create"],
+ });
- await rebuildDatabase(mysql.mysqlId, "mysql");
+ await rebuildDatabase(input.mysqlId, "mysql");
+ await audit(ctx, {
+ action: "rebuild",
+ resourceType: "service",
+ resourceId: input.mysqlId,
+ });
return true;
}),
+ search: protectedProcedure
+ .input(
+ z.object({
+ q: z.string().optional(),
+ name: z.string().optional(),
+ appName: z.string().optional(),
+ description: z.string().optional(),
+ projectId: z.string().optional(),
+ environmentId: z.string().optional(),
+ limit: z.number().min(1).max(100).default(20),
+ offset: z.number().min(0).default(0),
+ }),
+ )
+ .query(async ({ ctx, input }) => {
+ const baseConditions = [
+ eq(projects.organizationId, ctx.session.activeOrganizationId),
+ ];
+ if (input.projectId) {
+ baseConditions.push(eq(environments.projectId, input.projectId));
+ }
+ if (input.environmentId) {
+ baseConditions.push(eq(mysqlTable.environmentId, input.environmentId));
+ }
+ if (input.q?.trim()) {
+ const term = `%${input.q.trim()}%`;
+ baseConditions.push(
+ or(
+ ilike(mysqlTable.name, term),
+ ilike(mysqlTable.appName, term),
+ ilike(mysqlTable.description ?? "", term),
+ )!,
+ );
+ }
+ if (input.name?.trim()) {
+ baseConditions.push(ilike(mysqlTable.name, `%${input.name.trim()}%`));
+ }
+ if (input.appName?.trim()) {
+ baseConditions.push(
+ ilike(mysqlTable.appName, `%${input.appName.trim()}%`),
+ );
+ }
+ if (input.description?.trim()) {
+ baseConditions.push(
+ ilike(mysqlTable.description ?? "", `%${input.description.trim()}%`),
+ );
+ }
+ const { accessedServices } = await findMemberByUserId(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
+ if (accessedServices.length === 0) return { items: [], total: 0 };
+ baseConditions.push(
+ sql`${mysqlTable.mysqlId} IN (${sql.join(
+ accessedServices.map((id) => sql`${id}`),
+ sql`, `,
+ )})`,
+ );
+
+ const where = and(...baseConditions);
+ const [items, countResult] = await Promise.all([
+ db
+ .select({
+ mysqlId: mysqlTable.mysqlId,
+ name: mysqlTable.name,
+ appName: mysqlTable.appName,
+ description: mysqlTable.description,
+ environmentId: mysqlTable.environmentId,
+ applicationStatus: mysqlTable.applicationStatus,
+ createdAt: mysqlTable.createdAt,
+ })
+ .from(mysqlTable)
+ .innerJoin(
+ environments,
+ eq(mysqlTable.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where)
+ .orderBy(desc(mysqlTable.createdAt))
+ .limit(input.limit)
+ .offset(input.offset),
+ db
+ .select({ count: sql`count(*)::int` })
+ .from(mysqlTable)
+ .innerJoin(
+ environments,
+ eq(mysqlTable.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where),
+ ]);
+ return { items, total: countResult[0]?.count ?? 0 };
+ }),
});
diff --git a/apps/dokploy/server/api/routers/notification.ts b/apps/dokploy/server/api/routers/notification.ts
index 97361b5b4..a7bcd1199 100644
--- a/apps/dokploy/server/api/routers/notification.ts
+++ b/apps/dokploy/server/api/routers/notification.ts
@@ -8,6 +8,7 @@ import {
createPushoverNotification,
createResendNotification,
createSlackNotification,
+ createTeamsNotification,
createTelegramNotification,
findNotificationById,
getWebServerSettings,
@@ -23,6 +24,7 @@ import {
sendResendNotification,
sendServerThresholdNotifications,
sendSlackNotification,
+ sendTeamsNotification,
sendTelegramNotification,
updateCustomNotification,
updateDiscordNotification,
@@ -33,18 +35,19 @@ import {
updatePushoverNotification,
updateResendNotification,
updateSlackNotification,
+ updateTeamsNotification,
updateTelegramNotification,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
import { desc, eq, sql } from "drizzle-orm";
import { z } from "zod";
import {
- adminProcedure,
createTRPCRouter,
- protectedProcedure,
publicProcedure,
+ withPermission,
} from "@/server/api/trpc";
-import { db } from "@/server/db";
+import { audit } from "@/server/api/utils/audit";
import {
apiCreateCustom,
apiCreateDiscord,
@@ -55,6 +58,7 @@ import {
apiCreatePushover,
apiCreateResend,
apiCreateSlack,
+ apiCreateTeams,
apiCreateTelegram,
apiFindOneNotification,
apiTestCustomConnection,
@@ -66,6 +70,7 @@ import {
apiTestPushoverConnection,
apiTestResendConnection,
apiTestSlackConnection,
+ apiTestTeamsConnection,
apiTestTelegramConnection,
apiUpdateCustom,
apiUpdateDiscord,
@@ -76,21 +81,25 @@ import {
apiUpdatePushover,
apiUpdateResend,
apiUpdateSlack,
+ apiUpdateTeams,
apiUpdateTelegram,
notifications,
server,
} from "@/server/db/schema";
export const notificationRouter = createTRPCRouter({
- createSlack: adminProcedure
+ createSlack: withPermission("notification", "create")
.input(apiCreateSlack)
.mutation(async ({ input, ctx }) => {
try {
- return await createSlackNotification(
- input,
- ctx.session.activeOrganizationId,
- );
+ await createSlackNotification(input, ctx.session.activeOrganizationId);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "notification",
+ resourceName: input.name,
+ });
} catch (error) {
+ console.log(error);
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error creating the notification",
@@ -98,7 +107,7 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- updateSlack: adminProcedure
+ updateSlack: withPermission("notification", "update")
.input(apiUpdateSlack)
.mutation(async ({ input, ctx }) => {
try {
@@ -109,15 +118,22 @@ export const notificationRouter = createTRPCRouter({
message: "You are not authorized to update this notification",
});
}
- return await updateSlackNotification({
+ const result = await updateSlackNotification({
...input,
organizationId: ctx.session.activeOrganizationId,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "notification",
+ resourceId: input.notificationId,
+ resourceName: notification.name,
+ });
+ return result;
} catch (error) {
throw error;
}
}),
- testSlackConnection: adminProcedure
+ testSlackConnection: withPermission("notification", "create")
.input(apiTestSlackConnection)
.mutation(async ({ input }) => {
try {
@@ -134,14 +150,19 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- createTelegram: adminProcedure
+ createTelegram: withPermission("notification", "create")
.input(apiCreateTelegram)
.mutation(async ({ input, ctx }) => {
try {
- return await createTelegramNotification(
+ await createTelegramNotification(
input,
ctx.session.activeOrganizationId,
);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "notification",
+ resourceName: input.name,
+ });
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -151,7 +172,7 @@ export const notificationRouter = createTRPCRouter({
}
}),
- updateTelegram: adminProcedure
+ updateTelegram: withPermission("notification", "update")
.input(apiUpdateTelegram)
.mutation(async ({ input, ctx }) => {
try {
@@ -162,10 +183,17 @@ export const notificationRouter = createTRPCRouter({
message: "You are not authorized to update this notification",
});
}
- return await updateTelegramNotification({
+ const result = await updateTelegramNotification({
...input,
organizationId: ctx.session.activeOrganizationId,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "notification",
+ resourceId: input.notificationId,
+ resourceName: notification.name,
+ });
+ return result;
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -174,7 +202,7 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- testTelegramConnection: adminProcedure
+ testTelegramConnection: withPermission("notification", "create")
.input(apiTestTelegramConnection)
.mutation(async ({ input }) => {
try {
@@ -188,14 +216,19 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- createDiscord: adminProcedure
+ createDiscord: withPermission("notification", "create")
.input(apiCreateDiscord)
.mutation(async ({ input, ctx }) => {
try {
- return await createDiscordNotification(
+ await createDiscordNotification(
input,
ctx.session.activeOrganizationId,
);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "notification",
+ resourceName: input.name,
+ });
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -205,7 +238,7 @@ export const notificationRouter = createTRPCRouter({
}
}),
- updateDiscord: adminProcedure
+ updateDiscord: withPermission("notification", "update")
.input(apiUpdateDiscord)
.mutation(async ({ input, ctx }) => {
try {
@@ -216,10 +249,17 @@ export const notificationRouter = createTRPCRouter({
message: "You are not authorized to update this notification",
});
}
- return await updateDiscordNotification({
+ const result = await updateDiscordNotification({
...input,
organizationId: ctx.session.activeOrganizationId,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "notification",
+ resourceId: input.notificationId,
+ resourceName: notification.name,
+ });
+ return result;
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -229,7 +269,7 @@ export const notificationRouter = createTRPCRouter({
}
}),
- testDiscordConnection: adminProcedure
+ testDiscordConnection: withPermission("notification", "create")
.input(apiTestDiscordConnection)
.mutation(async ({ input }) => {
try {
@@ -251,14 +291,16 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- createEmail: adminProcedure
+ createEmail: withPermission("notification", "create")
.input(apiCreateEmail)
.mutation(async ({ input, ctx }) => {
try {
- return await createEmailNotification(
- input,
- ctx.session.activeOrganizationId,
- );
+ await createEmailNotification(input, ctx.session.activeOrganizationId);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "notification",
+ resourceName: input.name,
+ });
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -267,7 +309,7 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- updateEmail: adminProcedure
+ updateEmail: withPermission("notification", "update")
.input(apiUpdateEmail)
.mutation(async ({ input, ctx }) => {
try {
@@ -278,10 +320,17 @@ export const notificationRouter = createTRPCRouter({
message: "You are not authorized to update this notification",
});
}
- return await updateEmailNotification({
+ const result = await updateEmailNotification({
...input,
organizationId: ctx.session.activeOrganizationId,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "notification",
+ resourceId: input.notificationId,
+ resourceName: notification.name,
+ });
+ return result;
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -290,7 +339,7 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- testEmailConnection: adminProcedure
+ testEmailConnection: withPermission("notification", "create")
.input(apiTestEmailConnection)
.mutation(async ({ input }) => {
try {
@@ -308,14 +357,16 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- createResend: adminProcedure
+ createResend: withPermission("notification", "create")
.input(apiCreateResend)
.mutation(async ({ input, ctx }) => {
try {
- return await createResendNotification(
- input,
- ctx.session.activeOrganizationId,
- );
+ await createResendNotification(input, ctx.session.activeOrganizationId);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "notification",
+ resourceName: input.name,
+ });
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -324,7 +375,7 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- updateResend: adminProcedure
+ updateResend: withPermission("notification", "update")
.input(apiUpdateResend)
.mutation(async ({ input, ctx }) => {
try {
@@ -335,10 +386,17 @@ export const notificationRouter = createTRPCRouter({
message: "You are not authorized to update this notification",
});
}
- return await updateResendNotification({
+ const result = await updateResendNotification({
...input,
organizationId: ctx.session.activeOrganizationId,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "notification",
+ resourceId: input.notificationId,
+ resourceName: notification.name,
+ });
+ return result;
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -347,7 +405,7 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- testResendConnection: adminProcedure
+ testResendConnection: withPermission("notification", "create")
.input(apiTestResendConnection)
.mutation(async ({ input }) => {
try {
@@ -365,7 +423,7 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- remove: adminProcedure
+ remove: withPermission("notification", "delete")
.input(apiFindOneNotification)
.mutation(async ({ input, ctx }) => {
try {
@@ -376,6 +434,11 @@ export const notificationRouter = createTRPCRouter({
message: "You are not authorized to delete this notification",
});
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "notification",
+ resourceName: notification.name,
+ });
return await removeNotificationById(input.notificationId);
} catch (error) {
const message =
@@ -388,7 +451,7 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- one: protectedProcedure
+ one: withPermission("notification", "read")
.input(apiFindOneNotification)
.query(async ({ input, ctx }) => {
const notification = await findNotificationById(input.notificationId);
@@ -400,7 +463,7 @@ export const notificationRouter = createTRPCRouter({
}
return notification;
}),
- all: adminProcedure.query(async ({ ctx }) => {
+ all: withPermission("notification", "read").query(async ({ ctx }) => {
return await db.query.notifications.findMany({
with: {
slack: true,
@@ -413,6 +476,7 @@ export const notificationRouter = createTRPCRouter({
custom: true,
lark: true,
pushover: true,
+ teams: true,
},
orderBy: desc(notifications.createdAt),
where: eq(notifications.organizationId, ctx.session.activeOrganizationId),
@@ -446,8 +510,6 @@ export const notificationRouter = createTRPCRouter({
});
}
- // For Dokploy server type, we don't have a specific organizationId
- // This might need to be adjusted based on your business logic
organizationId = "";
ServerName = "Dokploy";
} else {
@@ -481,14 +543,16 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- createGotify: adminProcedure
+ createGotify: withPermission("notification", "create")
.input(apiCreateGotify)
.mutation(async ({ input, ctx }) => {
try {
- return await createGotifyNotification(
- input,
- ctx.session.activeOrganizationId,
- );
+ await createGotifyNotification(input, ctx.session.activeOrganizationId);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "notification",
+ resourceName: input.name,
+ });
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -497,7 +561,7 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- updateGotify: adminProcedure
+ updateGotify: withPermission("notification", "update")
.input(apiUpdateGotify)
.mutation(async ({ input, ctx }) => {
try {
@@ -511,15 +575,22 @@ export const notificationRouter = createTRPCRouter({
message: "You are not authorized to update this notification",
});
}
- return await updateGotifyNotification({
+ const result = await updateGotifyNotification({
...input,
organizationId: ctx.session.activeOrganizationId,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "notification",
+ resourceId: input.notificationId,
+ resourceName: notification.name,
+ });
+ return result;
} catch (error) {
throw error;
}
}),
- testGotifyConnection: adminProcedure
+ testGotifyConnection: withPermission("notification", "create")
.input(apiTestGotifyConnection)
.mutation(async ({ input }) => {
try {
@@ -537,14 +608,16 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- createNtfy: adminProcedure
+ createNtfy: withPermission("notification", "create")
.input(apiCreateNtfy)
.mutation(async ({ input, ctx }) => {
try {
- return await createNtfyNotification(
- input,
- ctx.session.activeOrganizationId,
- );
+ await createNtfyNotification(input, ctx.session.activeOrganizationId);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "notification",
+ resourceName: input.name,
+ });
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -553,7 +626,7 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- updateNtfy: adminProcedure
+ updateNtfy: withPermission("notification", "update")
.input(apiUpdateNtfy)
.mutation(async ({ input, ctx }) => {
try {
@@ -567,15 +640,22 @@ export const notificationRouter = createTRPCRouter({
message: "You are not authorized to update this notification",
});
}
- return await updateNtfyNotification({
+ const result = await updateNtfyNotification({
...input,
organizationId: ctx.session.activeOrganizationId,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "notification",
+ resourceId: input.notificationId,
+ resourceName: notification.name,
+ });
+ return result;
} catch (error) {
throw error;
}
}),
- testNtfyConnection: adminProcedure
+ testNtfyConnection: withPermission("notification", "create")
.input(apiTestNtfyConnection)
.mutation(async ({ input }) => {
try {
@@ -595,14 +675,16 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- createCustom: adminProcedure
+ createCustom: withPermission("notification", "create")
.input(apiCreateCustom)
.mutation(async ({ input, ctx }) => {
try {
- return await createCustomNotification(
- input,
- ctx.session.activeOrganizationId,
- );
+ await createCustomNotification(input, ctx.session.activeOrganizationId);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "notification",
+ resourceName: input.name,
+ });
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -611,7 +693,7 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- updateCustom: adminProcedure
+ updateCustom: withPermission("notification", "update")
.input(apiUpdateCustom)
.mutation(async ({ input, ctx }) => {
try {
@@ -622,15 +704,22 @@ export const notificationRouter = createTRPCRouter({
message: "You are not authorized to update this notification",
});
}
- return await updateCustomNotification({
+ const result = await updateCustomNotification({
...input,
organizationId: ctx.session.activeOrganizationId,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "notification",
+ resourceId: input.notificationId,
+ resourceName: notification.name,
+ });
+ return result;
} catch (error) {
throw error;
}
}),
- testCustomConnection: adminProcedure
+ testCustomConnection: withPermission("notification", "create")
.input(apiTestCustomConnection)
.mutation(async ({ input }) => {
try {
@@ -648,14 +737,16 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- createLark: adminProcedure
+ createLark: withPermission("notification", "create")
.input(apiCreateLark)
.mutation(async ({ input, ctx }) => {
try {
- return await createLarkNotification(
- input,
- ctx.session.activeOrganizationId,
- );
+ await createLarkNotification(input, ctx.session.activeOrganizationId);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "notification",
+ resourceName: input.name,
+ });
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -664,7 +755,7 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- updateLark: adminProcedure
+ updateLark: withPermission("notification", "update")
.input(apiUpdateLark)
.mutation(async ({ input, ctx }) => {
try {
@@ -678,15 +769,22 @@ export const notificationRouter = createTRPCRouter({
message: "You are not authorized to update this notification",
});
}
- return await updateLarkNotification({
+ const result = await updateLarkNotification({
...input,
organizationId: ctx.session.activeOrganizationId,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "notification",
+ resourceId: input.notificationId,
+ resourceName: notification.name,
+ });
+ return result;
} catch (error) {
throw error;
}
}),
- testLarkConnection: adminProcedure
+ testLarkConnection: withPermission("notification", "create")
.input(apiTestLarkConnection)
.mutation(async ({ input }) => {
try {
@@ -705,14 +803,16 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- createPushover: adminProcedure
- .input(apiCreatePushover)
+ createTeams: withPermission("notification", "create")
+ .input(apiCreateTeams)
.mutation(async ({ input, ctx }) => {
try {
- return await createPushoverNotification(
- input,
- ctx.session.activeOrganizationId,
- );
+ await createTeamsNotification(input, ctx.session.activeOrganizationId);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "notification",
+ resourceName: input.name,
+ });
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -721,7 +821,74 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- updatePushover: adminProcedure
+ updateTeams: withPermission("notification", "update")
+ .input(apiUpdateTeams)
+ .mutation(async ({ input, ctx }) => {
+ try {
+ const notification = await findNotificationById(input.notificationId);
+ if (
+ IS_CLOUD &&
+ notification.organizationId !== ctx.session.activeOrganizationId
+ ) {
+ throw new TRPCError({
+ code: "UNAUTHORIZED",
+ message: "You are not authorized to update this notification",
+ });
+ }
+ const result = await updateTeamsNotification({
+ ...input,
+ organizationId: ctx.session.activeOrganizationId,
+ });
+ await audit(ctx, {
+ action: "update",
+ resourceType: "notification",
+ resourceId: input.notificationId,
+ resourceName: notification.name,
+ });
+ return result;
+ } catch (error) {
+ throw error;
+ }
+ }),
+ testTeamsConnection: withPermission("notification", "create")
+ .input(apiTestTeamsConnection)
+ .mutation(async ({ input }) => {
+ try {
+ await sendTeamsNotification(input, {
+ title: "🤚 Test Notification",
+ facts: [{ name: "Message", value: "Hi, From Dokploy 👋" }],
+ });
+ return true;
+ } catch (error) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: `${error instanceof Error ? error.message : "Unknown error"}`,
+ cause: error,
+ });
+ }
+ }),
+ createPushover: withPermission("notification", "create")
+ .input(apiCreatePushover)
+ .mutation(async ({ input, ctx }) => {
+ try {
+ await createPushoverNotification(
+ input,
+ ctx.session.activeOrganizationId,
+ );
+ await audit(ctx, {
+ action: "create",
+ resourceType: "notification",
+ resourceName: input.name,
+ });
+ } catch (error) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "Error creating the notification",
+ cause: error,
+ });
+ }
+ }),
+ updatePushover: withPermission("notification", "update")
.input(apiUpdatePushover)
.mutation(async ({ input, ctx }) => {
try {
@@ -735,15 +902,22 @@ export const notificationRouter = createTRPCRouter({
message: "You are not authorized to update this notification",
});
}
- return await updatePushoverNotification({
+ const result = await updatePushoverNotification({
...input,
organizationId: ctx.session.activeOrganizationId,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "notification",
+ resourceId: input.notificationId,
+ resourceName: notification.name,
+ });
+ return result;
} catch (error) {
throw error;
}
}),
- testPushoverConnection: adminProcedure
+ testPushoverConnection: withPermission("notification", "create")
.input(apiTestPushoverConnection)
.mutation(async ({ input }) => {
try {
@@ -761,13 +935,18 @@ export const notificationRouter = createTRPCRouter({
});
}
}),
- getEmailProviders: adminProcedure.query(async ({ ctx }) => {
- return await db.query.notifications.findMany({
- where: eq(notifications.organizationId, ctx.session.activeOrganizationId),
- with: {
- email: true,
- resend: true,
- },
- });
- }),
+ getEmailProviders: withPermission("notification", "read").query(
+ async ({ ctx }) => {
+ return await db.query.notifications.findMany({
+ where: eq(
+ notifications.organizationId,
+ ctx.session.activeOrganizationId,
+ ),
+ with: {
+ email: true,
+ resend: true,
+ },
+ });
+ },
+ ),
});
diff --git a/apps/dokploy/server/api/routers/organization.ts b/apps/dokploy/server/api/routers/organization.ts
index 834c8a399..2f7d45287 100644
--- a/apps/dokploy/server/api/routers/organization.ts
+++ b/apps/dokploy/server/api/routers/organization.ts
@@ -1,11 +1,18 @@
+import { db } from "@dokploy/server/db";
import { IS_CLOUD } from "@dokploy/server/index";
+import { audit } from "@/server/api/utils/audit";
import { TRPCError } from "@trpc/server";
import { and, desc, eq, exists } from "drizzle-orm";
import { nanoid } from "nanoid";
import { z } from "zod";
-import { db } from "@/server/db";
-import { invitation, member, organization } from "@/server/db/schema";
-import { adminProcedure, createTRPCRouter, protectedProcedure } from "../trpc";
+import {
+ invitation,
+ member,
+ organization,
+ organizationRole,
+ user,
+} from "@/server/db/schema";
+import { createTRPCRouter, protectedProcedure, withPermission } from "../trpc";
export const organizationRouter = createTRPCRouter({
create: protectedProcedure
.input(
@@ -50,6 +57,12 @@ export const organizationRouter = createTRPCRouter({
createdAt: new Date(),
userId: ctx.user.id,
});
+ await audit(ctx, {
+ action: "create",
+ resourceType: "organization",
+ resourceId: result.id,
+ resourceName: result.name,
+ });
return result;
}),
all: protectedProcedure.query(async ({ ctx }) => {
@@ -156,6 +169,12 @@ export const organizationRouter = createTRPCRouter({
})
.where(eq(organization.id, input.organizationId))
.returning();
+ await audit(ctx, {
+ action: "update",
+ resourceType: "organization",
+ resourceId: input.organizationId,
+ resourceName: input.name,
+ });
return result[0];
}),
delete: protectedProcedure
@@ -220,15 +239,109 @@ export const organizationRouter = createTRPCRouter({
.delete(organization)
.where(eq(organization.id, input.organizationId));
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "organization",
+ resourceId: input.organizationId,
+ resourceName: org.name,
+ });
return result;
}),
- allInvitations: adminProcedure.query(async ({ ctx }) => {
+ inviteMember: withPermission("member", "create")
+ .input(
+ z.object({
+ email: z.string().email(),
+ role: z.string().min(1),
+ }),
+ )
+ .mutation(async ({ ctx, input }) => {
+ const orgId = ctx.session.activeOrganizationId;
+ const email = input.email.toLowerCase();
+
+ // Check if user is already a member
+ const existingUser = await db.query.user.findFirst({
+ where: eq(user.email, email),
+ });
+
+ if (existingUser) {
+ const existingMember = await db.query.member.findFirst({
+ where: and(
+ eq(member.organizationId, orgId),
+ eq(member.userId, existingUser.id),
+ ),
+ });
+
+ if (existingMember) {
+ throw new TRPCError({
+ code: "CONFLICT",
+ message: "User is already a member of this organization",
+ });
+ }
+ }
+
+ // Check for pending invitation
+ const existingInvitation = await db.query.invitation.findFirst({
+ where: and(
+ eq(invitation.organizationId, orgId),
+ eq(invitation.email, email),
+ eq(invitation.status, "pending"),
+ ),
+ });
+
+ if (existingInvitation) {
+ throw new TRPCError({
+ code: "CONFLICT",
+ message: "An invitation has already been sent to this email",
+ });
+ }
+
+ // If assigning a custom role, verify it exists
+ if (!["owner", "admin", "member"].includes(input.role)) {
+ const customRole = await db.query.organizationRole.findFirst({
+ where: and(
+ eq(organizationRole.organizationId, orgId),
+ eq(organizationRole.role, input.role),
+ ),
+ });
+
+ if (!customRole) {
+ throw new TRPCError({
+ code: "NOT_FOUND",
+ message: `Role "${input.role}" not found`,
+ });
+ }
+ }
+
+ const [created] = await db
+ .insert(invitation)
+ .values({
+ id: nanoid(),
+ organizationId: orgId,
+ email,
+ role: input.role as any,
+ status: "pending",
+ expiresAt: new Date(Date.now() + 48 * 60 * 60 * 1000),
+ inviterId: ctx.user.id,
+ })
+ .returning();
+
+ await audit(ctx, {
+ action: "create",
+ resourceType: "organization",
+ resourceId: created?.id,
+ resourceName: email,
+ metadata: { type: "inviteMember", role: input.role },
+ });
+ return created;
+ }),
+
+ allInvitations: withPermission("member", "create").query(async ({ ctx }) => {
return await db.query.invitation.findMany({
where: eq(invitation.organizationId, ctx.session.activeOrganizationId),
orderBy: [desc(invitation.status), desc(invitation.expiresAt)],
});
}),
- removeInvitation: adminProcedure
+ removeInvitation: withPermission("member", "create")
.input(z.object({ invitationId: z.string() }))
.mutation(async ({ ctx, input }) => {
const invitationResult = await db.query.invitation.findFirst({
@@ -251,15 +364,23 @@ export const organizationRouter = createTRPCRouter({
});
}
- return await db
+ const result = await db
.delete(invitation)
.where(eq(invitation.id, input.invitationId));
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "organization",
+ resourceId: input.invitationId,
+ resourceName: invitationResult.email,
+ metadata: { type: "removeInvitation" },
+ });
+ return result;
}),
- updateMemberRole: adminProcedure
+ updateMemberRole: withPermission("member", "update")
.input(
z.object({
memberId: z.string(),
- role: z.enum(["admin", "member"]),
+ role: z.string().min(1),
}),
)
.mutation(async ({ ctx, input }) => {
@@ -289,7 +410,7 @@ export const organizationRouter = createTRPCRouter({
}
// Owner role is intransferible - cannot change to or from owner
- if (target.role === "owner") {
+ if (target.role === "owner" || input.role === "owner") {
throw new TRPCError({
code: "FORBIDDEN",
message: "The owner role is intransferible",
@@ -306,12 +427,39 @@ export const organizationRouter = createTRPCRouter({
});
}
+ // If assigning a custom role (not admin/member), verify it exists
+ if (input.role !== "admin" && input.role !== "member") {
+ const customRole = await db.query.organizationRole.findFirst({
+ where: and(
+ eq(
+ organizationRole.organizationId,
+ ctx.session.activeOrganizationId,
+ ),
+ eq(organizationRole.role, input.role),
+ ),
+ });
+
+ if (!customRole) {
+ throw new TRPCError({
+ code: "NOT_FOUND",
+ message: `Custom role "${input.role}" not found`,
+ });
+ }
+ }
+
// Update the target member's role
await db
.update(member)
.set({ role: input.role })
.where(eq(member.id, input.memberId));
+ await audit(ctx, {
+ action: "update",
+ resourceType: "user",
+ resourceId: target.userId,
+ resourceName: target.user.email,
+ metadata: { before: target.role, after: input.role },
+ });
return true;
}),
setDefault: protectedProcedure
@@ -353,6 +501,21 @@ export const organizationRouter = createTRPCRouter({
),
);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "organization",
+ resourceId: input.organizationId,
+ metadata: { type: "setDefault" },
+ });
return { success: true };
}),
+ active: protectedProcedure.query(async ({ ctx }) => {
+ if (!ctx.session.activeOrganizationId) {
+ return null;
+ }
+
+ return await db.query.organization.findFirst({
+ where: eq(organization.id, ctx.session.activeOrganizationId),
+ });
+ }),
});
diff --git a/apps/dokploy/server/api/routers/patch.ts b/apps/dokploy/server/api/routers/patch.ts
new file mode 100644
index 000000000..333dd1856
--- /dev/null
+++ b/apps/dokploy/server/api/routers/patch.ts
@@ -0,0 +1,332 @@
+import {
+ cleanPatchRepos,
+ createPatch,
+ deletePatch,
+ ensurePatchRepo,
+ findApplicationById,
+ findComposeById,
+ findPatchByFilePath,
+ findPatchById,
+ findPatchesByEntityId,
+ markPatchForDeletion,
+ readPatchRepoDirectory,
+ readPatchRepoFile,
+ updatePatch,
+} from "@dokploy/server";
+import { checkServicePermissionAndAccess } from "@dokploy/server/services/permission";
+import { TRPCError } from "@trpc/server";
+import { z } from "zod";
+import {
+ adminProcedure,
+ createTRPCRouter,
+ protectedProcedure,
+} from "@/server/api/trpc";
+import { audit } from "@/server/api/utils/audit";
+import {
+ apiCreatePatch,
+ apiDeletePatch,
+ apiFindPatch,
+ apiTogglePatchEnabled,
+ apiUpdatePatch,
+} from "@/server/db/schema";
+
+/**
+ * Resolves the serviceId from a patch record (applicationId or composeId).
+ * Throws if neither is set.
+ */
+const resolvePatchServiceId = (patch: {
+ applicationId: string | null;
+ composeId: string | null;
+}): string => {
+ const serviceId = patch.applicationId ?? patch.composeId;
+ if (!serviceId) {
+ throw new TRPCError({
+ code: "INTERNAL_SERVER_ERROR",
+ message: "Patch has no associated service",
+ });
+ }
+ return serviceId;
+};
+
+export const patchRouter = createTRPCRouter({
+ create: protectedProcedure
+ .input(apiCreatePatch)
+ .mutation(async ({ input, ctx }) => {
+ const serviceId = input.applicationId ?? input.composeId;
+ if (!serviceId) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "Either applicationId or composeId must be provided",
+ });
+ }
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ service: ["create"],
+ });
+ const result = await createPatch(input);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "settings",
+ resourceId: result.patchId,
+ resourceName: result.filePath,
+ metadata: { type: "patch" },
+ });
+ return result;
+ }),
+
+ one: protectedProcedure.input(apiFindPatch).query(async ({ input, ctx }) => {
+ const patch = await findPatchById(input.patchId);
+ const serviceId = resolvePatchServiceId(patch);
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ service: ["read"],
+ });
+ return patch;
+ }),
+
+ byEntityId: protectedProcedure
+ .input(
+ z.object({ id: z.string(), type: z.enum(["application", "compose"]) }),
+ )
+ .query(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.id, {
+ service: ["read"],
+ });
+ return await findPatchesByEntityId(input.id, input.type);
+ }),
+
+ update: protectedProcedure
+ .input(apiUpdatePatch)
+ .mutation(async ({ input, ctx }) => {
+ const patch = await findPatchById(input.patchId);
+ const serviceId = resolvePatchServiceId(patch);
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ service: ["create"],
+ });
+ const { patchId, ...data } = input;
+ const result = await updatePatch(patchId, data);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceId: patchId,
+ resourceName: patch.filePath,
+ metadata: { type: "patch" },
+ });
+ return result;
+ }),
+
+ delete: protectedProcedure
+ .input(apiDeletePatch)
+ .mutation(async ({ input, ctx }) => {
+ const patch = await findPatchById(input.patchId);
+ const serviceId = resolvePatchServiceId(patch);
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ service: ["delete"],
+ });
+ const result = await deletePatch(input.patchId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "settings",
+ resourceId: input.patchId,
+ resourceName: patch.filePath,
+ metadata: { type: "patch" },
+ });
+ return result;
+ }),
+
+ toggleEnabled: protectedProcedure
+ .input(apiTogglePatchEnabled)
+ .mutation(async ({ input, ctx }) => {
+ const patch = await findPatchById(input.patchId);
+ const serviceId = resolvePatchServiceId(patch);
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ service: ["create"],
+ });
+ const result = await updatePatch(input.patchId, {
+ enabled: input.enabled,
+ });
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceId: input.patchId,
+ resourceName: patch.filePath,
+ metadata: { type: "patch", enabled: input.enabled },
+ });
+ return result;
+ }),
+
+ // Repository Operations
+ ensureRepo: protectedProcedure
+ .input(
+ z.object({
+ id: z.string(),
+ type: z.enum(["application", "compose"]),
+ }),
+ )
+ .mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.id, {
+ service: ["create"],
+ });
+ const result = await ensurePatchRepo({
+ type: input.type,
+ id: input.id,
+ });
+ await audit(ctx, {
+ action: "create",
+ resourceType: "settings",
+ resourceId: input.id,
+ metadata: { type: "ensurePatchRepo", serviceType: input.type },
+ });
+ return result;
+ }),
+
+ readRepoDirectories: protectedProcedure
+ .input(
+ z.object({
+ id: z.string().min(1),
+ type: z.enum(["application", "compose"]),
+ repoPath: z.string(),
+ }),
+ )
+ .query(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.id, {
+ service: ["read"],
+ });
+ let serverId: string | null = null;
+ if (input.type === "application") {
+ const app = await findApplicationById(input.id);
+ serverId = app.serverId;
+ } else {
+ const compose = await findComposeById(input.id);
+ serverId = compose.serverId;
+ }
+ return await readPatchRepoDirectory(input.repoPath, serverId);
+ }),
+
+ readRepoFile: protectedProcedure
+ .input(
+ z.object({
+ id: z.string().min(1),
+ type: z.enum(["application", "compose"]),
+ filePath: z.string(),
+ }),
+ )
+ .query(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.id, {
+ service: ["read"],
+ });
+ let serverId: string | null = null;
+ if (input.type === "application") {
+ const app = await findApplicationById(input.id);
+ serverId = app.serverId;
+ } else {
+ const compose = await findComposeById(input.id);
+ serverId = compose.serverId;
+ }
+ const existingPatch = await findPatchByFilePath(
+ input.filePath,
+ input.id,
+ input.type,
+ );
+ // For delete patches, show current file content from repo (what will be deleted)
+ if (existingPatch?.type === "delete") {
+ try {
+ return await readPatchRepoFile(input.id, input.type, input.filePath);
+ } catch {
+ return "(File not found in repo - will be removed if it exists)";
+ }
+ }
+ if (existingPatch?.content) {
+ return existingPatch.content;
+ }
+ return await readPatchRepoFile(input.id, input.type, input.filePath);
+ }),
+
+ saveFileAsPatch: protectedProcedure
+ .input(
+ z.object({
+ id: z.string().min(1),
+ type: z.enum(["application", "compose"]),
+ filePath: z.string(),
+ content: z.string(),
+ patchType: z.enum(["create", "update"]).default("update"),
+ }),
+ )
+ .mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.id, {
+ service: ["create"],
+ });
+ const existingPatch = await findPatchByFilePath(
+ input.filePath,
+ input.id,
+ input.type,
+ );
+ if (!existingPatch) {
+ const result = await createPatch({
+ filePath: input.filePath,
+ content: input.content,
+ type: input.patchType,
+ applicationId: input.type === "application" ? input.id : undefined,
+ composeId: input.type === "compose" ? input.id : undefined,
+ });
+ await audit(ctx, {
+ action: "create",
+ resourceType: "settings",
+ resourceId: result.patchId,
+ resourceName: input.filePath,
+ metadata: { type: "saveFileAsPatch" },
+ });
+ return result;
+ }
+ const result = await updatePatch(existingPatch.patchId, {
+ content: input.content,
+ type: input.patchType,
+ });
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceId: existingPatch.patchId,
+ resourceName: input.filePath,
+ metadata: { type: "saveFileAsPatch" },
+ });
+ return result;
+ }),
+
+ markFileForDeletion: protectedProcedure
+ .input(
+ z.object({
+ id: z.string().min(1),
+ type: z.enum(["application", "compose"]),
+ filePath: z.string(),
+ }),
+ )
+ .mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.id, {
+ service: ["create"],
+ });
+ const result = await markPatchForDeletion(
+ input.filePath,
+ input.id,
+ input.type,
+ );
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "settings",
+ resourceId: input.id,
+ resourceName: input.filePath,
+ metadata: { type: "markFileForDeletion" },
+ });
+ return result;
+ }),
+
+ cleanPatchRepos: adminProcedure
+ .input(z.object({ serverId: z.string().optional() }))
+ .mutation(async ({ input, ctx }) => {
+ await cleanPatchRepos(input.serverId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "settings",
+ resourceId: input.serverId || "local",
+ metadata: { type: "cleanPatchRepos" },
+ });
+ return true;
+ }),
+});
diff --git a/apps/dokploy/server/api/routers/port.ts b/apps/dokploy/server/api/routers/port.ts
index bbd949804..c98081e86 100644
--- a/apps/dokploy/server/api/routers/port.ts
+++ b/apps/dokploy/server/api/routers/port.ts
@@ -4,8 +4,10 @@ import {
removePortById,
updatePortById,
} from "@dokploy/server";
+import { checkServicePermissionAndAccess } from "@dokploy/server/services/permission";
import { TRPCError } from "@trpc/server";
import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
+import { audit } from "@/server/api/utils/audit";
import {
apiCreatePort,
apiFindOnePort,
@@ -15,10 +17,19 @@ import {
export const portRouter = createTRPCRouter({
create: protectedProcedure
.input(apiCreatePort)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
try {
- await createPort(input);
- return true;
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
+ const port = await createPort(input);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "port",
+ resourceId: port.portId,
+ resourceName: `${port.publishedPort}:${port.targetPort}`,
+ });
+ return port;
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -32,15 +43,11 @@ export const portRouter = createTRPCRouter({
.query(async ({ input, ctx }) => {
try {
const port = await finPortById(input.portId);
- if (
- port.application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this port",
- });
- }
+ await checkServicePermissionAndAccess(
+ ctx,
+ port.application.applicationId,
+ { service: ["read"] },
+ );
return port;
} catch (error) {
throw new TRPCError({
@@ -54,17 +61,20 @@ export const portRouter = createTRPCRouter({
.input(apiFindOnePort)
.mutation(async ({ input, ctx }) => {
const port = await finPortById(input.portId);
- if (
- port.application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to delete this port",
- });
- }
+ await checkServicePermissionAndAccess(
+ ctx,
+ port.application.applicationId,
+ { service: ["delete"] },
+ );
try {
- return await removePortById(input.portId);
+ const result = await removePortById(input.portId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "port",
+ resourceId: port.portId,
+ resourceName: `${port.publishedPort}:${port.targetPort}`,
+ });
+ return result;
} catch (error) {
const message =
error instanceof Error ? error.message : "Error input: Deleting port";
@@ -78,17 +88,20 @@ export const portRouter = createTRPCRouter({
.input(apiUpdatePort)
.mutation(async ({ input, ctx }) => {
const port = await finPortById(input.portId);
- if (
- port.application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to update this port",
- });
- }
+ await checkServicePermissionAndAccess(
+ ctx,
+ port.application.applicationId,
+ { service: ["create"] },
+ );
try {
- return await updatePortById(input.portId, input);
+ const result = await updatePortById(input.portId, input);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "port",
+ resourceId: port.portId,
+ resourceName: `${port.publishedPort}:${port.targetPort}`,
+ });
+ return result;
} catch (error) {
const message =
error instanceof Error ? error.message : "Error updating the port";
diff --git a/apps/dokploy/server/api/routers/postgres.ts b/apps/dokploy/server/api/routers/postgres.ts
index 97db0b878..3b3cfd208 100644
--- a/apps/dokploy/server/api/routers/postgres.ts
+++ b/apps/dokploy/server/api/routers/postgres.ts
@@ -1,7 +1,5 @@
import {
- addNewService,
checkPortInUse,
- checkServiceAccess,
createMount,
createPostgres,
deployPostgres,
@@ -20,12 +18,18 @@ import {
stopServiceRemote,
updatePostgresById,
} from "@dokploy/server";
+import {
+ addNewService,
+ checkServiceAccess,
+ checkServicePermissionAndAccess,
+ findMemberByUserId,
+} from "@dokploy/server/services/permission";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
-import { observable } from "@trpc/server/observable";
-import { eq } from "drizzle-orm";
+import { and, desc, eq, ilike, or, sql } from "drizzle-orm";
import { z } from "zod";
+import { audit } from "@/server/api/utils/audit";
import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
import {
apiChangePostgresStatus,
apiCreatePostgres,
@@ -38,6 +42,7 @@ import {
apiUpdatePostgres,
postgres as postgresTable,
} from "@/server/db/schema";
+import { environments, projects } from "@/server/db/schema";
import { cancelJobs } from "@/server/utils/backup";
export const postgresRouter = createTRPCRouter({
@@ -45,18 +50,10 @@ export const postgresRouter = createTRPCRouter({
.input(apiCreatePostgres)
.mutation(async ({ input, ctx }) => {
try {
- // Get project from environment
const environment = await findEnvironmentById(input.environmentId);
const project = await findProjectById(environment.projectId);
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- project.projectId,
- ctx.session.activeOrganizationId,
- "create",
- );
- }
+ await checkServiceAccess(ctx, project.projectId, "create");
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
@@ -74,13 +71,7 @@ export const postgresRouter = createTRPCRouter({
const newPostgres = await createPostgres({
...input,
});
- if (ctx.user.role === "member") {
- await addNewService(
- ctx.user.id,
- newPostgres.postgresId,
- project.organizationId,
- );
- }
+ await addNewService(ctx, newPostgres.postgresId);
const mountPath = getMountPath(input.dockerImage);
@@ -92,6 +83,12 @@ export const postgresRouter = createTRPCRouter({
type: "volume",
});
+ await audit(ctx, {
+ action: "create",
+ resourceType: "service",
+ resourceId: newPostgres.postgresId,
+ resourceName: newPostgres.appName,
+ });
return newPostgres;
} catch (error) {
if (error instanceof TRPCError) {
@@ -107,14 +104,7 @@ export const postgresRouter = createTRPCRouter({
one: protectedProcedure
.input(apiFindOnePostgres)
.query(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.postgresId,
- ctx.session.activeOrganizationId,
- "access",
- );
- }
+ await checkServiceAccess(ctx, input.postgresId, "read");
const postgres = await findPostgresById(input.postgresId);
if (
@@ -132,18 +122,11 @@ export const postgresRouter = createTRPCRouter({
start: protectedProcedure
.input(apiFindOnePostgres)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.postgresId, {
+ deployment: ["create"],
+ });
const service = await findPostgresById(input.postgresId);
- if (
- service.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to start this Postgres",
- });
- }
-
if (service.serverId) {
await startServiceRemote(service.serverId, service.appName);
} else {
@@ -153,21 +136,21 @@ export const postgresRouter = createTRPCRouter({
applicationStatus: "done",
});
+ await audit(ctx, {
+ action: "start",
+ resourceType: "service",
+ resourceId: service.postgresId,
+ resourceName: service.appName,
+ });
return service;
}),
stop: protectedProcedure
.input(apiFindOnePostgres)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.postgresId, {
+ deployment: ["create"],
+ });
const postgres = await findPostgresById(input.postgresId);
- if (
- postgres.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to stop this Postgres",
- });
- }
if (postgres.serverId) {
await stopServiceRemote(postgres.serverId, postgres.appName);
} else {
@@ -177,23 +160,22 @@ export const postgresRouter = createTRPCRouter({
applicationStatus: "idle",
});
+ await audit(ctx, {
+ action: "stop",
+ resourceType: "service",
+ resourceId: postgres.postgresId,
+ resourceName: postgres.appName,
+ });
return postgres;
}),
saveExternalPort: protectedProcedure
.input(apiSaveExternalPortPostgres)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.postgresId, {
+ service: ["create"],
+ });
const postgres = await findPostgresById(input.postgresId);
- if (
- postgres.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this external port",
- });
- }
-
if (input.externalPort) {
const portCheck = await checkPortInUse(
input.externalPort,
@@ -211,21 +193,27 @@ export const postgresRouter = createTRPCRouter({
externalPort: input.externalPort,
});
await deployPostgres(input.postgresId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: postgres.postgresId,
+ resourceName: postgres.appName,
+ });
return postgres;
}),
deploy: protectedProcedure
.input(apiDeployPostgres)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.postgresId, {
+ deployment: ["create"],
+ });
const postgres = await findPostgresById(input.postgresId);
- if (
- postgres.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this Postgres",
- });
- }
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "service",
+ resourceId: postgres.postgresId,
+ resourceName: postgres.appName,
+ });
return deployPostgres(input.postgresId);
}),
@@ -239,53 +227,53 @@ export const postgresRouter = createTRPCRouter({
},
})
.input(apiDeployPostgres)
- .subscription(async ({ input, ctx }) => {
- const postgres = await findPostgresById(input.postgresId);
- if (
- postgres.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this Postgres",
- });
- }
- return observable((emit) => {
- deployPostgres(input.postgresId, (log) => {
- emit.next(log);
- });
+ .subscription(async function* ({ input, ctx, signal }) {
+ await checkServicePermissionAndAccess(ctx, input.postgresId, {
+ deployment: ["create"],
});
+
+ const queue: string[] = [];
+ const done = false;
+
+ deployPostgres(input.postgresId, (log) => {
+ queue.push(log);
+ });
+
+ while (!done || queue.length > 0) {
+ if (queue.length > 0) {
+ yield queue.shift()!;
+ } else {
+ await new Promise((r) => setTimeout(r, 50));
+ }
+
+ if (signal?.aborted) {
+ return;
+ }
+ }
}),
changeStatus: protectedProcedure
.input(apiChangePostgresStatus)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.postgresId, {
+ deployment: ["create"],
+ });
const postgres = await findPostgresById(input.postgresId);
- if (
- postgres.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to change this Postgres status",
- });
- }
await updatePostgresById(input.postgresId, {
applicationStatus: input.applicationStatus,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: postgres.postgresId,
+ resourceName: postgres.appName,
+ });
return postgres;
}),
remove: protectedProcedure
.input(apiFindOnePostgres)
.mutation(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.postgresId,
- ctx.session.activeOrganizationId,
- "delete",
- );
- }
+ await checkServiceAccess(ctx, input.postgresId, "delete");
const postgres = await findPostgresById(input.postgresId);
if (
@@ -298,6 +286,12 @@ export const postgresRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "service",
+ resourceId: postgres.postgresId,
+ resourceName: postgres.appName,
+ });
const backups = await findBackupsByDbId(input.postgresId, "postgres");
const cleanupOperations = [
@@ -317,16 +311,9 @@ export const postgresRouter = createTRPCRouter({
saveEnvironment: protectedProcedure
.input(apiSaveEnvironmentVariablesPostgres)
.mutation(async ({ input, ctx }) => {
- const postgres = await findPostgresById(input.postgresId);
- if (
- postgres.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this environment",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.postgresId, {
+ envVars: ["write"],
+ });
const service = await updatePostgresById(input.postgresId, {
env: input.env,
});
@@ -338,21 +325,20 @@ export const postgresRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: input.postgresId,
+ });
return true;
}),
reload: protectedProcedure
.input(apiResetPostgres)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.postgresId, {
+ deployment: ["create"],
+ });
const postgres = await findPostgresById(input.postgresId);
- if (
- postgres.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to reload this Postgres",
- });
- }
if (postgres.serverId) {
await stopServiceRemote(postgres.serverId, postgres.appName);
} else {
@@ -370,22 +356,21 @@ export const postgresRouter = createTRPCRouter({
await updatePostgresById(input.postgresId, {
applicationStatus: "done",
});
+ await audit(ctx, {
+ action: "reload",
+ resourceType: "service",
+ resourceId: postgres.postgresId,
+ resourceName: postgres.appName,
+ });
return true;
}),
update: protectedProcedure
.input(apiUpdatePostgres)
.mutation(async ({ input, ctx }) => {
const { postgresId, ...rest } = input;
- const postgres = await findPostgresById(postgresId);
- if (
- postgres.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to update this Postgres",
- });
- }
+ await checkServicePermissionAndAccess(ctx, postgresId, {
+ service: ["create"],
+ });
const service = await updatePostgresById(postgresId, {
...rest,
@@ -398,6 +383,12 @@ export const postgresRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: postgresId,
+ resourceName: service.appName,
+ });
return true;
}),
move: protectedProcedure
@@ -408,31 +399,10 @@ export const postgresRouter = createTRPCRouter({
}),
)
.mutation(async ({ input, ctx }) => {
- const postgres = await findPostgresById(input.postgresId);
- if (
- postgres.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move this postgres",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.postgresId, {
+ service: ["create"],
+ });
- const targetEnvironment = await findEnvironmentById(
- input.targetEnvironmentId,
- );
- if (
- targetEnvironment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move to this environment",
- });
- }
-
- // Update the postgres's projectId
const updatedPostgres = await db
.update(postgresTable)
.set({
@@ -449,24 +419,127 @@ export const postgresRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "move",
+ resourceType: "service",
+ resourceId: updatedPostgres.postgresId,
+ resourceName: updatedPostgres.appName,
+ });
return updatedPostgres;
}),
rebuild: protectedProcedure
.input(apiRebuildPostgres)
.mutation(async ({ input, ctx }) => {
- const postgres = await findPostgresById(input.postgresId);
- if (
- postgres.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to rebuild this Postgres database",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.postgresId, {
+ deployment: ["create"],
+ });
- await rebuildDatabase(postgres.postgresId, "postgres");
+ await rebuildDatabase(input.postgresId, "postgres");
+ await audit(ctx, {
+ action: "rebuild",
+ resourceType: "service",
+ resourceId: input.postgresId,
+ });
return true;
}),
+ search: protectedProcedure
+ .input(
+ z.object({
+ q: z.string().optional(),
+ name: z.string().optional(),
+ appName: z.string().optional(),
+ description: z.string().optional(),
+ projectId: z.string().optional(),
+ environmentId: z.string().optional(),
+ limit: z.number().min(1).max(100).default(20),
+ offset: z.number().min(0).default(0),
+ }),
+ )
+ .query(async ({ ctx, input }) => {
+ const baseConditions = [
+ eq(projects.organizationId, ctx.session.activeOrganizationId),
+ ];
+ if (input.projectId) {
+ baseConditions.push(eq(environments.projectId, input.projectId));
+ }
+ if (input.environmentId) {
+ baseConditions.push(
+ eq(postgresTable.environmentId, input.environmentId),
+ );
+ }
+ if (input.q?.trim()) {
+ const term = `%${input.q.trim()}%`;
+ baseConditions.push(
+ or(
+ ilike(postgresTable.name, term),
+ ilike(postgresTable.appName, term),
+ ilike(postgresTable.description ?? "", term),
+ )!,
+ );
+ }
+ if (input.name?.trim()) {
+ baseConditions.push(
+ ilike(postgresTable.name, `%${input.name.trim()}%`),
+ );
+ }
+ if (input.appName?.trim()) {
+ baseConditions.push(
+ ilike(postgresTable.appName, `%${input.appName.trim()}%`),
+ );
+ }
+ if (input.description?.trim()) {
+ baseConditions.push(
+ ilike(
+ postgresTable.description ?? "",
+ `%${input.description.trim()}%`,
+ ),
+ );
+ }
+ const { accessedServices } = await findMemberByUserId(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
+ if (accessedServices.length === 0) return { items: [], total: 0 };
+ baseConditions.push(
+ sql`${postgresTable.postgresId} IN (${sql.join(
+ accessedServices.map((id) => sql`${id}`),
+ sql`, `,
+ )})`,
+ );
+
+ const where = and(...baseConditions);
+ const [items, countResult] = await Promise.all([
+ db
+ .select({
+ postgresId: postgresTable.postgresId,
+ name: postgresTable.name,
+ appName: postgresTable.appName,
+ description: postgresTable.description,
+ environmentId: postgresTable.environmentId,
+ applicationStatus: postgresTable.applicationStatus,
+ createdAt: postgresTable.createdAt,
+ })
+ .from(postgresTable)
+ .innerJoin(
+ environments,
+ eq(postgresTable.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where)
+ .orderBy(desc(postgresTable.createdAt))
+ .limit(input.limit)
+ .offset(input.offset),
+ db
+ .select({ count: sql`count(*)::int` })
+ .from(postgresTable)
+ .innerJoin(
+ environments,
+ eq(postgresTable.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where),
+ ]);
+ return { items, total: countResult[0]?.count ?? 0 };
+ }),
});
diff --git a/apps/dokploy/server/api/routers/preview-deployment.ts b/apps/dokploy/server/api/routers/preview-deployment.ts
index 0c325a9c6..a45ef80c5 100644
--- a/apps/dokploy/server/api/routers/preview-deployment.ts
+++ b/apps/dokploy/server/api/routers/preview-deployment.ts
@@ -5,8 +5,9 @@ import {
IS_CLOUD,
removePreviewDeployment,
} from "@dokploy/server";
-import { TRPCError } from "@trpc/server";
+import { checkServicePermissionAndAccess } from "@dokploy/server/services/permission";
import { z } from "zod";
+import { audit } from "@/server/api/utils/audit";
import { apiFindAllByApplication } from "@/server/db/schema";
import type { DeploymentJob } from "@/server/queues/queue-types";
import { myQueue } from "@/server/queues/queueSetup";
@@ -17,53 +18,46 @@ export const previewDeploymentRouter = createTRPCRouter({
all: protectedProcedure
.input(apiFindAllByApplication)
.query(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ deployment: ["read"],
+ });
return await findPreviewDeploymentsByApplicationId(input.applicationId);
}),
- delete: protectedProcedure
- .input(z.object({ previewDeploymentId: z.string() }))
- .mutation(async ({ input, ctx }) => {
- const previewDeployment = await findPreviewDeploymentById(
- input.previewDeploymentId,
- );
- if (
- previewDeployment.application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to delete this preview deployment",
- });
- }
- await removePreviewDeployment(input.previewDeploymentId);
- return true;
- }),
+
one: protectedProcedure
.input(z.object({ previewDeploymentId: z.string() }))
.query(async ({ input, ctx }) => {
const previewDeployment = await findPreviewDeploymentById(
input.previewDeploymentId,
);
- if (
- previewDeployment.application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this preview deployment",
- });
- }
+ await checkServicePermissionAndAccess(
+ ctx,
+ previewDeployment.applicationId,
+ { deployment: ["read"] },
+ );
return previewDeployment;
}),
+
+ delete: protectedProcedure
+ .input(z.object({ previewDeploymentId: z.string() }))
+ .mutation(async ({ input, ctx }) => {
+ const previewDeployment = await findPreviewDeploymentById(
+ input.previewDeploymentId,
+ );
+ await checkServicePermissionAndAccess(
+ ctx,
+ previewDeployment.applicationId,
+ { deployment: ["cancel"] },
+ );
+ await removePreviewDeployment(input.previewDeploymentId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "previewDeployment",
+ resourceId: input.previewDeploymentId,
+ });
+ return true;
+ }),
+
redeploy: protectedProcedure
.input(
z.object({
@@ -76,15 +70,11 @@ export const previewDeploymentRouter = createTRPCRouter({
const previewDeployment = await findPreviewDeploymentById(
input.previewDeploymentId,
);
- if (
- previewDeployment.application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to redeploy this preview deployment",
- });
- }
+ await checkServicePermissionAndAccess(
+ ctx,
+ previewDeployment.applicationId,
+ { deployment: ["create"] },
+ );
const application = await findApplicationById(
previewDeployment.applicationId,
);
@@ -103,6 +93,11 @@ export const previewDeploymentRouter = createTRPCRouter({
deploy(jobData).catch((error) => {
console.error("Background deployment failed:", error);
});
+ await audit(ctx, {
+ action: "redeploy",
+ resourceType: "previewDeployment",
+ resourceId: input.previewDeploymentId,
+ });
return true;
}
await myQueue.add(
@@ -113,6 +108,11 @@ export const previewDeploymentRouter = createTRPCRouter({
removeOnFail: true,
},
);
+ await audit(ctx, {
+ action: "redeploy",
+ resourceType: "previewDeployment",
+ resourceId: input.previewDeploymentId,
+ });
return true;
}),
});
diff --git a/apps/dokploy/server/api/routers/project.ts b/apps/dokploy/server/api/routers/project.ts
index 81c372765..991974d90 100644
--- a/apps/dokploy/server/api/routers/project.ts
+++ b/apps/dokploy/server/api/routers/project.ts
@@ -1,7 +1,4 @@
import {
- addNewEnvironment,
- addNewProject,
- checkProjectAccess,
createApplication,
createBackup,
createCompose,
@@ -22,7 +19,6 @@ import {
findComposeById,
findEnvironmentById,
findMariadbById,
- findMemberById,
findMongoById,
findMySqlById,
findPostgresById,
@@ -32,12 +28,24 @@ import {
IS_CLOUD,
updateProjectById,
} from "@dokploy/server";
+import {
+ addNewEnvironment,
+ addNewProject,
+ checkPermission,
+ checkProjectAccess,
+ findMemberByUserId,
+} from "@dokploy/server/services/permission";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
-import { and, desc, eq, sql } from "drizzle-orm";
+import { and, desc, eq, ilike, or, sql } from "drizzle-orm";
import type { AnyPgColumn } from "drizzle-orm/pg-core";
import { z } from "zod";
-import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
+import { audit } from "@/server/api/utils/audit";
+import {
+ createTRPCRouter,
+ protectedProcedure,
+ withPermission,
+} from "@/server/api/trpc";
import {
apiCreateProject,
apiFindOneProject,
@@ -59,13 +67,7 @@ export const projectRouter = createTRPCRouter({
.input(apiCreateProject)
.mutation(async ({ ctx, input }) => {
try {
- if (ctx.user.role === "member") {
- await checkProjectAccess(
- ctx.user.id,
- "create",
- ctx.session.activeOrganizationId,
- );
- }
+ await checkProjectAccess(ctx, "create");
const admin = await findUserById(ctx.user.ownerId);
@@ -80,20 +82,16 @@ export const projectRouter = createTRPCRouter({
input,
ctx.session.activeOrganizationId,
);
- if (ctx.user.role === "member") {
- await addNewProject(
- ctx.user.id,
- project.project.projectId,
- ctx.session.activeOrganizationId,
- );
+ await addNewProject(ctx, project.project.projectId);
- await addNewEnvironment(
- ctx.user.id,
- project?.environment?.environmentId || "",
- ctx.session.activeOrganizationId,
- );
- }
+ await addNewEnvironment(ctx, project?.environment?.environmentId || "");
+ await audit(ctx, {
+ action: "create",
+ resourceType: "project",
+ resourceId: project.project.projectId,
+ resourceName: project.project.name,
+ });
return project;
} catch (error) {
throw new TRPCError({
@@ -107,18 +105,18 @@ export const projectRouter = createTRPCRouter({
one: protectedProcedure
.input(apiFindOneProject)
.query(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- const { accessedServices } = await findMemberById(
+ if (ctx.user.role !== "owner" && ctx.user.role !== "admin") {
+ const { accessedServices, accessedProjects } = await findMemberByUserId(
ctx.user.id,
ctx.session.activeOrganizationId,
);
- await checkProjectAccess(
- ctx.user.id,
- "access",
- ctx.session.activeOrganizationId,
- input.projectId,
- );
+ if (!accessedProjects.includes(input.projectId)) {
+ throw new TRPCError({
+ code: "UNAUTHORIZED",
+ message: "You don't have access to this project",
+ });
+ }
const project = await db.query.projects.findFirst({
where: and(
@@ -190,15 +188,14 @@ export const projectRouter = createTRPCRouter({
return project;
}),
all: protectedProcedure.query(async ({ ctx }) => {
- if (ctx.user.role === "member") {
+ if (ctx.user.role !== "owner" && ctx.user.role !== "admin") {
const { accessedProjects, accessedEnvironments, accessedServices } =
- await findMemberById(ctx.user.id, ctx.session.activeOrganizationId);
+ await findMemberByUserId(ctx.user.id, ctx.session.activeOrganizationId);
if (accessedProjects.length === 0) {
return [];
}
- // Build environment filter
const environmentFilter =
accessedEnvironments.length === 0
? sql`false`
@@ -224,31 +221,69 @@ export const projectRouter = createTRPCRouter({
applications.applicationId,
accessedServices,
),
- with: { domains: true },
+ columns: {
+ applicationId: true,
+ name: true,
+ applicationStatus: true,
+ },
},
mariadb: {
where: buildServiceFilter(mariadb.mariadbId, accessedServices),
+ columns: {
+ mariadbId: true,
+ name: true,
+ applicationStatus: true,
+ },
},
mongo: {
where: buildServiceFilter(mongo.mongoId, accessedServices),
+ columns: {
+ mongoId: true,
+ name: true,
+ applicationStatus: true,
+ },
},
mysql: {
where: buildServiceFilter(mysql.mysqlId, accessedServices),
+ columns: {
+ mysqlId: true,
+ name: true,
+ applicationStatus: true,
+ },
},
postgres: {
where: buildServiceFilter(
postgres.postgresId,
accessedServices,
),
+ columns: {
+ postgresId: true,
+ name: true,
+ applicationStatus: true,
+ },
},
redis: {
where: buildServiceFilter(redis.redisId, accessedServices),
+ columns: {
+ redisId: true,
+ name: true,
+ applicationStatus: true,
+ },
},
compose: {
where: buildServiceFilter(compose.composeId, accessedServices),
- with: { domains: true },
+ columns: {
+ composeId: true,
+ name: true,
+ composeStatus: true,
+ },
},
},
+ columns: {
+ environmentId: true,
+ isDefault: true,
+ name: true,
+ },
},
projectTags: {
with: {
@@ -265,21 +300,50 @@ export const projectRouter = createTRPCRouter({
environments: {
with: {
applications: {
- with: {
- domains: true,
+ columns: {
+ applicationId: true,
+ name: true,
+ applicationStatus: true,
+ },
+ },
+ mariadb: {
+ columns: {
+ mariadbId: true,
+ },
+ },
+ mongo: {
+ columns: {
+ mongoId: true,
+ },
+ },
+ mysql: {
+ columns: {
+ mysqlId: true,
+ },
+ },
+ postgres: {
+ columns: {
+ postgresId: true,
+ },
+ },
+ redis: {
+ columns: {
+ redisId: true,
},
},
- mariadb: true,
- mongo: true,
- mysql: true,
- postgres: true,
- redis: true,
compose: {
- with: {
- domains: true,
+ columns: {
+ composeId: true,
+ name: true,
+ composeStatus: true,
},
},
},
+ columns: {
+ name: true,
+ environmentId: true,
+ isDefault: true,
+ },
},
projectTags: {
with: {
@@ -292,17 +356,188 @@ export const projectRouter = createTRPCRouter({
});
}),
+ allForPermissions: withPermission("member", "update").query(
+ async ({ ctx }) => {
+ return await db.query.projects.findMany({
+ where: eq(projects.organizationId, ctx.session.activeOrganizationId),
+ orderBy: desc(projects.createdAt),
+ columns: {
+ projectId: true,
+ name: true,
+ },
+ with: {
+ environments: {
+ columns: {
+ environmentId: true,
+ name: true,
+ isDefault: true,
+ },
+ with: {
+ applications: {
+ columns: {
+ applicationId: true,
+ appName: true,
+ name: true,
+ createdAt: true,
+ applicationStatus: true,
+ description: true,
+ serverId: true,
+ },
+ },
+ mariadb: {
+ columns: {
+ mariadbId: true,
+ appName: true,
+ name: true,
+ createdAt: true,
+ applicationStatus: true,
+ description: true,
+ serverId: true,
+ },
+ },
+ postgres: {
+ columns: {
+ postgresId: true,
+ appName: true,
+ name: true,
+ createdAt: true,
+ applicationStatus: true,
+ description: true,
+ serverId: true,
+ },
+ },
+ mysql: {
+ columns: {
+ mysqlId: true,
+ appName: true,
+ name: true,
+ createdAt: true,
+ applicationStatus: true,
+ description: true,
+ serverId: true,
+ },
+ },
+ mongo: {
+ columns: {
+ mongoId: true,
+ appName: true,
+ name: true,
+ createdAt: true,
+ applicationStatus: true,
+ description: true,
+ serverId: true,
+ },
+ },
+ redis: {
+ columns: {
+ redisId: true,
+ appName: true,
+ name: true,
+ createdAt: true,
+ applicationStatus: true,
+ description: true,
+ serverId: true,
+ },
+ },
+ compose: {
+ columns: {
+ composeId: true,
+ appName: true,
+ name: true,
+ createdAt: true,
+ composeStatus: true,
+ description: true,
+ serverId: true,
+ },
+ },
+ },
+ },
+ },
+ });
+ },
+ ),
+
+ search: protectedProcedure
+ .input(
+ z.object({
+ q: z.string().optional(),
+ name: z.string().optional(),
+ description: z.string().optional(),
+ limit: z.number().min(1).max(100).default(20),
+ offset: z.number().min(0).default(0),
+ }),
+ )
+ .query(async ({ ctx, input }) => {
+ const baseConditions = [
+ eq(projects.organizationId, ctx.session.activeOrganizationId),
+ ];
+
+ if (input.q?.trim()) {
+ const term = `%${input.q.trim()}%`;
+ baseConditions.push(
+ or(
+ ilike(projects.name, term),
+ ilike(projects.description ?? "", term),
+ )!,
+ );
+ }
+
+ if (input.name?.trim()) {
+ baseConditions.push(ilike(projects.name, `%${input.name.trim()}%`));
+ }
+ if (input.description?.trim()) {
+ baseConditions.push(
+ ilike(projects.description ?? "", `%${input.description.trim()}%`),
+ );
+ }
+
+ if (ctx.user.role !== "owner" && ctx.user.role !== "admin") {
+ const { accessedProjects } = await findMemberByUserId(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
+ if (accessedProjects.length === 0) return { items: [], total: 0 };
+ baseConditions.push(
+ sql`${projects.projectId} IN (${sql.join(
+ accessedProjects.map((id) => sql`${id}`),
+ sql`, `,
+ )})`,
+ );
+ }
+
+ const where = and(...baseConditions);
+
+ const [items, countResult] = await Promise.all([
+ db.query.projects.findMany({
+ where,
+ limit: input.limit,
+ offset: input.offset,
+ orderBy: desc(projects.createdAt),
+ columns: {
+ projectId: true,
+ name: true,
+ description: true,
+ createdAt: true,
+ organizationId: true,
+ env: true,
+ },
+ }),
+ db
+ .select({ count: sql`count(*)::int` })
+ .from(projects)
+ .where(where),
+ ]);
+
+ return {
+ items,
+ total: countResult[0]?.count ?? 0,
+ };
+ }),
+
remove: protectedProcedure
.input(apiRemoveProject)
.mutation(async ({ input, ctx }) => {
try {
- if (ctx.user.role === "member") {
- await checkProjectAccess(
- ctx.user.id,
- "delete",
- ctx.session.activeOrganizationId,
- );
- }
const currentProject = await findProjectById(input.projectId);
if (
currentProject.organizationId !== ctx.session.activeOrganizationId
@@ -312,8 +547,15 @@ export const projectRouter = createTRPCRouter({
message: "You are not authorized to delete this project",
});
}
+ await checkProjectAccess(ctx, "delete", input.projectId);
const deletedProject = await deleteProject(input.projectId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "project",
+ resourceId: currentProject.projectId,
+ resourceName: currentProject.name,
+ });
return deletedProject;
} catch (error) {
throw error;
@@ -332,10 +574,36 @@ export const projectRouter = createTRPCRouter({
message: "You are not authorized to update this project",
});
}
+
+ if (ctx.user.role !== "owner" && ctx.user.role !== "admin") {
+ const { accessedProjects } = await findMemberByUserId(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
+ if (!accessedProjects.includes(input.projectId)) {
+ throw new TRPCError({
+ code: "UNAUTHORIZED",
+ message: "You don't have access to this project",
+ });
+ }
+ }
+
+ if (input.env !== undefined) {
+ await checkPermission(ctx, { projectEnvVars: ["write"] });
+ }
+
const project = await updateProjectById(input.projectId, {
...input,
});
+ if (project) {
+ await audit(ctx, {
+ action: "update",
+ resourceType: "project",
+ resourceId: input.projectId,
+ resourceName: project.name,
+ });
+ }
return project;
} catch (error) {
throw error;
@@ -369,15 +637,8 @@ export const projectRouter = createTRPCRouter({
)
.mutation(async ({ ctx, input }) => {
try {
- if (ctx.user.role === "member") {
- await checkProjectAccess(
- ctx.user.id,
- "create",
- ctx.session.activeOrganizationId,
- );
- }
+ await checkProjectAccess(ctx, "create");
- // Get source project
const sourceEnvironment = input.duplicateInSameProject
? await findEnvironmentById(input.sourceEnvironmentId)
: null;
@@ -393,7 +654,24 @@ export const projectRouter = createTRPCRouter({
});
}
- // Create new project or use existing one
+ if (
+ input.duplicateInSameProject &&
+ sourceEnvironment &&
+ ctx.user.role !== "owner" &&
+ ctx.user.role !== "admin"
+ ) {
+ const { accessedProjects } = await findMemberByUserId(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
+ if (!accessedProjects.includes(sourceEnvironment.project.projectId)) {
+ throw new TRPCError({
+ code: "UNAUTHORIZED",
+ message: "You don't have access to this project",
+ });
+ }
+ }
+
const targetProject = input.duplicateInSameProject
? sourceEnvironment
: await createProject(
@@ -410,7 +688,6 @@ export const projectRouter = createTRPCRouter({
if (input.includeServices) {
const servicesToDuplicate = input.selectedServices || [];
- // Helper function to duplicate a service
const duplicateService = async (id: string, type: string) => {
switch (type) {
case "application": {
@@ -488,6 +765,7 @@ export const projectRouter = createTRPCRouter({
await createPreviewDeployment({
...rest,
applicationId: newApplication.applicationId,
+ domainId: undefined,
});
}
@@ -713,20 +991,22 @@ export const projectRouter = createTRPCRouter({
}
};
- // Duplicate selected services
for (const service of servicesToDuplicate) {
await duplicateService(service.id, service.type);
}
}
- if (!input.duplicateInSameProject && ctx.user.role === "member") {
- await addNewProject(
- ctx.user.id,
- targetProject?.projectId || "",
- ctx.session.activeOrganizationId,
- );
+ if (!input.duplicateInSameProject) {
+ await addNewProject(ctx, targetProject?.projectId || "");
}
+ await audit(ctx, {
+ action: "create",
+ resourceType: "project",
+ resourceId: targetProject?.projectId || "",
+ resourceName: input.name,
+ metadata: { duplicatedFrom: input.sourceEnvironmentId },
+ });
return targetProject;
} catch (error) {
throw new TRPCError({
diff --git a/apps/dokploy/server/api/routers/proprietary/audit-log.ts b/apps/dokploy/server/api/routers/proprietary/audit-log.ts
new file mode 100644
index 000000000..3ff814f1c
--- /dev/null
+++ b/apps/dokploy/server/api/routers/proprietary/audit-log.ts
@@ -0,0 +1,67 @@
+import { getAuditLogs } from "@dokploy/server/services/proprietary/audit-log";
+import { hasValidLicense } from "@dokploy/server/services/proprietary/license-key";
+import { TRPCError } from "@trpc/server";
+import { z } from "zod";
+import { createTRPCRouter, withPermission } from "../../trpc";
+
+export const auditLogRouter = createTRPCRouter({
+ all: withPermission("auditLog", "read")
+ .use(async ({ ctx, next }) => {
+ const licensed = await hasValidLicense(ctx.session.activeOrganizationId);
+ if (!licensed) {
+ throw new TRPCError({
+ code: "FORBIDDEN",
+ message: "Valid enterprise license required",
+ });
+ }
+ return next();
+ })
+ .input(
+ z.object({
+ userId: z.string().optional(),
+ userEmail: z.string().optional(),
+ resourceName: z.string().optional(),
+ action: z
+ .enum([
+ "create",
+ "update",
+ "delete",
+ "deploy",
+ "cancel",
+ "redeploy",
+ "login",
+ "logout",
+ ])
+ .optional(),
+ resourceType: z
+ .enum([
+ "project",
+ "service",
+ "environment",
+ "deployment",
+ "user",
+ "customRole",
+ "domain",
+ "certificate",
+ "registry",
+ "server",
+ "sshKey",
+ "gitProvider",
+ "notification",
+ "settings",
+ "session",
+ ])
+ .optional(),
+ from: z.date().optional(),
+ to: z.date().optional(),
+ limit: z.number().min(1).max(500).default(50),
+ offset: z.number().min(0).default(0),
+ }),
+ )
+ .query(async ({ ctx, input }) => {
+ return getAuditLogs({
+ organizationId: ctx.session.activeOrganizationId,
+ ...input,
+ });
+ }),
+});
diff --git a/apps/dokploy/server/api/routers/proprietary/custom-role.ts b/apps/dokploy/server/api/routers/proprietary/custom-role.ts
new file mode 100644
index 000000000..ed97a25c0
--- /dev/null
+++ b/apps/dokploy/server/api/routers/proprietary/custom-role.ts
@@ -0,0 +1,321 @@
+import { db } from "@dokploy/server/db";
+import { member, organizationRole, user } from "@dokploy/server/db/schema";
+import { statements } from "@dokploy/server/lib/access-control";
+import { TRPCError } from "@trpc/server";
+import { and, count, eq } from "drizzle-orm";
+import { z } from "zod";
+import {
+ createTRPCRouter,
+ enterpriseProcedure,
+ protectedProcedure,
+} from "../../trpc";
+import { audit } from "../../utils/audit";
+
+const permissionsSchema = z.record(z.string(), z.array(z.string()));
+
+export const customRoleRouter = createTRPCRouter({
+ all: protectedProcedure.query(async ({ ctx }) => {
+ const [roles, memberCounts] = await Promise.all([
+ db.query.organizationRole.findMany({
+ where: eq(
+ organizationRole.organizationId,
+ ctx.session.activeOrganizationId,
+ ),
+ }),
+ db
+ .select({ role: member.role, count: count() })
+ .from(member)
+ .where(eq(member.organizationId, ctx.session.activeOrganizationId))
+ .groupBy(member.role),
+ ]);
+
+ const memberCountByRole = new Map(
+ memberCounts.map((r) => [r.role, r.count]),
+ );
+
+ const roleMap = new Map<
+ string,
+ {
+ role: string;
+ permissions: Record;
+ createdAt: Date;
+ ids: string[];
+ memberCount: number;
+ }
+ >();
+
+ for (const entry of roles) {
+ const existing = roleMap.get(entry.role);
+ const parsed = JSON.parse(entry.permission) as Record;
+
+ if (existing) {
+ for (const [resource, actions] of Object.entries(parsed)) {
+ existing.permissions[resource] = [
+ ...new Set([...(existing.permissions[resource] ?? []), ...actions]),
+ ];
+ }
+ existing.ids.push(entry.id);
+ } else {
+ roleMap.set(entry.role, {
+ role: entry.role,
+ permissions: parsed,
+ createdAt: entry.createdAt,
+ ids: [entry.id],
+ memberCount: memberCountByRole.get(entry.role) ?? 0,
+ });
+ }
+ }
+
+ return Array.from(roleMap.values());
+ }),
+
+ create: enterpriseProcedure
+ .input(
+ z.object({
+ roleName: z
+ .string()
+ .min(1)
+ .max(50)
+ .refine(
+ (name) => !["owner", "admin", "member"].includes(name),
+ "Cannot use reserved role names (owner, admin, member)",
+ ),
+ permissions: permissionsSchema,
+ }),
+ )
+ .mutation(async ({ input, ctx }) => {
+ const existingRoles = await db.query.organizationRole.findMany({
+ where: eq(
+ organizationRole.organizationId,
+ ctx.session.activeOrganizationId,
+ ),
+ });
+
+ const uniqueRoleNames = new Set(existingRoles.map((r) => r.role));
+
+ if (uniqueRoleNames.size >= 10) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "Maximum of 10 custom roles per organization reached",
+ });
+ }
+
+ if (uniqueRoleNames.has(input.roleName)) {
+ throw new TRPCError({
+ code: "CONFLICT",
+ message: `Role "${input.roleName}" already exists`,
+ });
+ }
+
+ validatePermissions(input.permissions);
+
+ const [created] = await db
+ .insert(organizationRole)
+ .values({
+ organizationId: ctx.session.activeOrganizationId,
+ role: input.roleName,
+ permission: JSON.stringify(input.permissions),
+ })
+ .returning();
+
+ await audit(ctx, {
+ action: "create",
+ resourceType: "customRole",
+ resourceName: input.roleName,
+ });
+ return created;
+ }),
+
+ update: enterpriseProcedure
+ .input(
+ z.object({
+ roleName: z.string().min(1),
+ newRoleName: z
+ .string()
+ .min(1)
+ .max(50)
+ .refine(
+ (name) => !["owner", "admin", "member"].includes(name),
+ "Cannot use reserved role names (owner, admin, member)",
+ )
+ .optional(),
+ permissions: permissionsSchema,
+ }),
+ )
+ .mutation(async ({ input, ctx }) => {
+ if (["owner", "admin", "member"].includes(input.roleName)) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "Cannot modify built-in roles",
+ });
+ }
+
+ const effectiveRoleName = input.newRoleName ?? input.roleName;
+
+ if (input.newRoleName && input.newRoleName !== input.roleName) {
+ const existing = await db.query.organizationRole.findFirst({
+ where: and(
+ eq(
+ organizationRole.organizationId,
+ ctx.session.activeOrganizationId,
+ ),
+ eq(organizationRole.role, input.newRoleName),
+ ),
+ });
+ if (existing) {
+ throw new TRPCError({
+ code: "CONFLICT",
+ message: `Role "${input.newRoleName}" already exists`,
+ });
+ }
+
+ await db
+ .update(member)
+ .set({ role: input.newRoleName })
+ .where(
+ and(
+ eq(member.organizationId, ctx.session.activeOrganizationId),
+ eq(member.role, input.roleName),
+ ),
+ );
+ }
+
+ validatePermissions(input.permissions);
+
+ const [updated] = await db
+ .update(organizationRole)
+ .set({
+ role: effectiveRoleName,
+ permission: JSON.stringify(input.permissions),
+ })
+ .where(
+ and(
+ eq(
+ organizationRole.organizationId,
+ ctx.session.activeOrganizationId,
+ ),
+ eq(organizationRole.role, input.roleName),
+ ),
+ )
+ .returning();
+
+ await audit(ctx, {
+ action: "update",
+ resourceType: "customRole",
+ resourceName: effectiveRoleName,
+ });
+ return updated;
+ }),
+
+ remove: enterpriseProcedure
+ .input(
+ z.object({
+ roleName: z.string().min(1),
+ }),
+ )
+ .mutation(async ({ input, ctx }) => {
+ if (["owner", "admin", "member"].includes(input.roleName)) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "Cannot delete built-in roles",
+ });
+ }
+
+ const assignedMembers = await db.query.member.findMany({
+ where: and(
+ eq(member.organizationId, ctx.session.activeOrganizationId),
+ eq(member.role, input.roleName),
+ ),
+ });
+
+ if (assignedMembers.length > 0) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: `Cannot delete role "${input.roleName}": ${assignedMembers.length} member(s) are currently assigned to it. Reassign them first.`,
+ });
+ }
+
+ const deleted = await db
+ .delete(organizationRole)
+ .where(
+ and(
+ eq(
+ organizationRole.organizationId,
+ ctx.session.activeOrganizationId,
+ ),
+ eq(organizationRole.role, input.roleName),
+ ),
+ )
+ .returning();
+
+ if (deleted.length === 0) {
+ throw new TRPCError({
+ code: "NOT_FOUND",
+ message: `Role "${input.roleName}" not found`,
+ });
+ }
+
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "customRole",
+ resourceName: input.roleName,
+ });
+ return { deleted: deleted.length };
+ }),
+
+ membersByRole: protectedProcedure
+ .input(z.object({ roleName: z.string().min(1) }))
+ .query(async ({ input, ctx }) => {
+ const members = await db
+ .select({
+ id: member.id,
+ userId: member.userId,
+ email: user.email,
+ firstName: user.firstName,
+ lastName: user.lastName,
+ })
+ .from(member)
+ .innerJoin(user, eq(member.userId, user.id))
+ .where(
+ and(
+ eq(member.organizationId, ctx.session.activeOrganizationId),
+ eq(member.role, input.roleName),
+ ),
+ );
+ return members;
+ }),
+
+ getStatements: protectedProcedure.query(() => {
+ return statements;
+ }),
+});
+
+const INTERNAL_RESOURCES = ["organization", "invitation", "team", "ac"];
+
+function validatePermissions(permissions: Record) {
+ for (const [resource, actions] of Object.entries(permissions)) {
+ if (INTERNAL_RESOURCES.includes(resource)) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: `Resource "${resource}" is managed internally and cannot be assigned to custom roles`,
+ });
+ }
+
+ if (!(resource in statements)) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: `Unknown resource: ${resource}`,
+ });
+ }
+
+ const validActions = statements[resource as keyof typeof statements];
+ for (const action of actions) {
+ if (!validActions.includes(action as never)) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: `Invalid action "${action}" for resource "${resource}". Valid actions: ${validActions.join(", ")}`,
+ });
+ }
+ }
+ }
+}
diff --git a/apps/dokploy/server/api/routers/proprietary/license-key.ts b/apps/dokploy/server/api/routers/proprietary/license-key.ts
index ec7ad55c8..2b2154f9b 100644
--- a/apps/dokploy/server/api/routers/proprietary/license-key.ts
+++ b/apps/dokploy/server/api/routers/proprietary/license-key.ts
@@ -1,10 +1,14 @@
+import { db } from "@dokploy/server/db";
import { user } from "@dokploy/server/db/schema";
-import { validateLicenseKey } from "@dokploy/server/index";
+import { hasValidLicense, validateLicenseKey } from "@dokploy/server/index";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
import { z } from "zod";
-import { adminProcedure, createTRPCRouter } from "@/server/api/trpc";
-import { db } from "@/server/db";
+import {
+ adminProcedure,
+ createTRPCRouter,
+ protectedProcedure,
+} from "@/server/api/trpc";
import {
activateLicenseKey,
deactivateLicenseKey,
@@ -183,19 +187,8 @@ export const licenseKeyRouter = createTRPCRouter({
licenseKey: currentUser.licenseKey ?? "",
};
}),
- haveValidLicenseKey: adminProcedure.query(async ({ ctx }) => {
- const currentUserId = ctx.user.id;
- const currentUser = await db.query.user.findFirst({
- where: eq(user.id, currentUserId),
- columns: {
- enableEnterpriseFeatures: true,
- isValidEnterpriseLicense: true,
- },
- });
- return !!(
- currentUser?.enableEnterpriseFeatures &&
- currentUser?.isValidEnterpriseLicense
- );
+ haveValidLicenseKey: protectedProcedure.query(async ({ ctx }) => {
+ return await hasValidLicense(ctx.session.activeOrganizationId);
}),
updateEnterpriseSettings: adminProcedure
.input(
diff --git a/apps/dokploy/server/api/routers/proprietary/sso.ts b/apps/dokploy/server/api/routers/proprietary/sso.ts
index d59b2c974..ac0b5f1c6 100644
--- a/apps/dokploy/server/api/routers/proprietary/sso.ts
+++ b/apps/dokploy/server/api/routers/proprietary/sso.ts
@@ -1,8 +1,12 @@
import { normalizeTrustedOrigin } from "@dokploy/server";
import { IS_CLOUD } from "@dokploy/server/constants";
+import { db } from "@dokploy/server/db";
import { member, ssoProvider, user } from "@dokploy/server/db/schema";
import { ssoProviderBodySchema } from "@dokploy/server/db/schema/sso";
-import { requestToHeaders } from "@dokploy/server/index";
+import {
+ getOrganizationOwnerId,
+ requestToHeaders,
+} from "@dokploy/server/index";
import { auth } from "@dokploy/server/lib/auth";
import { TRPCError } from "@trpc/server";
import { and, asc, eq } from "drizzle-orm";
@@ -12,7 +16,6 @@ import {
enterpriseProcedure,
publicProcedure,
} from "@/server/api/trpc";
-import { db } from "@/server/db";
export const ssoRouter = createTRPCRouter({
showSignInWithSSO: publicProcedure.query(async () => {
@@ -59,6 +62,17 @@ export const ssoRouter = createTRPCRouter({
});
return providers;
}),
+ getTrustedOrigins: enterpriseProcedure.query(async ({ ctx }) => {
+ const ownerId = await getOrganizationOwnerId(
+ ctx.session.activeOrganizationId,
+ );
+ if (!ownerId) return [];
+ const ownerUser = await db.query.user.findFirst({
+ where: eq(user.id, ownerId),
+ columns: { trustedOrigins: true },
+ });
+ return ownerUser?.trustedOrigins ?? [];
+ }),
one: enterpriseProcedure
.input(z.object({ providerId: z.string().min(1) }))
.query(async ({ ctx, input }) => {
@@ -135,11 +149,20 @@ export const ssoRouter = createTRPCRouter({
normalizeTrustedOrigin(existing.issuer) !==
normalizeTrustedOrigin(input.issuer);
if (issuerChanged) {
- const currentUser = await db.query.user.findFirst({
- where: eq(user.id, ctx.session.userId),
+ const ownerId = await getOrganizationOwnerId(
+ ctx.session.activeOrganizationId,
+ );
+ if (!ownerId) {
+ throw new TRPCError({
+ code: "INTERNAL_SERVER_ERROR",
+ message: "Organization owner not found",
+ });
+ }
+ const ownerUser = await db.query.user.findFirst({
+ where: eq(user.id, ownerId),
columns: { trustedOrigins: true },
});
- const trustedOrigins = currentUser?.trustedOrigins ?? [];
+ const trustedOrigins = ownerUser?.trustedOrigins ?? [];
const newOrigin = normalizeTrustedOrigin(input.issuer);
const isInTrustedOrigins = trustedOrigins.some(
(o) => o.toLowerCase() === newOrigin.toLowerCase(),
@@ -148,13 +171,14 @@ export const ssoRouter = createTRPCRouter({
throw new TRPCError({
code: "BAD_REQUEST",
message:
- "The new Issuer URL is not in your trusted origins list. Please add it in Manage origins before saving.",
+ "The new Issuer URL is not in the organization's trusted origins list. Please add it in Manage origins before saving.",
});
}
}
const domain = input.domains.join(",");
const updateBody: {
+ providerId: string;
issuer: string;
domain: string;
oidcConfig?: (typeof input)["oidcConfig"];
@@ -162,6 +186,7 @@ export const ssoRouter = createTRPCRouter({
} = {
issuer: input.issuer,
domain,
+ providerId: input.providerId,
};
if (input.oidcConfig != null) {
updateBody.oidcConfig = input.oidcConfig;
@@ -262,12 +287,21 @@ export const ssoRouter = createTRPCRouter({
addTrustedOrigin: enterpriseProcedure
.input(z.object({ origin: z.string().min(1) }))
.mutation(async ({ ctx, input }) => {
+ const ownerId = await getOrganizationOwnerId(
+ ctx.session.activeOrganizationId,
+ );
+ if (!ownerId) {
+ throw new TRPCError({
+ code: "INTERNAL_SERVER_ERROR",
+ message: "Organization owner not found",
+ });
+ }
const normalized = normalizeTrustedOrigin(input.origin);
- const currentUser = await db.query.user.findFirst({
- where: eq(user.id, ctx.session.userId),
+ const ownerUser = await db.query.user.findFirst({
+ where: eq(user.id, ownerId),
columns: { trustedOrigins: true },
});
- const existing = currentUser?.trustedOrigins || [];
+ const existing = ownerUser?.trustedOrigins || [];
if (existing.some((o) => o.toLowerCase() === normalized.toLowerCase())) {
return { success: true };
}
@@ -275,25 +309,34 @@ export const ssoRouter = createTRPCRouter({
await db
.update(user)
.set({ trustedOrigins: next })
- .where(eq(user.id, ctx.session.userId));
+ .where(eq(user.id, ownerId));
return { success: true };
}),
removeTrustedOrigin: enterpriseProcedure
.input(z.object({ origin: z.string().min(1) }))
.mutation(async ({ ctx, input }) => {
+ const ownerId = await getOrganizationOwnerId(
+ ctx.session.activeOrganizationId,
+ );
+ if (!ownerId) {
+ throw new TRPCError({
+ code: "INTERNAL_SERVER_ERROR",
+ message: "Organization owner not found",
+ });
+ }
const normalized = normalizeTrustedOrigin(input.origin);
- const currentUser = await db.query.user.findFirst({
- where: eq(user.id, ctx.session.userId),
+ const ownerUser = await db.query.user.findFirst({
+ where: eq(user.id, ownerId),
columns: { trustedOrigins: true },
});
- const existing = currentUser?.trustedOrigins || [];
+ const existing = ownerUser?.trustedOrigins || [];
const next = existing.filter(
(o) => o.toLowerCase() !== normalized.toLowerCase(),
);
await db
.update(user)
.set({ trustedOrigins: next })
- .where(eq(user.id, ctx.session.userId));
+ .where(eq(user.id, ownerId));
return { success: true };
}),
updateTrustedOrigin: enterpriseProcedure
@@ -304,20 +347,29 @@ export const ssoRouter = createTRPCRouter({
}),
)
.mutation(async ({ ctx, input }) => {
+ const ownerId = await getOrganizationOwnerId(
+ ctx.session.activeOrganizationId,
+ );
+ if (!ownerId) {
+ throw new TRPCError({
+ code: "INTERNAL_SERVER_ERROR",
+ message: "Organization owner not found",
+ });
+ }
const oldNorm = normalizeTrustedOrigin(input.oldOrigin);
const newNorm = normalizeTrustedOrigin(input.newOrigin);
- const currentUser = await db.query.user.findFirst({
- where: eq(user.id, ctx.session.userId),
+ const ownerUser = await db.query.user.findFirst({
+ where: eq(user.id, ownerId),
columns: { trustedOrigins: true },
});
- const existing = currentUser?.trustedOrigins || [];
+ const existing = ownerUser?.trustedOrigins || [];
const next = existing.map((o) =>
o.toLowerCase() === oldNorm.toLowerCase() ? newNorm : o,
);
await db
.update(user)
.set({ trustedOrigins: next })
- .where(eq(user.id, ctx.session.userId));
+ .where(eq(user.id, ownerId));
return { success: true };
}),
});
diff --git a/apps/dokploy/server/api/routers/proprietary/whitelabeling.ts b/apps/dokploy/server/api/routers/proprietary/whitelabeling.ts
new file mode 100644
index 000000000..b504ed0f5
--- /dev/null
+++ b/apps/dokploy/server/api/routers/proprietary/whitelabeling.ts
@@ -0,0 +1,106 @@
+import {
+ getWebServerSettings,
+ IS_CLOUD,
+ updateWebServerSettings,
+} from "@dokploy/server";
+import { TRPCError } from "@trpc/server";
+import { apiUpdateWhitelabeling } from "@/server/db/schema";
+import {
+ createTRPCRouter,
+ enterpriseProcedure,
+ protectedProcedure,
+ publicProcedure,
+} from "../../trpc";
+
+export const whitelabelingRouter = createTRPCRouter({
+ get: protectedProcedure.query(async () => {
+ if (IS_CLOUD) {
+ return null;
+ }
+ const settings = await getWebServerSettings();
+ return settings?.whitelabelingConfig ?? null;
+ }),
+
+ update: enterpriseProcedure
+ .input(apiUpdateWhitelabeling)
+ .mutation(async ({ input, ctx }) => {
+ if (IS_CLOUD) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "Whitelabeling is not available in Cloud",
+ });
+ }
+
+ if (ctx.user.role !== "owner") {
+ throw new TRPCError({
+ code: "FORBIDDEN",
+ message: "Only the owner can update whitelabeling settings",
+ });
+ }
+
+ await updateWebServerSettings({
+ whitelabelingConfig: input.whitelabelingConfig,
+ });
+
+ return { success: true };
+ }),
+
+ reset: enterpriseProcedure.mutation(async ({ ctx }) => {
+ if (IS_CLOUD) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "Whitelabeling is not available in Cloud",
+ });
+ }
+
+ if (ctx.user.role !== "owner") {
+ throw new TRPCError({
+ code: "FORBIDDEN",
+ message: "Only the owner can reset whitelabeling settings",
+ });
+ }
+
+ await updateWebServerSettings({
+ whitelabelingConfig: {
+ appName: null,
+ appDescription: null,
+ logoUrl: null,
+ faviconUrl: null,
+ customCss: null,
+ loginLogoUrl: null,
+ supportUrl: null,
+ docsUrl: null,
+ errorPageTitle: null,
+ errorPageDescription: null,
+ metaTitle: null,
+ footerText: null,
+ },
+ });
+
+ return { success: true };
+ }),
+
+ // Public endpoint only for unauthenticated pages (login, register, error)
+ // Returns only the fields needed for public pages
+ getPublic: publicProcedure.query(async () => {
+ if (IS_CLOUD) {
+ return null;
+ }
+ const settings = await getWebServerSettings();
+ const config = settings?.whitelabelingConfig;
+ if (!config) return null;
+
+ return {
+ appName: config.appName,
+ appDescription: config.appDescription,
+ logoUrl: config.logoUrl,
+ loginLogoUrl: config.loginLogoUrl,
+ faviconUrl: config.faviconUrl,
+ customCss: config.customCss,
+ metaTitle: config.metaTitle,
+ errorPageTitle: config.errorPageTitle,
+ errorPageDescription: config.errorPageDescription,
+ footerText: config.footerText,
+ };
+ }),
+});
diff --git a/apps/dokploy/server/api/routers/redirects.ts b/apps/dokploy/server/api/routers/redirects.ts
index f8b7014f2..4b95d4fe5 100644
--- a/apps/dokploy/server/api/routers/redirects.ts
+++ b/apps/dokploy/server/api/routers/redirects.ts
@@ -1,80 +1,74 @@
import {
createRedirect,
- findApplicationById,
findRedirectById,
removeRedirectById,
updateRedirectById,
} from "@dokploy/server";
-import { TRPCError } from "@trpc/server";
+import { checkServicePermissionAndAccess } from "@dokploy/server/services/permission";
+import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
+import { audit } from "@/server/api/utils/audit";
import {
apiCreateRedirect,
apiFindOneRedirect,
apiUpdateRedirect,
} from "@/server/db/schema";
-import { createTRPCRouter, protectedProcedure } from "../trpc";
export const redirectsRouter = createTRPCRouter({
create: protectedProcedure
.input(apiCreateRedirect)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
- return await createRedirect(input);
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
+ await createRedirect(input);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "redirect",
+ resourceId: input.applicationId,
+ resourceName: input.regex,
+ });
+ return true;
}),
+
one: protectedProcedure
.input(apiFindOneRedirect)
.query(async ({ input, ctx }) => {
const redirect = await findRedirectById(input.redirectId);
- const application = await findApplicationById(redirect.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
- return findRedirectById(input.redirectId);
+ await checkServicePermissionAndAccess(ctx, redirect.applicationId, {
+ service: ["read"],
+ });
+ return redirect;
}),
+
delete: protectedProcedure
.input(apiFindOneRedirect)
.mutation(async ({ input, ctx }) => {
const redirect = await findRedirectById(input.redirectId);
- const application = await findApplicationById(redirect.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
- return removeRedirectById(input.redirectId);
+ await checkServicePermissionAndAccess(ctx, redirect.applicationId, {
+ service: ["delete"],
+ });
+ const result = await removeRedirectById(input.redirectId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "redirect",
+ resourceId: input.redirectId,
+ });
+ return result;
}),
+
update: protectedProcedure
.input(apiUpdateRedirect)
.mutation(async ({ input, ctx }) => {
const redirect = await findRedirectById(input.redirectId);
- const application = await findApplicationById(redirect.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
- return updateRedirectById(input.redirectId, input);
+ await checkServicePermissionAndAccess(ctx, redirect.applicationId, {
+ service: ["create"],
+ });
+ const result = await updateRedirectById(input.redirectId, input);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "redirect",
+ resourceId: input.redirectId,
+ });
+ return result;
}),
});
diff --git a/apps/dokploy/server/api/routers/redis.ts b/apps/dokploy/server/api/routers/redis.ts
index a5cc7c9aa..01d922aa4 100644
--- a/apps/dokploy/server/api/routers/redis.ts
+++ b/apps/dokploy/server/api/routers/redis.ts
@@ -1,7 +1,5 @@
import {
- addNewService,
checkPortInUse,
- checkServiceAccess,
createMount,
createRedis,
deployRedis,
@@ -18,13 +16,18 @@ import {
stopServiceRemote,
updateRedisById,
} from "@dokploy/server";
-
+import {
+ addNewService,
+ checkServiceAccess,
+ checkServicePermissionAndAccess,
+ findMemberByUserId,
+} from "@dokploy/server/services/permission";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
-import { observable } from "@trpc/server/observable";
-import { eq } from "drizzle-orm";
+import { and, desc, eq, ilike, or, sql } from "drizzle-orm";
import { z } from "zod";
+import { audit } from "@/server/api/utils/audit";
import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
import {
apiChangeRedisStatus,
apiCreateRedis,
@@ -37,23 +40,16 @@ import {
apiUpdateRedis,
redis as redisTable,
} from "@/server/db/schema";
+import { environments, projects } from "@/server/db/schema";
export const redisRouter = createTRPCRouter({
create: protectedProcedure
.input(apiCreateRedis)
.mutation(async ({ input, ctx }) => {
try {
- // Get project from environment
const environment = await findEnvironmentById(input.environmentId);
const project = await findProjectById(environment.projectId);
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- project.projectId,
- ctx.session.activeOrganizationId,
- "create",
- );
- }
+ await checkServiceAccess(ctx, project.projectId, "create");
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
@@ -71,13 +67,7 @@ export const redisRouter = createTRPCRouter({
const newRedis = await createRedis({
...input,
});
- if (ctx.user.role === "member") {
- await addNewService(
- ctx.user.id,
- newRedis.redisId,
- project.organizationId,
- );
- }
+ await addNewService(ctx, newRedis.redisId);
await createMount({
serviceId: newRedis.redisId,
@@ -87,6 +77,12 @@ export const redisRouter = createTRPCRouter({
type: "volume",
});
+ await audit(ctx, {
+ action: "create",
+ resourceType: "service",
+ resourceId: newRedis.redisId,
+ resourceName: newRedis.appName,
+ });
return newRedis;
} catch (error) {
throw error;
@@ -95,14 +91,7 @@ export const redisRouter = createTRPCRouter({
one: protectedProcedure
.input(apiFindOneRedis)
.query(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.redisId,
- ctx.session.activeOrganizationId,
- "access",
- );
- }
+ await checkServiceAccess(ctx, input.redisId, "read");
const redis = await findRedisById(input.redisId);
if (
@@ -120,16 +109,10 @@ export const redisRouter = createTRPCRouter({
start: protectedProcedure
.input(apiFindOneRedis)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.redisId, {
+ deployment: ["create"],
+ });
const redis = await findRedisById(input.redisId);
- if (
- redis.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to start this Redis",
- });
- }
if (redis.serverId) {
await startServiceRemote(redis.serverId, redis.appName);
@@ -140,21 +123,21 @@ export const redisRouter = createTRPCRouter({
applicationStatus: "done",
});
+ await audit(ctx, {
+ action: "start",
+ resourceType: "service",
+ resourceId: redis.redisId,
+ resourceName: redis.appName,
+ });
return redis;
}),
reload: protectedProcedure
.input(apiResetRedis)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.redisId, {
+ deployment: ["create"],
+ });
const redis = await findRedisById(input.redisId);
- if (
- redis.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to reload this Redis",
- });
- }
if (redis.serverId) {
await stopServiceRemote(redis.serverId, redis.appName);
} else {
@@ -172,22 +155,22 @@ export const redisRouter = createTRPCRouter({
await updateRedisById(input.redisId, {
applicationStatus: "done",
});
+ await audit(ctx, {
+ action: "reload",
+ resourceType: "service",
+ resourceId: redis.redisId,
+ resourceName: redis.appName,
+ });
return true;
}),
stop: protectedProcedure
.input(apiFindOneRedis)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.redisId, {
+ deployment: ["create"],
+ });
const redis = await findRedisById(input.redisId);
- if (
- redis.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to stop this Redis",
- });
- }
if (redis.serverId) {
await stopServiceRemote(redis.serverId, redis.appName);
} else {
@@ -197,21 +180,21 @@ export const redisRouter = createTRPCRouter({
applicationStatus: "idle",
});
+ await audit(ctx, {
+ action: "stop",
+ resourceType: "service",
+ resourceId: redis.redisId,
+ resourceName: redis.appName,
+ });
return redis;
}),
saveExternalPort: protectedProcedure
.input(apiSaveExternalPortRedis)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.redisId, {
+ service: ["create"],
+ });
const redis = await findRedisById(input.redisId);
- if (
- redis.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this external port",
- });
- }
if (input.externalPort) {
const portCheck = await checkPortInUse(
@@ -230,21 +213,27 @@ export const redisRouter = createTRPCRouter({
externalPort: input.externalPort,
});
await deployRedis(input.redisId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: redis.redisId,
+ resourceName: redis.appName,
+ });
return redis;
}),
deploy: protectedProcedure
.input(apiDeployRedis)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.redisId, {
+ deployment: ["create"],
+ });
const redis = await findRedisById(input.redisId);
- if (
- redis.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this Redis",
- });
- }
+ await audit(ctx, {
+ action: "deploy",
+ resourceType: "service",
+ resourceId: redis.redisId,
+ resourceName: redis.appName,
+ });
return deployRedis(input.redisId);
}),
deployWithLogs: protectedProcedure
@@ -257,52 +246,51 @@ export const redisRouter = createTRPCRouter({
},
})
.input(apiDeployRedis)
- .subscription(async ({ input, ctx }) => {
- const redis = await findRedisById(input.redisId);
- if (
- redis.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this Redis",
- });
- }
- return observable((emit) => {
- deployRedis(input.redisId, (log) => {
- emit.next(log);
- });
+ .subscription(async function* ({ input, ctx, signal }) {
+ await checkServicePermissionAndAccess(ctx, input.redisId, {
+ deployment: ["create"],
});
+ const queue: string[] = [];
+ const done = false;
+
+ deployRedis(input.redisId, (log) => {
+ queue.push(log);
+ });
+
+ while (!done || queue.length > 0) {
+ if (queue.length > 0) {
+ yield queue.shift()!;
+ } else {
+ await new Promise((r) => setTimeout(r, 50));
+ }
+
+ if (signal?.aborted) {
+ return;
+ }
+ }
}),
changeStatus: protectedProcedure
.input(apiChangeRedisStatus)
.mutation(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.redisId, {
+ deployment: ["create"],
+ });
const mongo = await findRedisById(input.redisId);
- if (
- mongo.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to change this Redis status",
- });
- }
await updateRedisById(input.redisId, {
applicationStatus: input.applicationStatus,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: mongo.redisId,
+ resourceName: mongo.appName,
+ });
return mongo;
}),
remove: protectedProcedure
.input(apiFindOneRedis)
.mutation(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- await checkServiceAccess(
- ctx.user.id,
- input.redisId,
- ctx.session.activeOrganizationId,
- "delete",
- );
- }
+ await checkServiceAccess(ctx, input.redisId, "delete");
const redis = await findRedisById(input.redisId);
@@ -315,6 +303,12 @@ export const redisRouter = createTRPCRouter({
message: "You are not authorized to delete this Redis",
});
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "service",
+ resourceId: redis.redisId,
+ resourceName: redis.appName,
+ });
const cleanupOperations = [
async () => await removeService(redis?.appName, redis.serverId),
async () => await removeRedisById(input.redisId),
@@ -331,16 +325,9 @@ export const redisRouter = createTRPCRouter({
saveEnvironment: protectedProcedure
.input(apiSaveEnvironmentVariablesRedis)
.mutation(async ({ input, ctx }) => {
- const redis = await findRedisById(input.redisId);
- if (
- redis.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to save this environment",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.redisId, {
+ envVars: ["write"],
+ });
const updatedRedis = await updateRedisById(input.redisId, {
env: input.env,
});
@@ -352,12 +339,20 @@ export const redisRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: input.redisId,
+ });
return true;
}),
update: protectedProcedure
.input(apiUpdateRedis)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
const { redisId, ...rest } = input;
+ await checkServicePermissionAndAccess(ctx, redisId, {
+ service: ["create"],
+ });
const redis = await updateRedisById(redisId, {
...rest,
});
@@ -369,6 +364,12 @@ export const redisRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "service",
+ resourceId: redisId,
+ resourceName: redis.appName,
+ });
return true;
}),
move: protectedProcedure
@@ -379,31 +380,10 @@ export const redisRouter = createTRPCRouter({
}),
)
.mutation(async ({ input, ctx }) => {
- const redis = await findRedisById(input.redisId);
- if (
- redis.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move this redis",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.redisId, {
+ service: ["create"],
+ });
- const targetEnvironment = await findEnvironmentById(
- input.targetEnvironmentId,
- );
- if (
- targetEnvironment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to move to this environment",
- });
- }
-
- // Update the redis's projectId
const updatedRedis = await db
.update(redisTable)
.set({
@@ -420,23 +400,119 @@ export const redisRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "move",
+ resourceType: "service",
+ resourceId: updatedRedis.redisId,
+ resourceName: updatedRedis.appName,
+ });
return updatedRedis;
}),
rebuild: protectedProcedure
.input(apiRebuildRedis)
.mutation(async ({ input, ctx }) => {
- const redis = await findRedisById(input.redisId);
- if (
- redis.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to rebuild this Redis database",
- });
- }
+ await checkServicePermissionAndAccess(ctx, input.redisId, {
+ deployment: ["create"],
+ });
- await rebuildDatabase(redis.redisId, "redis");
+ await rebuildDatabase(input.redisId, "redis");
+ await audit(ctx, {
+ action: "rebuild",
+ resourceType: "service",
+ resourceId: input.redisId,
+ });
return true;
}),
+ search: protectedProcedure
+ .input(
+ z.object({
+ q: z.string().optional(),
+ name: z.string().optional(),
+ appName: z.string().optional(),
+ description: z.string().optional(),
+ projectId: z.string().optional(),
+ environmentId: z.string().optional(),
+ limit: z.number().min(1).max(100).default(20),
+ offset: z.number().min(0).default(0),
+ }),
+ )
+ .query(async ({ ctx, input }) => {
+ const baseConditions = [
+ eq(projects.organizationId, ctx.session.activeOrganizationId),
+ ];
+ if (input.projectId) {
+ baseConditions.push(eq(environments.projectId, input.projectId));
+ }
+ if (input.environmentId) {
+ baseConditions.push(eq(redisTable.environmentId, input.environmentId));
+ }
+ if (input.q?.trim()) {
+ const term = `%${input.q.trim()}%`;
+ baseConditions.push(
+ or(
+ ilike(redisTable.name, term),
+ ilike(redisTable.appName, term),
+ ilike(redisTable.description ?? "", term),
+ )!,
+ );
+ }
+ if (input.name?.trim()) {
+ baseConditions.push(ilike(redisTable.name, `%${input.name.trim()}%`));
+ }
+ if (input.appName?.trim()) {
+ baseConditions.push(
+ ilike(redisTable.appName, `%${input.appName.trim()}%`),
+ );
+ }
+ if (input.description?.trim()) {
+ baseConditions.push(
+ ilike(redisTable.description ?? "", `%${input.description.trim()}%`),
+ );
+ }
+ const { accessedServices } = await findMemberByUserId(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
+ if (accessedServices.length === 0) return { items: [], total: 0 };
+ baseConditions.push(
+ sql`${redisTable.redisId} IN (${sql.join(
+ accessedServices.map((id) => sql`${id}`),
+ sql`, `,
+ )})`,
+ );
+
+ const where = and(...baseConditions);
+ const [items, countResult] = await Promise.all([
+ db
+ .select({
+ redisId: redisTable.redisId,
+ name: redisTable.name,
+ appName: redisTable.appName,
+ description: redisTable.description,
+ environmentId: redisTable.environmentId,
+ applicationStatus: redisTable.applicationStatus,
+ createdAt: redisTable.createdAt,
+ })
+ .from(redisTable)
+ .innerJoin(
+ environments,
+ eq(redisTable.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where)
+ .orderBy(desc(redisTable.createdAt))
+ .limit(input.limit)
+ .offset(input.offset),
+ db
+ .select({ count: sql`count(*)::int` })
+ .from(redisTable)
+ .innerJoin(
+ environments,
+ eq(redisTable.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(where),
+ ]);
+ return { items, total: countResult[0]?.count ?? 0 };
+ }),
});
diff --git a/apps/dokploy/server/api/routers/registry.ts b/apps/dokploy/server/api/routers/registry.ts
index 14155edfc..7e2174419 100644
--- a/apps/dokploy/server/api/routers/registry.ts
+++ b/apps/dokploy/server/api/routers/registry.ts
@@ -7,9 +7,9 @@ import {
removeRegistry,
updateRegistry,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
-import { db } from "@/server/db";
import {
apiCreateRegistry,
apiFindOneRegistry,
@@ -19,14 +19,22 @@ import {
apiUpdateRegistry,
registry,
} from "@/server/db/schema";
-import { adminProcedure, createTRPCRouter, protectedProcedure } from "../trpc";
+import { audit } from "@/server/api/utils/audit";
+import { createTRPCRouter, withPermission } from "../trpc";
export const registryRouter = createTRPCRouter({
- create: adminProcedure
+ create: withPermission("registry", "create")
.input(apiCreateRegistry)
.mutation(async ({ ctx, input }) => {
- return await createRegistry(input, ctx.session.activeOrganizationId);
+ const reg = await createRegistry(input, ctx.session.activeOrganizationId);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "registry",
+ resourceId: reg.registryId,
+ resourceName: reg.registryName,
+ });
+ return reg;
}),
- remove: adminProcedure
+ remove: withPermission("registry", "delete")
.input(apiRemoveRegistry)
.mutation(async ({ ctx, input }) => {
const registry = await findRegistryById(input.registryId);
@@ -36,9 +44,15 @@ export const registryRouter = createTRPCRouter({
message: "You are not allowed to delete this registry",
});
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "registry",
+ resourceId: registry.registryId,
+ resourceName: registry.registryName,
+ });
return await removeRegistry(input.registryId);
}),
- update: protectedProcedure
+ update: withPermission("registry", "create")
.input(apiUpdateRegistry)
.mutation(async ({ input, ctx }) => {
const { registryId, ...rest } = input;
@@ -60,15 +74,21 @@ export const registryRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "registry",
+ resourceId: registryId,
+ resourceName: registry.registryName,
+ });
return true;
}),
- all: protectedProcedure.query(async ({ ctx }) => {
+ all: withPermission("registry", "read").query(async ({ ctx }) => {
const registryResponse = await db.query.registry.findMany({
where: eq(registry.organizationId, ctx.session.activeOrganizationId),
});
return registryResponse;
}),
- one: adminProcedure
+ one: withPermission("registry", "read")
.input(apiFindOneRegistry)
.query(async ({ input, ctx }) => {
const registry = await findRegistryById(input.registryId);
@@ -80,7 +100,7 @@ export const registryRouter = createTRPCRouter({
}
return registry;
}),
- testRegistry: protectedProcedure
+ testRegistry: withPermission("registry", "read")
.input(apiTestRegistry)
.mutation(async ({ input }) => {
try {
@@ -122,11 +142,10 @@ export const registryRouter = createTRPCRouter({
});
}
}),
- testRegistryById: protectedProcedure
+ testRegistryById: withPermission("registry", "read")
.input(apiTestRegistryById)
.mutation(async ({ input, ctx }) => {
try {
- // Get the full registry with password from database
const registryData = await db.query.registry.findFirst({
where: eq(registry.registryId, input.registryId ?? ""),
});
diff --git a/apps/dokploy/server/api/routers/rollbacks.ts b/apps/dokploy/server/api/routers/rollbacks.ts
index d9e6180fb..20c641258 100644
--- a/apps/dokploy/server/api/routers/rollbacks.ts
+++ b/apps/dokploy/server/api/routers/rollbacks.ts
@@ -3,16 +3,31 @@ import {
removeRollbackById,
rollback,
} from "@dokploy/server";
+import { checkServicePermissionAndAccess } from "@dokploy/server/services/permission";
import { TRPCError } from "@trpc/server";
-import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
+import { audit } from "@/server/api/utils/audit";
import { apiFindOneRollback } from "@/server/db/schema";
+import { createTRPCRouter, protectedProcedure } from "../trpc";
export const rollbackRouter = createTRPCRouter({
delete: protectedProcedure
.input(apiFindOneRollback)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
try {
- return removeRollbackById(input.rollbackId);
+ const rb = await findRollbackById(input.rollbackId);
+ const serviceId = rb.deployment.applicationId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ deployment: ["create"],
+ });
+ }
+ const result = await removeRollbackById(input.rollbackId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "deployment",
+ resourceId: input.rollbackId,
+ });
+ return result;
} catch (error) {
const message =
error instanceof Error
@@ -28,17 +43,20 @@ export const rollbackRouter = createTRPCRouter({
.input(apiFindOneRollback)
.mutation(async ({ input, ctx }) => {
try {
- const currentRollback = await findRollbackById(input.rollbackId);
- if (
- currentRollback?.deployment?.application?.environment?.project
- .organizationId !== ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to rollback this deployment",
+ const rb = await findRollbackById(input.rollbackId);
+ const serviceId = rb.deployment.applicationId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ deployment: ["create"],
});
}
- return await rollback(input.rollbackId);
+ const result = await rollback(input.rollbackId);
+ await audit(ctx, {
+ action: "restore",
+ resourceType: "deployment",
+ resourceId: input.rollbackId,
+ });
+ return result;
} catch (error) {
console.error(error);
throw new TRPCError({
diff --git a/apps/dokploy/server/api/routers/schedule.ts b/apps/dokploy/server/api/routers/schedule.ts
index 3bf284b76..2563fd7ac 100644
--- a/apps/dokploy/server/api/routers/schedule.ts
+++ b/apps/dokploy/server/api/routers/schedule.ts
@@ -16,12 +16,20 @@ import {
import { TRPCError } from "@trpc/server";
import { desc, eq } from "drizzle-orm";
import { z } from "zod";
+import { audit } from "@/server/api/utils/audit";
import { removeJob, schedule } from "@/server/utils/backup";
+import { checkServicePermissionAndAccess } from "@dokploy/server/services/permission";
import { createTRPCRouter, protectedProcedure } from "../trpc";
export const scheduleRouter = createTRPCRouter({
create: protectedProcedure
.input(createScheduleSchema)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
+ const serviceId = input.applicationId || input.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ schedule: ["create"],
+ });
+ }
const newSchedule = await createSchedule(input);
if (newSchedule?.enabled) {
@@ -36,12 +44,26 @@ export const scheduleRouter = createTRPCRouter({
scheduleJob(newSchedule);
}
}
+ await audit(ctx, {
+ action: "create",
+ resourceType: "schedule",
+ resourceId: newSchedule?.scheduleId,
+ resourceName: newSchedule?.name,
+ });
return newSchedule;
}),
update: protectedProcedure
.input(updateScheduleSchema)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
+ const existingSchedule = await findScheduleById(input.scheduleId);
+ const serviceId =
+ existingSchedule.applicationId || existingSchedule.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ schedule: ["update"],
+ });
+ }
const updatedSchedule = await updateSchedule(input);
if (IS_CLOUD) {
@@ -67,24 +89,42 @@ export const scheduleRouter = createTRPCRouter({
removeScheduleJob(updatedSchedule.scheduleId);
}
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "schedule",
+ resourceId: updatedSchedule.scheduleId,
+ resourceName: updatedSchedule.name,
+ });
return updatedSchedule;
}),
delete: protectedProcedure
.input(z.object({ scheduleId: z.string() }))
- .mutation(async ({ input }) => {
- const schedule = await findScheduleById(input.scheduleId);
+ .mutation(async ({ input, ctx }) => {
+ const scheduleItem = await findScheduleById(input.scheduleId);
+ const serviceId = scheduleItem.applicationId || scheduleItem.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ schedule: ["delete"],
+ });
+ }
await deleteSchedule(input.scheduleId);
if (IS_CLOUD) {
await removeJob({
- cronSchedule: schedule.cronExpression,
- scheduleId: schedule.scheduleId,
+ cronSchedule: scheduleItem.cronExpression,
+ scheduleId: scheduleItem.scheduleId,
type: "schedule",
});
} else {
- removeScheduleJob(schedule.scheduleId);
+ removeScheduleJob(scheduleItem.scheduleId);
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "schedule",
+ resourceId: scheduleItem.scheduleId,
+ resourceName: scheduleItem.name,
+ });
return true;
}),
@@ -100,7 +140,15 @@ export const scheduleRouter = createTRPCRouter({
]),
}),
)
- .query(async ({ input }) => {
+ .query(async ({ input, ctx }) => {
+ if (
+ input.scheduleType === "application" ||
+ input.scheduleType === "compose"
+ ) {
+ await checkServicePermissionAndAccess(ctx, input.id, {
+ schedule: ["read"],
+ });
+ }
const where = {
application: eq(schedules.applicationId, input.id),
compose: eq(schedules.composeId, input.id),
@@ -122,15 +170,34 @@ export const scheduleRouter = createTRPCRouter({
one: protectedProcedure
.input(z.object({ scheduleId: z.string() }))
- .query(async ({ input }) => {
- return await findScheduleById(input.scheduleId);
+ .query(async ({ input, ctx }) => {
+ const schedule = await findScheduleById(input.scheduleId);
+ const serviceId = schedule.applicationId || schedule.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ schedule: ["read"],
+ });
+ }
+ return schedule;
}),
runManually: protectedProcedure
.input(z.object({ scheduleId: z.string().min(1) }))
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
+ const scheduleItem = await findScheduleById(input.scheduleId);
+ const serviceId = scheduleItem.applicationId || scheduleItem.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ schedule: ["create"],
+ });
+ }
try {
await runCommand(input.scheduleId);
+ await audit(ctx, {
+ action: "run",
+ resourceType: "schedule",
+ resourceId: input.scheduleId,
+ });
return true;
} catch (error) {
throw new TRPCError({
diff --git a/apps/dokploy/server/api/routers/security.ts b/apps/dokploy/server/api/routers/security.ts
index 3d8374b4c..f2c8fc5eb 100644
--- a/apps/dokploy/server/api/routers/security.ts
+++ b/apps/dokploy/server/api/routers/security.ts
@@ -1,80 +1,74 @@
import {
createSecurity,
deleteSecurityById,
- findApplicationById,
findSecurityById,
updateSecurityById,
} from "@dokploy/server";
-import { TRPCError } from "@trpc/server";
+import { checkServicePermissionAndAccess } from "@dokploy/server/services/permission";
+import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
+import { audit } from "@/server/api/utils/audit";
import {
apiCreateSecurity,
apiFindOneSecurity,
apiUpdateSecurity,
} from "@/server/db/schema";
-import { createTRPCRouter, protectedProcedure } from "../trpc";
export const securityRouter = createTRPCRouter({
create: protectedProcedure
.input(apiCreateSecurity)
.mutation(async ({ input, ctx }) => {
- const application = await findApplicationById(input.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
- return await createSecurity(input);
+ await checkServicePermissionAndAccess(ctx, input.applicationId, {
+ service: ["create"],
+ });
+ await createSecurity(input);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "security",
+ resourceId: input.applicationId,
+ resourceName: input.username,
+ });
+ return true;
}),
+
one: protectedProcedure
.input(apiFindOneSecurity)
.query(async ({ input, ctx }) => {
const security = await findSecurityById(input.securityId);
- const application = await findApplicationById(security.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
- return await findSecurityById(input.securityId);
+ await checkServicePermissionAndAccess(ctx, security.applicationId, {
+ service: ["read"],
+ });
+ return security;
}),
+
delete: protectedProcedure
.input(apiFindOneSecurity)
.mutation(async ({ input, ctx }) => {
const security = await findSecurityById(input.securityId);
- const application = await findApplicationById(security.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
- return await deleteSecurityById(input.securityId);
+ await checkServicePermissionAndAccess(ctx, security.applicationId, {
+ service: ["delete"],
+ });
+ const result = await deleteSecurityById(input.securityId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "security",
+ resourceId: input.securityId,
+ });
+ return result;
}),
+
update: protectedProcedure
.input(apiUpdateSecurity)
.mutation(async ({ input, ctx }) => {
const security = await findSecurityById(input.securityId);
- const application = await findApplicationById(security.applicationId);
- if (
- application.environment.project.organizationId !==
- ctx.session.activeOrganizationId
- ) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this application",
- });
- }
- return await updateSecurityById(input.securityId, input);
+ await checkServicePermissionAndAccess(ctx, security.applicationId, {
+ service: ["create"],
+ });
+ const result = await updateSecurityById(input.securityId, input);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "security",
+ resourceId: input.securityId,
+ });
+ return result;
}),
});
diff --git a/apps/dokploy/server/api/routers/server.ts b/apps/dokploy/server/api/routers/server.ts
index 4a044ec54..7fabe242d 100644
--- a/apps/dokploy/server/api/routers/server.ts
+++ b/apps/dokploy/server/api/routers/server.ts
@@ -15,13 +15,18 @@ import {
setupMonitoring,
updateServerById,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
import { observable } from "@trpc/server/observable";
import { and, desc, eq, getTableColumns, isNotNull, sql } from "drizzle-orm";
import { z } from "zod";
import { updateServersBasedOnQuantity } from "@/pages/api/stripe/webhook";
-import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
+import { audit } from "@/server/api/utils/audit";
+import {
+ createTRPCRouter,
+ protectedProcedure,
+ withPermission,
+} from "@/server/api/trpc";
import {
apiCreateServer,
apiFindOneServer,
@@ -40,7 +45,7 @@ import {
} from "@/server/db/schema";
export const serverRouter = createTRPCRouter({
- create: protectedProcedure
+ create: withPermission("server", "create")
.input(apiCreateServer)
.mutation(async ({ ctx, input }) => {
try {
@@ -56,6 +61,12 @@ export const serverRouter = createTRPCRouter({
input,
ctx.session.activeOrganizationId,
);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "server",
+ resourceId: project.serverId,
+ resourceName: project.name,
+ });
return project;
} catch (error) {
throw new TRPCError({
@@ -66,7 +77,7 @@ export const serverRouter = createTRPCRouter({
}
}),
- one: protectedProcedure
+ one: withPermission("server", "read")
.input(apiFindOneServer)
.query(async ({ input, ctx }) => {
const server = await findServerById(input.serverId);
@@ -79,14 +90,14 @@ export const serverRouter = createTRPCRouter({
return server;
}),
- getDefaultCommand: protectedProcedure
+ getDefaultCommand: withPermission("server", "read")
.input(apiFindOneServer)
.query(async ({ input }) => {
const server = await findServerById(input.serverId);
const isBuildServer = server.serverType === "build";
return defaultCommand(isBuildServer);
}),
- all: protectedProcedure.query(async ({ ctx }) => {
+ all: withPermission("server", "read").query(async ({ ctx }) => {
const result = await db
.select({
...getTableColumns(server),
@@ -118,7 +129,7 @@ export const serverRouter = createTRPCRouter({
return servers.length ?? 0;
}),
- withSSHKey: protectedProcedure.query(async ({ ctx }) => {
+ withSSHKey: withPermission("server", "read").query(async ({ ctx }) => {
const result = await db.query.server.findMany({
orderBy: desc(server.createdAt),
where: IS_CLOUD
@@ -136,7 +147,7 @@ export const serverRouter = createTRPCRouter({
});
return result;
}),
- buildServers: protectedProcedure.query(async ({ ctx }) => {
+ buildServers: withPermission("server", "read").query(async ({ ctx }) => {
const result = await db.query.server.findMany({
orderBy: desc(server.createdAt),
where: IS_CLOUD
@@ -154,7 +165,7 @@ export const serverRouter = createTRPCRouter({
});
return result;
}),
- setup: protectedProcedure
+ setup: withPermission("server", "create")
.input(apiFindOneServer)
.mutation(async ({ input, ctx }) => {
try {
@@ -166,12 +177,18 @@ export const serverRouter = createTRPCRouter({
});
}
const currentServer = await serverSetup(input.serverId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "server",
+ resourceId: input.serverId,
+ resourceName: server.name,
+ });
return currentServer;
} catch (error) {
throw error;
}
}),
- setupWithLogs: protectedProcedure
+ setupWithLogs: withPermission("server", "create")
.meta({
openapi: {
path: "/deploy/server-with-logs",
@@ -199,7 +216,7 @@ export const serverRouter = createTRPCRouter({
throw error;
}
}),
- validate: protectedProcedure
+ validate: withPermission("server", "read")
.input(apiFindOneServer)
.query(async ({ input, ctx }) => {
try {
@@ -245,7 +262,7 @@ export const serverRouter = createTRPCRouter({
}
}),
- security: protectedProcedure
+ security: withPermission("server", "read")
.input(apiFindOneServer)
.query(async ({ input, ctx }) => {
try {
@@ -295,7 +312,7 @@ export const serverRouter = createTRPCRouter({
});
}
}),
- setupMonitoring: protectedProcedure
+ setupMonitoring: withPermission("server", "create")
.input(apiUpdateServerMonitoring)
.mutation(async ({ input, ctx }) => {
try {
@@ -332,22 +349,21 @@ export const serverRouter = createTRPCRouter({
},
});
const currentServer = await setupMonitoring(input.serverId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "server",
+ resourceId: input.serverId,
+ resourceName: server.name,
+ });
return currentServer;
} catch (error) {
throw error;
}
}),
- remove: protectedProcedure
+ remove: withPermission("server", "delete")
.input(apiRemoveServer)
.mutation(async ({ input, ctx }) => {
try {
- const server = await findServerById(input.serverId);
- if (server.organizationId !== ctx.session.activeOrganizationId) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to delete this server",
- });
- }
const activeServers = await haveActiveServices(input.serverId);
if (activeServers) {
@@ -357,6 +373,12 @@ export const serverRouter = createTRPCRouter({
});
}
const currentServer = await findServerById(input.serverId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "server",
+ resourceId: currentServer.serverId,
+ resourceName: currentServer.name,
+ });
await removeDeploymentsByServerId(currentServer);
await deleteServer(input.serverId);
@@ -371,7 +393,7 @@ export const serverRouter = createTRPCRouter({
throw error;
}
}),
- update: protectedProcedure
+ update: withPermission("server", "create")
.input(apiUpdateServer)
.mutation(async ({ input, ctx }) => {
try {
@@ -393,6 +415,12 @@ export const serverRouter = createTRPCRouter({
...input,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "server",
+ resourceId: input.serverId,
+ resourceName: server.name,
+ });
return currentServer;
} catch (error) {
throw error;
@@ -414,7 +442,7 @@ export const serverRouter = createTRPCRouter({
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
};
}),
- getServerMetrics: protectedProcedure
+ getServerMetrics: withPermission("monitoring", "read")
.input(
z.object({
url: z.string(),
diff --git a/apps/dokploy/server/api/routers/settings.ts b/apps/dokploy/server/api/routers/settings.ts
index bb7269fa7..4b12abc4c 100644
--- a/apps/dokploy/server/api/routers/settings.ts
+++ b/apps/dokploy/server/api/routers/settings.ts
@@ -1,8 +1,10 @@
import {
CLEANUP_CRON_JOB,
- canAccessToTraefikFiles,
checkGPUStatus,
checkPortInUse,
+ checkPostgresHealth,
+ checkRedisHealth,
+ checkTraefikHealth,
cleanupAll,
cleanupAllBackground,
cleanupBuilders,
@@ -45,13 +47,15 @@ import {
writeTraefikConfigInPath,
writeTraefikSetup,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
+import { checkPermission } from "@dokploy/server/services/permission";
import { generateOpenApiDocument } from "@dokploy/trpc-openapi";
import { TRPCError } from "@trpc/server";
import { eq, sql } from "drizzle-orm";
import { scheduledJobs, scheduleJob } from "node-schedule";
import { parse, stringify } from "yaml";
import { z } from "zod";
-import { db } from "@/server/db";
+import { audit } from "@/server/api/utils/audit";
import {
apiAssignDomain,
apiEnableDashboard,
@@ -84,14 +88,19 @@ export const settingsRouter = createTRPCRouter({
const settings = await getWebServerSettings();
return settings;
}),
- reloadServer: adminProcedure.mutation(async () => {
+ reloadServer: adminProcedure.mutation(async ({ ctx }) => {
if (IS_CLOUD) {
return true;
}
await reloadDockerResource("dokploy", undefined, packageInfo.version);
+ await audit(ctx, {
+ action: "reload",
+ resourceType: "settings",
+ resourceName: "dokploy",
+ });
return true;
}),
- cleanRedis: adminProcedure.mutation(async () => {
+ cleanRedis: adminProcedure.mutation(async ({ ctx }) => {
if (IS_CLOUD) {
return true;
}
@@ -107,36 +116,56 @@ export const settingsRouter = createTRPCRouter({
const redisContainerId = containerId.trim();
await execAsync(`docker exec -i ${redisContainerId} redis-cli flushall`);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "clean-redis",
+ });
return true;
}),
- reloadRedis: adminProcedure.mutation(async () => {
+ reloadRedis: adminProcedure.mutation(async ({ ctx }) => {
if (IS_CLOUD) {
return true;
}
await reloadDockerResource("dokploy-redis");
-
+ await audit(ctx, {
+ action: "reload",
+ resourceType: "settings",
+ resourceName: "dokploy-redis",
+ });
return true;
}),
- cleanAllDeploymentQueue: adminProcedure.mutation(async () => {
+ cleanAllDeploymentQueue: adminProcedure.mutation(async ({ ctx }) => {
if (IS_CLOUD) {
return true;
}
- return cleanAllDeploymentQueue();
+ const result = cleanAllDeploymentQueue();
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "clean-deployment-queue",
+ });
+ return result;
}),
reloadTraefik: adminProcedure
.input(apiServerSchema)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
// Run in background so the request returns immediately; avoids proxy timeouts.
void reloadDockerResource("dokploy-traefik", input?.serverId).catch(
(err) => {
console.error("reloadTraefik background:", err);
},
);
+ await audit(ctx, {
+ action: "reload",
+ resourceType: "settings",
+ resourceName: "dokploy-traefik",
+ });
return true;
}),
toggleDashboard: adminProcedure
.input(apiEnableDashboard)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
const ports = await readPorts("dokploy-traefik", input.serverId);
const env = await readEnvironmentVariables(
"dokploy-traefik",
@@ -149,12 +178,12 @@ export const settingsRouter = createTRPCRouter({
// Check if port 8080 is already in use before enabling dashboard
const portCheck = await checkPortInUse(8080, input.serverId);
if (portCheck.isInUse) {
- const conflictingContainer = portCheck.conflictingContainer
- ? ` by container "${portCheck.conflictingContainer}"`
+ const conflictInfo = portCheck.conflictingContainer
+ ? ` by ${portCheck.conflictingContainer}`
: "";
throw new TRPCError({
code: "CONFLICT",
- message: `Port 8080 is already in use${conflictingContainer}. Please stop the conflicting service or use a different port for the Traefik dashboard.`,
+ message: `Port 8080 is already in use${conflictInfo}. Please stop the conflicting service or use a different port for the Traefik dashboard.`,
});
}
newPorts.push({
@@ -175,70 +204,112 @@ export const settingsRouter = createTRPCRouter({
}).catch((err) => {
console.error("toggleDashboard background writeTraefikSetup:", err);
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "toggle-dashboard",
+ });
return true;
}),
cleanUnusedImages: adminProcedure
.input(apiServerSchema)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
await cleanupImages(input?.serverId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "settings",
+ resourceName: "clean-unused-images",
+ });
return true;
}),
cleanUnusedVolumes: adminProcedure
.input(apiServerSchema)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
await cleanupVolumes(input?.serverId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "settings",
+ resourceName: "clean-unused-volumes",
+ });
return true;
}),
cleanStoppedContainers: adminProcedure
.input(apiServerSchema)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
await cleanupContainers(input?.serverId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "settings",
+ resourceName: "clean-stopped-containers",
+ });
return true;
}),
cleanDockerBuilder: adminProcedure
.input(apiServerSchema)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
await cleanupBuilders(input?.serverId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "settings",
+ resourceName: "clean-docker-builder",
+ });
}),
cleanDockerPrune: adminProcedure
.input(apiServerSchema)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
await cleanupSystem(input?.serverId);
await cleanupBuilders(input?.serverId);
-
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "settings",
+ resourceName: "clean-docker-prune",
+ });
return true;
}),
cleanAll: adminProcedure
.input(apiServerSchema)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
// Execute cleanup in background and return immediately to avoid gateway timeouts
const result = await cleanupAllBackground(input?.serverId);
-
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "settings",
+ resourceName: "clean-all",
+ });
return result;
}),
- cleanMonitoring: adminProcedure.mutation(async () => {
+ cleanMonitoring: adminProcedure.mutation(async ({ ctx }) => {
if (IS_CLOUD) {
return true;
}
const { MONITORING_PATH } = paths();
await recreateDirectory(MONITORING_PATH);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "settings",
+ resourceName: "clean-monitoring",
+ });
return true;
}),
saveSSHPrivateKey: adminProcedure
.input(apiSaveSSHKey)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
if (IS_CLOUD) {
return true;
}
await updateWebServerSettings({
sshPrivateKey: input.sshPrivateKey,
});
-
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "ssh-private-key",
+ });
return true;
}),
assignDomainServer: adminProcedure
.input(apiAssignDomain)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
if (IS_CLOUD) {
return true;
}
@@ -261,15 +332,25 @@ export const settingsRouter = createTRPCRouter({
updateLetsEncryptEmail(input.letsEncryptEmail);
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "assign-domain-server",
+ });
return settings;
}),
- cleanSSHPrivateKey: adminProcedure.mutation(async () => {
+ cleanSSHPrivateKey: adminProcedure.mutation(async ({ ctx }) => {
if (IS_CLOUD) {
return true;
}
await updateWebServerSettings({
sshPrivateKey: null,
});
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "settings",
+ resourceName: "ssh-private-key",
+ });
return true;
}),
updateDockerCleanup: adminProcedure
@@ -349,6 +430,11 @@ export const settingsRouter = createTRPCRouter({
}
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "docker-cleanup",
+ });
return true;
}),
@@ -362,11 +448,16 @@ export const settingsRouter = createTRPCRouter({
updateTraefikConfig: adminProcedure
.input(apiTraefikConfig)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
if (IS_CLOUD) {
return true;
}
writeMainConfig(input.traefikConfig);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "traefik-config",
+ });
return true;
}),
@@ -379,11 +470,16 @@ export const settingsRouter = createTRPCRouter({
}),
updateWebServerTraefikConfig: adminProcedure
.input(apiTraefikConfig)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
if (IS_CLOUD) {
return true;
}
writeConfig("dokploy", input.traefikConfig);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "web-server-traefik-config",
+ });
return true;
}),
@@ -397,11 +493,16 @@ export const settingsRouter = createTRPCRouter({
updateMiddlewareTraefikConfig: adminProcedure
.input(apiTraefikConfig)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
if (IS_CLOUD) {
return true;
}
writeConfig("middlewares", input.traefikConfig);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "middleware-traefik-config",
+ });
return true;
}),
getUpdateData: protectedProcedure.mutation(async () => {
@@ -411,7 +512,7 @@ export const settingsRouter = createTRPCRouter({
return await getUpdateData(packageInfo.version);
}),
- updateServer: adminProcedure.mutation(async () => {
+ updateServer: adminProcedure.mutation(async ({ ctx }) => {
if (IS_CLOUD) {
return true;
}
@@ -426,6 +527,11 @@ export const settingsRouter = createTRPCRouter({
`dokploy/dokploy:${data.latestVersion}`,
"dokploy",
]);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "dokploy-version",
+ });
}
return true;
@@ -441,16 +547,7 @@ export const settingsRouter = createTRPCRouter({
.input(apiServerSchema)
.query(async ({ ctx, input }) => {
try {
- if (ctx.user.role === "member") {
- const canAccess = await canAccessToTraefikFiles(
- ctx.user.id,
- ctx.session.activeOrganizationId,
- );
-
- if (!canAccess) {
- throw new TRPCError({ code: "UNAUTHORIZED" });
- }
- }
+ await checkPermission(ctx, { traefikFiles: ["read"] });
const { MAIN_TRAEFIK_PATH } = paths(!!input?.serverId);
const result = await readDirectory(MAIN_TRAEFIK_PATH, input?.serverId);
return result || [];
@@ -462,37 +559,24 @@ export const settingsRouter = createTRPCRouter({
updateTraefikFile: protectedProcedure
.input(apiModifyTraefikConfig)
.mutation(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- const canAccess = await canAccessToTraefikFiles(
- ctx.user.id,
- ctx.session.activeOrganizationId,
- );
-
- if (!canAccess) {
- throw new TRPCError({ code: "UNAUTHORIZED" });
- }
- }
+ await checkPermission(ctx, { traefikFiles: ["write"] });
await writeTraefikConfigInPath(
input.path,
input.traefikConfig,
input?.serverId,
);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "traefik-file",
+ });
return true;
}),
readTraefikFile: protectedProcedure
.input(apiReadTraefikConfig)
.query(async ({ input, ctx }) => {
- if (ctx.user.role === "member") {
- const canAccess = await canAccessToTraefikFiles(
- ctx.user.id,
- ctx.session.activeOrganizationId,
- );
-
- if (!canAccess) {
- throw new TRPCError({ code: "UNAUTHORIZED" });
- }
- }
+ await checkPermission(ctx, { traefikFiles: ["read"] });
if (input.serverId) {
const server = await findServerById(input.serverId);
@@ -517,13 +601,18 @@ export const settingsRouter = createTRPCRouter({
serverIp: z.string(),
}),
)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
if (IS_CLOUD) {
return true;
}
const settings = await updateWebServerSettings({
serverIp: input.serverIp,
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "server-ip",
+ });
return settings;
}),
@@ -533,7 +622,7 @@ export const settingsRouter = createTRPCRouter({
const url = `${protocol}://${ctx.req.headers.host}/api`;
const openApiDocument = generateOpenApiDocument(appRouter, {
title: "tRPC OpenAPI",
- version: "1.0.0",
+ version: packageInfo.version,
baseUrl: url,
docsUrl: `${url}/settings.getOpenApiDocument`,
tags: [
@@ -563,6 +652,7 @@ export const settingsRouter = createTRPCRouter({
"sshRouter",
"gitProvider",
"bitbucket",
+ "ai",
"github",
"gitlab",
"gitea",
@@ -572,7 +662,7 @@ export const settingsRouter = createTRPCRouter({
openApiDocument.info = {
title: "Dokploy API",
description: "Endpoints for dokploy",
- version: "1.0.0",
+ version: packageInfo.version,
};
// Add security schemes configuration
@@ -609,7 +699,7 @@ export const settingsRouter = createTRPCRouter({
writeTraefikEnv: adminProcedure
.input(z.object({ env: z.string(), serverId: z.string().optional() }))
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
const envs = prepareEnvironmentVariables(input.env);
const ports = await readPorts("dokploy-traefik", input?.serverId);
@@ -621,6 +711,11 @@ export const settingsRouter = createTRPCRouter({
}).catch((err) => {
console.error("writeTraefikEnv background writeTraefikSetup:", err);
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "traefik-env",
+ });
return true;
}),
haveTraefikDashboardPortEnabled: adminProcedure
@@ -714,7 +809,7 @@ export const settingsRouter = createTRPCRouter({
enable: z.boolean(),
}),
)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
if (IS_CLOUD) {
return true;
}
@@ -733,10 +828,6 @@ export const settingsRouter = createTRPCRouter({
filePath: "/etc/dokploy/traefik/dynamic/access.log",
format: "json",
bufferingSize: 100,
- filters: {
- retryAttempts: true,
- minDuration: "10ms",
- },
},
};
currentConfig.accessLog = config.accessLog;
@@ -745,7 +836,11 @@ export const settingsRouter = createTRPCRouter({
}
writeMainConfig(stringify(currentConfig));
-
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "toggle-requests",
+ });
return true;
}),
isCloud: publicProcedure.query(async () => {
@@ -772,19 +867,41 @@ export const settingsRouter = createTRPCRouter({
throw error;
}
}),
+ checkInfrastructureHealth: adminProcedure.query(async () => {
+ if (IS_CLOUD) {
+ return {
+ postgres: { status: "healthy" as const },
+ redis: { status: "healthy" as const },
+ traefik: { status: "healthy" as const },
+ };
+ }
+
+ const [postgres, redis, traefik] = await Promise.all([
+ checkPostgresHealth(),
+ checkRedisHealth(),
+ checkTraefikHealth(),
+ ]);
+
+ return { postgres, redis, traefik };
+ }),
setupGPU: adminProcedure
.input(
z.object({
serverId: z.string().optional(),
}),
)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
if (IS_CLOUD && !input.serverId) {
throw new Error("Select a server to enable the GPU Setup");
}
try {
await setupGPUSupport(input.serverId);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "setup-gpu",
+ });
return { success: true };
} catch (error) {
console.error("GPU Setup Error:", error);
@@ -838,7 +955,7 @@ export const settingsRouter = createTRPCRouter({
),
}),
)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
try {
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
@@ -876,6 +993,11 @@ export const settingsRouter = createTRPCRouter({
err,
);
});
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "traefik-ports",
+ });
return true;
} catch (error) {
throw new TRPCError({
@@ -900,14 +1022,22 @@ export const settingsRouter = createTRPCRouter({
cronExpression: z.string().nullable(),
}),
)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
if (IS_CLOUD) {
return true;
}
+ let result: boolean;
if (input.cronExpression) {
- return startLogCleanup(input.cronExpression);
+ result = await startLogCleanup(input.cronExpression);
+ } else {
+ result = await stopLogCleanup();
}
- return stopLogCleanup();
+ await audit(ctx, {
+ action: "update",
+ resourceType: "settings",
+ resourceName: "log-cleanup",
+ });
+ return result;
}),
getLogCleanupStatus: protectedProcedure.query(async () => {
diff --git a/apps/dokploy/server/api/routers/ssh-key.ts b/apps/dokploy/server/api/routers/ssh-key.ts
index 292a70ecf..74aeb5e58 100644
--- a/apps/dokploy/server/api/routers/ssh-key.ts
+++ b/apps/dokploy/server/api/routers/ssh-key.ts
@@ -5,10 +5,11 @@ import {
removeSSHKeyById,
updateSSHKeyById,
} from "@dokploy/server";
+import { db } from "@dokploy/server/db";
import { TRPCError } from "@trpc/server";
import { desc, eq } from "drizzle-orm";
-import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
-import { db } from "@/server/db";
+import { audit } from "@/server/api/utils/audit";
+import { createTRPCRouter, withPermission } from "@/server/api/trpc";
import {
apiCreateSshKey,
apiFindOneSshKey,
@@ -19,7 +20,7 @@ import {
} from "@/server/db/schema";
export const sshRouter = createTRPCRouter({
- create: protectedProcedure
+ create: withPermission("sshKeys", "create")
.input(apiCreateSshKey)
.mutation(async ({ input, ctx }) => {
try {
@@ -27,6 +28,11 @@ export const sshRouter = createTRPCRouter({
...input,
organizationId: ctx.session.activeOrganizationId,
});
+ await audit(ctx, {
+ action: "create",
+ resourceType: "sshKey",
+ resourceName: input.name,
+ });
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -35,7 +41,7 @@ export const sshRouter = createTRPCRouter({
});
}
}),
- remove: protectedProcedure
+ remove: withPermission("sshKeys", "delete")
.input(apiRemoveSshKey)
.mutation(async ({ input, ctx }) => {
try {
@@ -47,12 +53,18 @@ export const sshRouter = createTRPCRouter({
});
}
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "sshKey",
+ resourceId: sshKey.sshKeyId,
+ resourceName: sshKey.name,
+ });
return await removeSSHKeyById(input.sshKeyId);
} catch (error) {
throw error;
}
}),
- one: protectedProcedure
+ one: withPermission("sshKeys", "read")
.input(apiFindOneSshKey)
.query(async ({ input, ctx }) => {
const sshKey = await findSSHKeyById(input.sshKeyId);
@@ -65,18 +77,18 @@ export const sshRouter = createTRPCRouter({
}
return sshKey;
}),
- all: protectedProcedure.query(async ({ ctx }) => {
+ all: withPermission("sshKeys", "read").query(async ({ ctx }) => {
return await db.query.sshKeys.findMany({
where: eq(sshKeys.organizationId, ctx.session.activeOrganizationId),
orderBy: desc(sshKeys.createdAt),
});
}),
- generate: protectedProcedure
+ generate: withPermission("sshKeys", "read")
.input(apiGenerateSSHKey)
.mutation(async ({ input }) => {
return await generateSSHKey(input.type);
}),
- update: protectedProcedure
+ update: withPermission("sshKeys", "create")
.input(apiUpdateSshKey)
.mutation(async ({ input, ctx }) => {
try {
@@ -87,7 +99,14 @@ export const sshRouter = createTRPCRouter({
message: "You are not allowed to update this SSH key",
});
}
- return await updateSSHKeyById(input);
+ const result = await updateSSHKeyById(input);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "sshKey",
+ resourceId: sshKey.sshKeyId,
+ resourceName: sshKey.name,
+ });
+ return result;
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
diff --git a/apps/dokploy/server/api/routers/stripe.ts b/apps/dokploy/server/api/routers/stripe.ts
index 963ec8c5b..2a6292dfc 100644
--- a/apps/dokploy/server/api/routers/stripe.ts
+++ b/apps/dokploy/server/api/routers/stripe.ts
@@ -8,14 +8,69 @@ import { TRPCError } from "@trpc/server";
import Stripe from "stripe";
import { z } from "zod";
import {
+ type BillingTier,
getStripeItems,
+ HOBBY_PRICE_ANNUAL_ID,
+ HOBBY_PRICE_MONTHLY_ID,
+ HOBBY_PRODUCT_ID,
+ LEGACY_PRICE_IDS,
PRODUCT_ANNUAL_ID,
PRODUCT_MONTHLY_ID,
+ STARTUP_BASE_PRICE_ANNUAL_ID,
+ STARTUP_BASE_PRICE_MONTHLY_ID,
+ STARTUP_PRODUCT_ID,
WEBSITE_URL,
} from "@/server/utils/stripe";
-import { adminProcedure, createTRPCRouter } from "../trpc";
+import {
+ adminProcedure,
+ createTRPCRouter,
+ protectedProcedure,
+ withPermission,
+} from "../trpc";
export const stripeRouter = createTRPCRouter({
+ /** Returns the current billing plan for the user's organization. Used to gate features like chat (Startup only). */
+ getCurrentPlan: protectedProcedure.query(async ({ ctx }) => {
+ if (!IS_CLOUD) return null;
+ const owner = await findUserById(ctx.user.ownerId);
+ if (!owner?.stripeCustomerId) return null;
+
+ const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
+ apiVersion: "2024-09-30.acacia",
+ });
+ const subscriptions = await stripe.subscriptions.list({
+ customer: owner.stripeCustomerId,
+ status: "active",
+ expand: ["data.items.data.price"],
+ });
+ const activeSub = subscriptions.data[0];
+ if (!activeSub) return null;
+
+ const priceIds = activeSub.items.data.map(
+ (item) => (item.price as Stripe.Price).id,
+ );
+ if (
+ priceIds.some(
+ (id) =>
+ id === STARTUP_BASE_PRICE_MONTHLY_ID ||
+ id === STARTUP_BASE_PRICE_ANNUAL_ID,
+ )
+ ) {
+ return "startup" as const;
+ }
+ if (
+ priceIds.some(
+ (id) => id === HOBBY_PRICE_MONTHLY_ID || id === HOBBY_PRICE_ANNUAL_ID,
+ )
+ ) {
+ return "hobby" as const;
+ }
+ if (priceIds.some((id) => LEGACY_PRICE_IDS.includes(id))) {
+ return "legacy" as const;
+ }
+ return null;
+ }),
+
getProducts: adminProcedure.query(async ({ ctx }) => {
const user = await findUserById(ctx.user.ownerId);
const stripeCustomerId = user.stripeCustomerId;
@@ -29,16 +84,25 @@ export const stripeRouter = createTRPCRouter({
active: true,
});
- const filteredProducts = products.data.filter((product) => {
- return (
- product.id === PRODUCT_MONTHLY_ID || product.id === PRODUCT_ANNUAL_ID
- );
- });
+ const productIds = [
+ PRODUCT_MONTHLY_ID,
+ PRODUCT_ANNUAL_ID,
+ HOBBY_PRODUCT_ID,
+ STARTUP_PRODUCT_ID,
+ ].filter(Boolean);
+ const filteredProducts = products.data.filter((product) =>
+ productIds.includes(product.id),
+ );
if (!stripeCustomerId) {
return {
products: filteredProducts,
subscriptions: [],
+ hobbyProductId: HOBBY_PRODUCT_ID || undefined,
+ startupProductId: STARTUP_PRODUCT_ID || undefined,
+ currentPlan: null as "legacy" | "hobby" | "startup" | null,
+ isAnnualCurrent: false,
+ currentPriceAmount: null,
};
}
@@ -48,25 +112,79 @@ export const stripeRouter = createTRPCRouter({
expand: ["data.items.data.price"],
});
+ type CurrentPlan = "legacy" | "hobby" | "startup";
+ let currentPlan: CurrentPlan = "legacy";
+ let isAnnualCurrent = false;
+ let currentPriceAmount: number | null = null;
+ const activeSub = subscriptions.data[0];
+ if (activeSub) {
+ const priceIds = activeSub.items.data.map(
+ (item) => (item.price as Stripe.Price).id,
+ );
+ if (
+ priceIds.some(
+ (id) =>
+ id === STARTUP_BASE_PRICE_MONTHLY_ID ||
+ id === STARTUP_BASE_PRICE_ANNUAL_ID,
+ )
+ ) {
+ currentPlan = "startup";
+ } else if (
+ priceIds.some(
+ (id) => id === HOBBY_PRICE_MONTHLY_ID || id === HOBBY_PRICE_ANNUAL_ID,
+ )
+ ) {
+ currentPlan = "hobby";
+ } else if (priceIds.some((id) => LEGACY_PRICE_IDS.includes(id))) {
+ currentPlan = "legacy";
+ }
+ const firstPrice = activeSub.items.data[0]?.price as
+ | Stripe.Price
+ | undefined;
+ isAnnualCurrent = firstPrice?.recurring?.interval === "year";
+ const totalCents = activeSub.items.data.reduce((sum, item) => {
+ const price = item.price as Stripe.Price;
+ const amount = price.unit_amount ?? 0;
+ const qty = item.quantity ?? 1;
+ return sum + amount * qty;
+ }, 0);
+ currentPriceAmount = totalCents / 100;
+ }
+
return {
products: filteredProducts,
subscriptions: subscriptions.data,
+ hobbyProductId: HOBBY_PRODUCT_ID || undefined,
+ startupProductId: STARTUP_PRODUCT_ID || undefined,
+ currentPlan: currentPlan as "legacy" | "hobby" | "startup" | null,
+ isAnnualCurrent,
+ currentPriceAmount,
};
}),
createCheckoutSession: adminProcedure
.input(
- z.object({
- productId: z.string(),
- serverQuantity: z.number().min(1),
- isAnnual: z.boolean(),
- }),
+ z
+ .object({
+ tier: z.enum(["legacy", "hobby", "startup"]),
+ productId: z.string(),
+ serverQuantity: z.number().min(1),
+ isAnnual: z.boolean(),
+ })
+ .refine((data) => data.tier !== "startup" || data.serverQuantity >= 3, {
+ message: "Startup plan requires at least 3 servers",
+ path: ["serverQuantity"],
+ }),
)
.mutation(async ({ ctx, input }) => {
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
apiVersion: "2024-09-30.acacia",
});
- const items = getStripeItems(input.serverQuantity, input.isAnnual);
+ const items = getStripeItems(
+ input.tier as BillingTier,
+ input.serverQuantity,
+ input.isAnnual,
+ );
// Always operate on the organization owner's Stripe customer
const owner = await findUserById(ctx.user.ownerId);
@@ -129,16 +247,90 @@ export const stripeRouter = createTRPCRouter({
}
}),
- canCreateMoreServers: adminProcedure.query(async ({ ctx }) => {
- const user = await findUserById(ctx.user.ownerId);
- const servers = await findServersByUserId(user.id);
+ upgradeSubscription: adminProcedure
+ .input(
+ z
+ .object({
+ tier: z.enum(["hobby", "startup"]),
+ serverQuantity: z.number().min(1),
+ isAnnual: z.boolean(),
+ })
+ .refine((data) => data.tier !== "startup" || data.serverQuantity >= 3, {
+ message: "Startup plan requires at least 3 servers",
+ path: ["serverQuantity"],
+ }),
+ )
+ .mutation(async ({ ctx, input }) => {
+ const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
+ apiVersion: "2024-09-30.acacia",
+ });
+ const owner = await findUserById(ctx.user.ownerId);
- if (!IS_CLOUD) {
- return true;
- }
+ if (!owner.stripeSubscriptionId) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "No active subscription found",
+ });
+ }
- return servers.length < user.serversQuantity;
- }),
+ const subscription = await stripe.subscriptions.retrieve(
+ owner.stripeSubscriptionId,
+ { expand: ["items.data.price"] },
+ );
+
+ if (subscription.status !== "active") {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "Subscription is not active",
+ });
+ }
+
+ const newItems = getStripeItems(
+ input.tier as BillingTier,
+ input.serverQuantity,
+ input.isAnnual,
+ );
+ const currentItems = subscription.items.data;
+
+ const updateItems: Stripe.SubscriptionUpdateParams["items"] =
+ currentItems.map((item, i) => {
+ if (i < newItems.length) {
+ return {
+ id: item.id,
+ price: newItems[i]!.price,
+ quantity: newItems[i]!.quantity,
+ };
+ }
+ return { id: item.id, deleted: true };
+ });
+
+ for (let i = currentItems.length; i < newItems.length; i++) {
+ updateItems.push({
+ price: newItems[i]!.price,
+ quantity: newItems[i]!.quantity,
+ });
+ }
+
+ await stripe.subscriptions.update(owner.stripeSubscriptionId, {
+ items: updateItems,
+ proration_behavior: "create_prorations",
+ });
+
+ return { ok: true };
+ }),
+
+ canCreateMoreServers: withPermission("server", "create").query(
+ async ({ ctx }) => {
+ const user = await findUserById(ctx.user.ownerId);
+ const servers = await findServersByUserId(user.id);
+
+ if (!IS_CLOUD) {
+ return true;
+ }
+
+ return servers.length < user.serversQuantity;
+ },
+ ),
getInvoices: adminProcedure.query(async ({ ctx }) => {
const user = await findUserById(ctx.user.ownerId);
diff --git a/apps/dokploy/server/api/routers/swarm.ts b/apps/dokploy/server/api/routers/swarm.ts
index cd3b042e9..c5ad7656e 100644
--- a/apps/dokploy/server/api/routers/swarm.ts
+++ b/apps/dokploy/server/api/routers/swarm.ts
@@ -1,58 +1,38 @@
import {
- findServerById,
getApplicationInfo,
getNodeApplications,
getNodeInfo,
getSwarmNodes,
} from "@dokploy/server";
-import { TRPCError } from "@trpc/server";
import { z } from "zod";
-import { createTRPCRouter, protectedProcedure } from "../trpc";
+import { createTRPCRouter, withPermission } from "../trpc";
import { containerIdRegex } from "./docker";
export const swarmRouter = createTRPCRouter({
- getNodes: protectedProcedure
+ getNodes: withPermission("server", "read")
.input(
z.object({
serverId: z.string().optional(),
}),
)
- .query(async ({ input, ctx }) => {
- if (input.serverId) {
- const server = await findServerById(input.serverId);
- if (server.organizationId !== ctx.session?.activeOrganizationId) {
- throw new TRPCError({ code: "UNAUTHORIZED" });
- }
- }
+ .query(async ({ input }) => {
return await getSwarmNodes(input.serverId);
}),
- getNodeInfo: protectedProcedure
+ getNodeInfo: withPermission("server", "read")
.input(z.object({ nodeId: z.string(), serverId: z.string().optional() }))
- .query(async ({ input, ctx }) => {
- if (input.serverId) {
- const server = await findServerById(input.serverId);
- if (server.organizationId !== ctx.session?.activeOrganizationId) {
- throw new TRPCError({ code: "UNAUTHORIZED" });
- }
- }
+ .query(async ({ input }) => {
return await getNodeInfo(input.nodeId, input.serverId);
}),
- getNodeApps: protectedProcedure
+ getNodeApps: withPermission("server", "read")
.input(
z.object({
serverId: z.string().optional(),
}),
)
- .query(async ({ input, ctx }) => {
- if (input.serverId) {
- const server = await findServerById(input.serverId);
- if (server.organizationId !== ctx.session?.activeOrganizationId) {
- throw new TRPCError({ code: "UNAUTHORIZED" });
- }
- }
+ .query(async ({ input }) => {
return getNodeApplications(input.serverId);
}),
- getAppInfos: protectedProcedure
+ getAppInfos: withPermission("server", "read")
.meta({
openapi: {
path: "/drop-deployment",
@@ -71,13 +51,7 @@ export const swarmRouter = createTRPCRouter({
serverId: z.string().optional(),
}),
)
- .query(async ({ input, ctx }) => {
- if (input.serverId) {
- const server = await findServerById(input.serverId);
- if (server.organizationId !== ctx.session?.activeOrganizationId) {
- throw new TRPCError({ code: "UNAUTHORIZED" });
- }
- }
+ .query(async ({ input }) => {
return await getApplicationInfo(input.appName, input.serverId);
}),
});
diff --git a/apps/dokploy/server/api/routers/user.ts b/apps/dokploy/server/api/routers/user.ts
index 3f217ceed..feafa8b58 100644
--- a/apps/dokploy/server/api/routers/user.ts
+++ b/apps/dokploy/server/api/routers/user.ts
@@ -22,15 +22,21 @@ import {
invitation,
member,
} from "@dokploy/server/db/schema";
+import {
+ hasPermission,
+ resolvePermissions,
+} from "@dokploy/server/services/permission";
import { TRPCError } from "@trpc/server";
import * as bcrypt from "bcrypt";
import { and, asc, eq, gt } from "drizzle-orm";
import { z } from "zod";
+import { audit } from "@/server/api/utils/audit";
import {
adminProcedure,
createTRPCRouter,
protectedProcedure,
publicProcedure,
+ withPermission,
} from "../trpc";
const apiCreateApiKey = z.object({
@@ -51,7 +57,7 @@ const apiCreateApiKey = z.object({
});
export const userRouter = createTRPCRouter({
- all: adminProcedure.query(async ({ ctx }) => {
+ all: withPermission("member", "read").query(async ({ ctx }) => {
return await db.query.member.findMany({
where: eq(member.organizationId, ctx.session.activeOrganizationId),
with: {
@@ -87,20 +93,37 @@ export const userRouter = createTRPCRouter({
// Allow access if:
// 1. User is requesting their own information
- // 2. User has owner role (admin permissions) AND user is in the same organization
+ // 2. User is owner/admin
+ // 3. User has member.update permission (custom roles managing permissions)
if (
memberResult.userId !== ctx.user.id &&
ctx.user.role !== "owner" &&
ctx.user.role !== "admin"
) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not authorized to access this user",
- });
+ const canUpdate = await hasPermission(ctx, { member: ["update"] });
+ if (!canUpdate) {
+ throw new TRPCError({
+ code: "UNAUTHORIZED",
+ message: "You are not authorized to access this user",
+ });
+ }
}
return memberResult;
}),
+ session: publicProcedure.query(async ({ ctx }) => {
+ if (!ctx.user || !ctx.session || !ctx.session.activeOrganizationId) {
+ return null;
+ }
+ return {
+ user: {
+ id: ctx.user.id,
+ },
+ session: {
+ activeOrganizationId: ctx.session.activeOrganizationId,
+ },
+ };
+ }),
get: protectedProcedure.query(async ({ ctx }) => {
const memberResult = await db.query.member.findFirst({
where: and(
@@ -118,6 +141,9 @@ export const userRouter = createTRPCRouter({
return memberResult;
}),
+ getPermissions: protectedProcedure.query(async ({ ctx }) => {
+ return resolvePermissions(ctx);
+ }),
haveRootAccess: protectedProcedure.query(async ({ ctx }) => {
if (!IS_CLOUD) {
return false;
@@ -153,19 +179,21 @@ export const userRouter = createTRPCRouter({
return memberResult?.user;
}),
- getServerMetrics: protectedProcedure.query(async ({ ctx }) => {
- const memberResult = await db.query.member.findFirst({
- where: and(
- eq(member.userId, ctx.user.id),
- eq(member.organizationId, ctx.session?.activeOrganizationId || ""),
- ),
- with: {
- user: true,
- },
- });
+ getServerMetrics: withPermission("monitoring", "read").query(
+ async ({ ctx }) => {
+ const memberResult = await db.query.member.findFirst({
+ where: and(
+ eq(member.userId, ctx.user.id),
+ eq(member.organizationId, ctx.session?.activeOrganizationId || ""),
+ ),
+ with: {
+ user: true,
+ },
+ });
- return memberResult?.user;
- }),
+ return memberResult?.user;
+ },
+ ),
update: protectedProcedure
.input(apiUpdateUser)
.mutation(async ({ input, ctx }) => {
@@ -200,7 +228,14 @@ export const userRouter = createTRPCRouter({
}
try {
- return await updateUser(ctx.user.id, input);
+ const result = await updateUser(ctx.user.id, input);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "user",
+ resourceId: ctx.user.id,
+ resourceName: ctx.user.email,
+ });
+ return result;
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -214,15 +249,17 @@ export const userRouter = createTRPCRouter({
.query(async ({ input }) => {
return await getUserByToken(input.token);
}),
- getMetricsToken: protectedProcedure.query(async ({ ctx }) => {
- const user = await findUserById(ctx.user.ownerId);
- const settings = await getWebServerSettings();
- return {
- serverIp: settings?.serverIp,
- enabledFeatures: user.enablePaidFeatures,
- metricsConfig: settings?.metricsConfig,
- };
- }),
+ getMetricsToken: withPermission("monitoring", "read").query(
+ async ({ ctx }) => {
+ const user = await findUserById(ctx.user.ownerId);
+ const settings = await getWebServerSettings();
+ return {
+ serverIp: settings?.serverIp,
+ enabledFeatures: user.enablePaidFeatures,
+ metricsConfig: settings?.metricsConfig,
+ };
+ },
+ ),
remove: protectedProcedure
.input(
z.object({
@@ -284,9 +321,15 @@ export const userRouter = createTRPCRouter({
});
}
- return await removeUserById(input.userId);
+ const result = await removeUserById(input.userId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "user",
+ resourceId: input.userId,
+ });
+ return result;
}),
- assignPermissions: adminProcedure
+ assignPermissions: withPermission("member", "update")
.input(apiAssignPermissions)
.mutation(async ({ input, ctx }) => {
try {
@@ -317,6 +360,12 @@ export const userRouter = createTRPCRouter({
),
),
);
+ await audit(ctx, {
+ action: "update",
+ resourceType: "user",
+ resourceId: input.id,
+ metadata: { permissions: rest },
+ });
} catch (error) {
throw error;
}
@@ -334,7 +383,7 @@ export const userRouter = createTRPCRouter({
});
}),
- getContainerMetrics: protectedProcedure
+ getContainerMetrics: withPermission("monitoring", "read")
.input(
z.object({
url: z.string(),
@@ -416,7 +465,7 @@ export const userRouter = createTRPCRouter({
});
}
- if (apiKeyToDelete.userId !== ctx.user.id) {
+ if (apiKeyToDelete.referenceId !== ctx.user.id) {
throw new TRPCError({
code: "UNAUTHORIZED",
message: "You are not authorized to delete this API key",
@@ -424,6 +473,12 @@ export const userRouter = createTRPCRouter({
}
await db.delete(apikey).where(eq(apikey.id, input.apiKeyId));
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "user",
+ resourceId: input.apiKeyId,
+ resourceName: apiKeyToDelete.name || undefined,
+ });
return true;
} catch (error) {
throw error;
@@ -451,6 +506,12 @@ export const userRouter = createTRPCRouter({
}
const apiKey = await createApiKey(ctx.user.id, input);
+ await audit(ctx, {
+ action: "create",
+ resourceType: "user",
+ resourceId: apiKey.id,
+ resourceName: input.name,
+ });
return apiKey;
}),
@@ -495,7 +556,7 @@ export const userRouter = createTRPCRouter({
return organizations.length;
}),
- sendInvitation: adminProcedure
+ sendInvitation: withPermission("member", "create")
.input(
z.object({
invitationId: z.string().min(1),
@@ -561,6 +622,13 @@ export const userRouter = createTRPCRouter({
console.log(error);
throw error;
}
+ await audit(ctx, {
+ action: "create",
+ resourceType: "user",
+ resourceId: input.invitationId,
+ resourceName: currentInvitation?.email || "",
+ metadata: { type: "sendInvitation" },
+ });
return inviteLink;
}),
});
diff --git a/apps/dokploy/server/api/routers/volume-backups.ts b/apps/dokploy/server/api/routers/volume-backups.ts
index de147a8bf..f9675456b 100644
--- a/apps/dokploy/server/api/routers/volume-backups.ts
+++ b/apps/dokploy/server/api/routers/volume-backups.ts
@@ -23,8 +23,10 @@ import { TRPCError } from "@trpc/server";
import { observable } from "@trpc/server/observable";
import { desc, eq } from "drizzle-orm";
import { z } from "zod";
+import { audit } from "@/server/api/utils/audit";
import { removeJob, schedule, updateJob } from "@/server/utils/backup";
-import { createTRPCRouter, protectedProcedure } from "../trpc";
+import { checkServicePermissionAndAccess } from "@dokploy/server/services/permission";
+import { createTRPCRouter, protectedProcedure, withPermission } from "../trpc";
export const volumeBackupsRouter = createTRPCRouter({
list: protectedProcedure
@@ -42,7 +44,10 @@ export const volumeBackupsRouter = createTRPCRouter({
]),
}),
)
- .query(async ({ input }) => {
+ .query(async ({ input, ctx }) => {
+ await checkServicePermissionAndAccess(ctx, input.id, {
+ volumeBackup: ["read"],
+ });
return await db.query.volumeBackups.findMany({
where: eq(volumeBackups[`${input.volumeBackupType}Id`], input.id),
with: {
@@ -59,7 +64,20 @@ export const volumeBackupsRouter = createTRPCRouter({
}),
create: protectedProcedure
.input(createVolumeBackupSchema)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
+ const serviceId =
+ input.applicationId ||
+ input.postgresId ||
+ input.mysqlId ||
+ input.mariadbId ||
+ input.mongoId ||
+ input.redisId ||
+ input.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ volumeBackup: ["create"],
+ });
+ }
const newVolumeBackup = await createVolumeBackup(input);
if (newVolumeBackup?.enabled) {
@@ -73,6 +91,11 @@ export const volumeBackupsRouter = createTRPCRouter({
await scheduleVolumeBackup(newVolumeBackup.volumeBackupId);
}
}
+ await audit(ctx, {
+ action: "create",
+ resourceType: "volumeBackup",
+ resourceId: newVolumeBackup?.volumeBackupId,
+ });
return newVolumeBackup;
}),
one: protectedProcedure
@@ -81,8 +104,22 @@ export const volumeBackupsRouter = createTRPCRouter({
volumeBackupId: z.string().min(1),
}),
)
- .query(async ({ input }) => {
- return await findVolumeBackupById(input.volumeBackupId);
+ .query(async ({ input, ctx }) => {
+ const vb = await findVolumeBackupById(input.volumeBackupId);
+ const serviceId =
+ vb.applicationId ||
+ vb.postgresId ||
+ vb.mysqlId ||
+ vb.mariadbId ||
+ vb.mongoId ||
+ vb.redisId ||
+ vb.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ volumeBackup: ["read"],
+ });
+ }
+ return vb;
}),
delete: protectedProcedure
.input(
@@ -90,12 +127,46 @@ export const volumeBackupsRouter = createTRPCRouter({
volumeBackupId: z.string().min(1),
}),
)
- .mutation(async ({ input }) => {
- return await removeVolumeBackup(input.volumeBackupId);
+ .mutation(async ({ input, ctx }) => {
+ const vb = await findVolumeBackupById(input.volumeBackupId);
+ const serviceId =
+ vb.applicationId ||
+ vb.postgresId ||
+ vb.mysqlId ||
+ vb.mariadbId ||
+ vb.mongoId ||
+ vb.redisId ||
+ vb.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ volumeBackup: ["delete"],
+ });
+ }
+ const result = await removeVolumeBackup(input.volumeBackupId);
+ await audit(ctx, {
+ action: "delete",
+ resourceType: "volumeBackup",
+ resourceId: input.volumeBackupId,
+ });
+ return result;
}),
update: protectedProcedure
.input(updateVolumeBackupSchema)
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
+ const existingVb = await findVolumeBackupById(input.volumeBackupId);
+ const serviceId =
+ existingVb.applicationId ||
+ existingVb.postgresId ||
+ existingVb.mysqlId ||
+ existingVb.mariadbId ||
+ existingVb.mongoId ||
+ existingVb.redisId ||
+ existingVb.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ volumeBackup: ["update"],
+ });
+ }
const updatedVolumeBackup = await updateVolumeBackup(
input.volumeBackupId,
input,
@@ -130,20 +201,45 @@ export const volumeBackupsRouter = createTRPCRouter({
removeVolumeBackupJob(updatedVolumeBackup.volumeBackupId);
}
}
+ await audit(ctx, {
+ action: "update",
+ resourceType: "volumeBackup",
+ resourceId: updatedVolumeBackup.volumeBackupId,
+ });
return updatedVolumeBackup;
}),
runManually: protectedProcedure
.input(z.object({ volumeBackupId: z.string().min(1) }))
- .mutation(async ({ input }) => {
+ .mutation(async ({ input, ctx }) => {
+ const vb = await findVolumeBackupById(input.volumeBackupId);
+ const serviceId =
+ vb.applicationId ||
+ vb.postgresId ||
+ vb.mysqlId ||
+ vb.mariadbId ||
+ vb.mongoId ||
+ vb.redisId ||
+ vb.composeId;
+ if (serviceId) {
+ await checkServicePermissionAndAccess(ctx, serviceId, {
+ volumeBackup: ["create"],
+ });
+ }
try {
- return await runVolumeBackup(input.volumeBackupId);
+ const result = await runVolumeBackup(input.volumeBackupId);
+ await audit(ctx, {
+ action: "run",
+ resourceType: "volumeBackup",
+ resourceId: input.volumeBackupId,
+ });
+ return result;
} catch (error) {
console.error(error);
return false;
}
}),
- restoreVolumeBackupWithLogs: protectedProcedure
+ restoreVolumeBackupWithLogs: withPermission("volumeBackup", "restore")
.meta({
openapi: {
enabled: false,
diff --git a/apps/dokploy/server/api/trpc.ts b/apps/dokploy/server/api/trpc.ts
index 51f8cdbee..486640349 100644
--- a/apps/dokploy/server/api/trpc.ts
+++ b/apps/dokploy/server/api/trpc.ts
@@ -7,20 +7,21 @@
* need to use are documented accordingly near the end.
*/
+// import { getServerAuthSession } from "@/server/auth";
+import { db } from "@dokploy/server/db";
+import { hasValidLicense } from "@dokploy/server/index";
+import type { statements } from "@dokploy/server/lib/access-control";
import { validateRequest } from "@dokploy/server/lib/auth";
+import { checkPermission } from "@dokploy/server/services/permission";
import type { OpenApiMeta } from "@dokploy/trpc-openapi";
import { initTRPC, TRPCError } from "@trpc/server";
import type { CreateNextContextOptions } from "@trpc/server/adapters/next";
-import {
- experimental_createMemoryUploadHandler,
- experimental_isMultipartFormDataRequest,
- experimental_parseMultipartFormData,
-} from "@trpc/server/adapters/node-http/content-type/form-data";
import type { Session, User } from "better-auth";
import superjson from "superjson";
import { ZodError } from "zod";
-// import { getServerAuthSession } from "@/server/auth";
-import { db } from "@/server/db";
+
+type Resource = keyof typeof statements;
+type ActionOf = (typeof statements)[R][number];
/**
* 1. CONTEXT
@@ -171,24 +172,6 @@ export const protectedProcedure = t.procedure.use(({ ctx, next }) => {
});
});
-export const uploadProcedure = async (opts: any) => {
- if (!experimental_isMultipartFormDataRequest(opts.ctx.req)) {
- return opts.next();
- }
-
- const formData = await experimental_parseMultipartFormData(
- opts.ctx.req,
- experimental_createMemoryUploadHandler({
- // 2GB
- maxPartSize: 1024 * 1024 * 1024 * 2,
- }),
- );
-
- return opts.next({
- rawInput: formData,
- });
-};
-
export const cliProcedure = t.procedure.use(({ ctx, next }) => {
if (
!ctx.session ||
@@ -239,10 +222,11 @@ export const enterpriseProcedure = t.procedure.use(async ({ ctx, next }) => {
throw new TRPCError({ code: "UNAUTHORIZED" });
}
- if (
- !ctx.user?.enableEnterpriseFeatures ||
- !ctx.user.isValidEnterpriseLicense
- ) {
+ const hasValidLicenseResult = await hasValidLicense(
+ ctx.session.activeOrganizationId,
+ );
+
+ if (!hasValidLicenseResult) {
throw new TRPCError({
code: "FORBIDDEN",
message: "Valid enterprise license required",
@@ -256,3 +240,26 @@ export const enterpriseProcedure = t.procedure.use(async ({ ctx, next }) => {
},
});
});
+
+/**
+ * Permission-checked procedure factory.
+ *
+ * Verifies the caller has the required resource+action permission before the
+ * handler runs. Works for all role types:
+ * - owner / admin → always granted (static roles, no license needed)
+ * - member → legacy boolean fields (no license needed)
+ * - custom role → enterprise license verified automatically inside resolveRole
+ *
+ * Usage:
+ * create: withPermission("project", "create")
+ * .input(...)
+ * .mutation(async ({ ctx, input }) => { ... })
+ */
+export const withPermission = (
+ resource: R,
+ action: ActionOf,
+) =>
+ protectedProcedure.use(async ({ ctx, next }) => {
+ await checkPermission(ctx, { [resource]: [action] } as any);
+ return next();
+ });
diff --git a/apps/dokploy/server/api/utils/audit.ts b/apps/dokploy/server/api/utils/audit.ts
new file mode 100644
index 000000000..9f73befbf
--- /dev/null
+++ b/apps/dokploy/server/api/utils/audit.ts
@@ -0,0 +1,31 @@
+import { createAuditLog } from "@dokploy/server/services/proprietary/audit-log";
+import type { AuditAction, AuditResourceType } from "@dokploy/server/db/schema";
+
+interface AuditCtx {
+ user: { id: string; email: string; role: string };
+ session: { activeOrganizationId: string };
+}
+
+interface AuditEvent {
+ action: AuditAction;
+ resourceType: AuditResourceType;
+ resourceId?: string;
+ resourceName?: string;
+ metadata?: Record;
+}
+
+/**
+ * Creates an audit log entry from a tRPC context.
+ * Extracts userId, userEmail, userRole and organizationId automatically.
+ *
+ * Usage:
+ * await audit(ctx, { action: "create", resourceType: "project", resourceName: "my-app" });
+ */
+export const audit = (ctx: AuditCtx, event: AuditEvent) =>
+ createAuditLog({
+ organizationId: ctx.session.activeOrganizationId,
+ userId: ctx.user.id,
+ userEmail: ctx.user.email,
+ userRole: ctx.user.role,
+ ...event,
+ });
diff --git a/apps/dokploy/server/db/index.ts b/apps/dokploy/server/db/index.ts
index 2112c4f67..afc10bedf 100644
--- a/apps/dokploy/server/db/index.ts
+++ b/apps/dokploy/server/db/index.ts
@@ -1,22 +1,38 @@
import { dbUrl } from "@dokploy/server/db/constants";
+import * as schema from "@dokploy/server/db/schema";
+import { and, eq } from "drizzle-orm";
import { drizzle, type PostgresJsDatabase } from "drizzle-orm/postgres-js";
import postgres from "postgres";
-import * as schema from "./schema";
-declare global {
- var db: PostgresJsDatabase | undefined;
-}
+export { and, eq };
+
+type Database = PostgresJsDatabase;
+/**
+ * Evita problemas de redeclaración global en monorepos.
+ * No usamos `declare global`.
+ */
+const globalForDb = globalThis as unknown as {
+ db?: Database;
+};
+
+let dbConnection: Database;
-export let db: PostgresJsDatabase;
if (process.env.NODE_ENV === "production") {
- db = drizzle(postgres(dbUrl!), {
+ // En producción no usamos global cache
+ dbConnection = drizzle(postgres(dbUrl), {
schema,
});
} else {
- if (!global.db)
- global.db = drizzle(postgres(dbUrl!), {
+ // En desarrollo reutilizamos conexión para evitar múltiples conexiones
+ if (!globalForDb.db) {
+ globalForDb.db = drizzle(postgres(dbUrl), {
schema,
});
+ }
- db = global.db;
+ dbConnection = globalForDb.db;
}
+
+export const db: Database = dbConnection;
+
+export { dbUrl };
diff --git a/apps/dokploy/server/utils/deploy.ts b/apps/dokploy/server/utils/deploy.ts
index f4591e3b3..bb429002a 100644
--- a/apps/dokploy/server/utils/deploy.ts
+++ b/apps/dokploy/server/utils/deploy.ts
@@ -50,3 +50,34 @@ export const cancelDeployment = async (cancelData: CancelDeploymentData) => {
throw error;
}
};
+
+export type QueueJobRow = {
+ id: string;
+ name?: string;
+ data: Record;
+ timestamp?: number;
+ processedOn?: number;
+ finishedOn?: number;
+ failedReason?: string;
+ state: string;
+};
+
+export const fetchDeployApiJobs = async (
+ serverId: string,
+): Promise => {
+ try {
+ const res = await fetch(
+ `${process.env.SERVER_URL}/jobs?serverId=${encodeURIComponent(serverId)}`,
+ {
+ headers: {
+ "Content-Type": "application/json",
+ "X-API-Key": process.env.API_KEY || "NO-DEFINED",
+ },
+ },
+ );
+ if (!res.ok) return [];
+ return (await res.json()) as QueueJobRow[];
+ } catch {
+ return [];
+ }
+};
diff --git a/apps/dokploy/server/utils/stripe.ts b/apps/dokploy/server/utils/stripe.ts
index 8d1aebb29..078885a98 100644
--- a/apps/dokploy/server/utils/stripe.ts
+++ b/apps/dokploy/server/utils/stripe.ts
@@ -3,28 +3,69 @@ export const WEBSITE_URL =
? "http://localhost:3000"
: process.env.SITE_URL;
-export const BASE_PRICE_MONTHLY_ID = process.env.BASE_PRICE_MONTHLY_ID!; // $4.00
-
-export const BASE_ANNUAL_MONTHLY_ID = process.env.BASE_ANNUAL_MONTHLY_ID!; // $7.99
-
+export const BASE_PRICE_MONTHLY_ID = process.env.BASE_PRICE_MONTHLY_ID!;
+export const BASE_ANNUAL_MONTHLY_ID = process.env.BASE_ANNUAL_MONTHLY_ID!;
export const PRODUCT_MONTHLY_ID = process.env.PRODUCT_MONTHLY_ID!;
export const PRODUCT_ANNUAL_ID = process.env.PRODUCT_ANNUAL_ID!;
-export const getStripeItems = (serverQuantity: number, isAnnual: boolean) => {
- const items = [];
+export const LEGACY_PRICE_IDS = [
+ process.env.BASE_PRICE_MONTHLY_ID,
+ process.env.BASE_ANNUAL_MONTHLY_ID,
+].filter(Boolean) as string[];
- if (isAnnual) {
+export const HOBBY_PRODUCT_ID = process.env.HOBBY_PRODUCT_ID ?? "";
+export const HOBBY_PRICE_MONTHLY_ID = process.env.HOBBY_PRICE_MONTHLY_ID ?? "";
+export const HOBBY_PRICE_ANNUAL_ID = process.env.HOBBY_PRICE_ANNUAL_ID ?? "";
+
+export const STARTUP_PRODUCT_ID = process.env.STARTUP_PRODUCT_ID ?? "";
+export const STARTUP_BASE_PRICE_MONTHLY_ID =
+ process.env.STARTUP_BASE_PRICE_MONTHLY_ID ?? "";
+export const STARTUP_BASE_PRICE_ANNUAL_ID =
+ process.env.STARTUP_BASE_PRICE_ANNUAL_ID ?? "";
+
+export type BillingTier = "legacy" | "hobby" | "startup";
+
+export const getStripeItems = (
+ tier: BillingTier,
+ serverQuantity: number,
+ isAnnual: boolean,
+) => {
+ const items: { price: string; quantity: number }[] = [];
+
+ if (tier === "legacy") {
items.push({
- price: BASE_ANNUAL_MONTHLY_ID,
+ price: isAnnual ? BASE_ANNUAL_MONTHLY_ID : BASE_PRICE_MONTHLY_ID,
quantity: serverQuantity,
});
-
return items;
}
+ if (tier === "hobby") {
+ const price = isAnnual
+ ? HOBBY_PRICE_ANNUAL_ID || BASE_ANNUAL_MONTHLY_ID
+ : HOBBY_PRICE_MONTHLY_ID || BASE_PRICE_MONTHLY_ID;
+ items.push({ price, quantity: serverQuantity });
+ return items;
+ }
+
+ // Startup: base incluye 3 servidores; del 4º en adelante = precio Hobby ($4.50 c/u)
+ if (tier === "startup") {
+ const basePrice = isAnnual
+ ? STARTUP_BASE_PRICE_ANNUAL_ID
+ : STARTUP_BASE_PRICE_MONTHLY_ID;
+ const extraServerPrice = isAnnual
+ ? HOBBY_PRICE_ANNUAL_ID || BASE_ANNUAL_MONTHLY_ID
+ : HOBBY_PRICE_MONTHLY_ID || BASE_PRICE_MONTHLY_ID;
+ if (basePrice) items.push({ price: basePrice, quantity: 1 });
+ const extraQty = Math.max(0, serverQuantity - 3);
+ if (extraQty > 0)
+ items.push({ price: extraServerPrice, quantity: extraQty });
+ return items;
+ }
+
+ // Fallback legacy
items.push({
- price: BASE_PRICE_MONTHLY_ID,
+ price: isAnnual ? BASE_ANNUAL_MONTHLY_ID : BASE_PRICE_MONTHLY_ID,
quantity: serverQuantity,
});
-
return items;
};
diff --git a/apps/dokploy/server/wss/docker-container-logs.ts b/apps/dokploy/server/wss/docker-container-logs.ts
index c3f902475..159bedaae 100644
--- a/apps/dokploy/server/wss/docker-container-logs.ts
+++ b/apps/dokploy/server/wss/docker-container-logs.ts
@@ -3,7 +3,13 @@ import { findServerById, IS_CLOUD, validateRequest } from "@dokploy/server";
import { spawn } from "node-pty";
import { Client } from "ssh2";
import { WebSocketServer } from "ws";
-import { getShell, isValidContainerId } from "./utils";
+import {
+ getShell,
+ isValidContainerId,
+ isValidSearch,
+ isValidSince,
+ isValidTail,
+} from "./utils";
export const setupDockerContainerLogsWebSocketServer = (
server: http.Server,
@@ -30,9 +36,9 @@ export const setupDockerContainerLogsWebSocketServer = (
wssTerm.on("connection", async (ws, req) => {
const url = new URL(req.url || "", `http://${req.headers.host}`);
const containerId = url.searchParams.get("containerId");
- const tail = url.searchParams.get("tail");
- const search = url.searchParams.get("search");
- const since = url.searchParams.get("since");
+ const tail = url.searchParams.get("tail") ?? "100";
+ const search = url.searchParams.get("search") ?? "";
+ const since = url.searchParams.get("since") ?? "all";
const serverId = url.searchParams.get("serverId");
const runType = url.searchParams.get("runType");
const { user, session } = await validateRequest(req);
@@ -48,6 +54,21 @@ export const setupDockerContainerLogsWebSocketServer = (
return;
}
+ if (!isValidTail(tail)) {
+ ws.close(4000, "Invalid tail parameter");
+ return;
+ }
+
+ if (!isValidSince(since)) {
+ ws.close(4000, "Invalid since parameter");
+ return;
+ }
+
+ if (search !== "" && !isValidSearch(search)) {
+ ws.close(4000, "Invalid search parameter");
+ return;
+ }
+
if (!user || !session) {
ws.close();
return;
diff --git a/apps/dokploy/server/wss/listen-deployment.ts b/apps/dokploy/server/wss/listen-deployment.ts
index 99de9949d..c39fa70b7 100644
--- a/apps/dokploy/server/wss/listen-deployment.ts
+++ b/apps/dokploy/server/wss/listen-deployment.ts
@@ -1,9 +1,9 @@
import { spawn } from "node:child_process";
import type http from "node:http";
import { findServerById, IS_CLOUD, validateRequest } from "@dokploy/server";
+import { readValidDirectory } from "@dokploy/server/wss/utils";
import { Client } from "ssh2";
import { WebSocketServer } from "ws";
-import { readValidDirectory } from "./utils";
export const setupDeploymentLogsWebSocketServer = (
server: http.Server,
diff --git a/apps/dokploy/server/wss/utils.ts b/apps/dokploy/server/wss/utils.ts
index 651269c13..346093e1b 100644
--- a/apps/dokploy/server/wss/utils.ts
+++ b/apps/dokploy/server/wss/utils.ts
@@ -15,6 +15,37 @@ export const isValidContainerId = (id: string): boolean => {
return hexPattern.test(id) || (namePattern.test(id) && id.length <= 128);
};
+/**
+ * Validates the `tail` parameter for docker logs (number of lines, max 10000).
+ * Prevents command injection by allowing only digits.
+ */
+export const isValidTail = (tail: string): boolean => {
+ return (
+ /^\d+$/.test(tail) &&
+ Number.parseInt(tail, 10) <= 10000 &&
+ Number.parseInt(tail, 10) >= 0
+ );
+};
+
+/**
+ * Validates the `since` parameter for docker logs: "all" or duration like 5s, 10m, 1h, 2d.
+ * Prevents command injection by allowing only a strict format.
+ */
+export const isValidSince = (since: string): boolean => {
+ return since === "all" || /^\d+[smhd]$/.test(since);
+};
+
+/**
+ * Validates the `search` parameter for log filtering.
+ * Search is concatenated into shell commands (SSH path: double quotes; local path: single quotes).
+ * Only allow alphanumeric, space, dot, underscore, hyphen to prevent $, `, ', " from enabling command injection.
+ * Max length 500.
+ */
+export const isValidSearch = (search: string): boolean => {
+ // Space only (not \s) to reject \n, \r, \t and other control chars
+ return /^[a-zA-Z0-9 ._-]{0,500}$/.test(search);
+};
+
/**
* Validates that the shell is one of the allowed shells.
*/
@@ -32,20 +63,6 @@ export const isValidShell = (shell: string): boolean => {
return allowedShells.includes(shell);
};
-export const readValidDirectory = (
- directory: string,
- serverId?: string | null,
-) => {
- const { BASE_PATH } = paths(!!serverId);
-
- const resolvedBase = path.resolve(BASE_PATH);
- const resolvedDir = path.resolve(directory);
-
- return (
- resolvedDir === resolvedBase ||
- resolvedDir.startsWith(resolvedBase + path.sep)
- );
-};
export const getShell = () => {
if (IS_CLOUD) {
return "NO_AVAILABLE";
diff --git a/apps/dokploy/setup.ts b/apps/dokploy/setup.ts
index dc0c0847f..0f993e14a 100644
--- a/apps/dokploy/setup.ts
+++ b/apps/dokploy/setup.ts
@@ -1,8 +1,9 @@
-import { exit } from "node:process";
import { exec } from "node:child_process";
+import { exit } from "node:process";
import { promisify } from "node:util";
const execAsync = promisify(exec);
+
import { setupDirectories } from "@dokploy/server/setup/config-paths";
import { initializePostgres } from "@dokploy/server/setup/postgres-setup";
import { initializeRedis } from "@dokploy/server/setup/redis-setup";
diff --git a/apps/dokploy/tsconfig.json b/apps/dokploy/tsconfig.json
index 9f664e78a..de0d647d2 100644
--- a/apps/dokploy/tsconfig.json
+++ b/apps/dokploy/tsconfig.json
@@ -39,8 +39,7 @@
"**/*.js",
".next/types/**/*.ts",
"env.js",
- "next.config.mjs",
- "next-i18next.config.mjs"
+ "next.config.mjs"
],
"exclude": [
"node_modules",
diff --git a/apps/dokploy/utils/api.ts b/apps/dokploy/utils/api.ts
index ff5703cee..d7f165f6a 100644
--- a/apps/dokploy/utils/api.ts
+++ b/apps/dokploy/utils/api.ts
@@ -1,14 +1,7 @@
-/**
- * This is the client-side entrypoint for your tRPC API. It is used to create the `api` object which
- * contains the Next.js App-wrapper, as well as your type-safe React Query hooks.
- *
- * We also create a few inference helpers for input and output types.
- */
-
import {
createWSClient,
- experimental_formDataLink,
httpBatchLink,
+ httpLink,
splitLink,
wsLink,
} from "@trpc/client";
@@ -18,8 +11,8 @@ import superjson from "superjson";
import type { AppRouter } from "@/server/api/root";
const getBaseUrl = () => {
- if (typeof window !== "undefined") return ""; // browser should use relative url
- return `http://localhost:${process.env.PORT ?? 3000}`; // dev SSR should use localhost
+ if (typeof window !== "undefined") return "";
+ return `http://localhost:${process.env.PORT ?? 3000}`;
};
const getWsUrl = () => {
@@ -31,95 +24,60 @@ const getWsUrl = () => {
return `${protocol}${host}/drawer-logs`;
};
-// Create WebSocket client with delayed connection
-const createLazyWSClient = () => {
+let wsClientSingleton: ReturnType | null = null;
+
+const getOrCreateWSClient = () => {
if (typeof window === "undefined") return null;
- let actualClient: ReturnType | null = null;
+ if (!wsClientSingleton) {
+ wsClientSingleton = createWSClient({
+ url: getWsUrl()!,
+ lazy: { enabled: true, closeMs: 3000 },
+ retryDelayMs: () => 3000,
+ });
+ }
- return {
- request: (op: any, callbacks: any) => {
- if (!actualClient) {
- const wsUrl = getWsUrl();
- if (wsUrl) {
- actualClient = createWSClient({ url: wsUrl });
- }
- }
- return actualClient?.request(op, callbacks) || (() => {});
- },
- close: () => {
- if (actualClient) {
- actualClient.close();
- actualClient = null;
- }
- },
- getConnection: () => {
- if (!actualClient) {
- const wsUrl = getWsUrl();
- if (wsUrl) {
- actualClient = createWSClient({ url: wsUrl });
- }
- }
- return actualClient!.getConnection();
- },
- };
+ return wsClientSingleton;
};
-const wsClient = createLazyWSClient();
+const wsClient = getOrCreateWSClient();
-/** A set of type-safe react-query hooks for your tRPC API. */
-export const api = createTRPCNext({
- config() {
- return {
- /**
- * Transformer used for data de-serialization from the server.
- *
- * @see https://trpc.io/docs/data-transformers
- */
- transformer: superjson,
-
- /**
- * Links used to determine request flow from client to server.
- *
- * @see https://trpc.io/docs/links
- */
- links: [
+const links =
+ typeof window !== "undefined"
+ ? [
splitLink({
condition: (op) => op.type === "subscription",
true: wsLink({
client: wsClient!,
+ transformer: superjson,
}),
false: splitLink({
condition: (op) => op.input instanceof FormData,
- true: experimental_formDataLink({
+ true: httpLink({
url: `${getBaseUrl()}/api/trpc`,
+ transformer: superjson,
}),
false: httpBatchLink({
url: `${getBaseUrl()}/api/trpc`,
+ transformer: superjson,
}),
}),
}),
- ],
- };
+ ]
+ : [
+ httpBatchLink({
+ url: `${getBaseUrl()}/api/trpc`,
+ transformer: superjson,
+ }),
+ ];
+
+export const api = createTRPCNext({
+ config() {
+ return { links };
},
- /**
- * Whether tRPC should await queries when server rendering pages.
- *
- * @see https://trpc.io/docs/nextjs#ssr-boolean-default-false
- */
ssr: false,
+ transformer: superjson,
});
-/**
- * Inference helper for inputs.
- *
- * @example type HelloInput = RouterInputs['example']['hello']
- */
export type RouterInputs = inferRouterInputs;
-
-/**
- * Inference helper for outputs.
- *
- * @example type HelloOutput = RouterOutputs['example']['hello']
- */
export type RouterOutputs = inferRouterOutputs;
diff --git a/apps/dokploy/utils/hooks/use-locale.ts b/apps/dokploy/utils/hooks/use-locale.ts
deleted file mode 100644
index 0d6ac9b55..000000000
--- a/apps/dokploy/utils/hooks/use-locale.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import Cookies from "js-cookie";
-import type { LanguageCode } from "@/lib/languages";
-
-export default function useLocale() {
- const currentLocale = (Cookies.get("DOKPLOY_LOCALE") ?? "en") as LanguageCode;
-
- const setLocale = (locale: LanguageCode) => {
- Cookies.set("DOKPLOY_LOCALE", locale, { expires: 365 });
- window.location.reload();
- };
-
- return {
- locale: currentLocale,
- setLocale,
- };
-}
diff --git a/apps/dokploy/utils/hooks/use-whitelabeling.ts b/apps/dokploy/utils/hooks/use-whitelabeling.ts
new file mode 100644
index 000000000..0970f04f9
--- /dev/null
+++ b/apps/dokploy/utils/hooks/use-whitelabeling.ts
@@ -0,0 +1,25 @@
+import { api } from "@/utils/api";
+
+/**
+ * Hook to access whitelabeling config for authenticated pages (dashboard, services, etc.).
+ * Requires the user to be logged in.
+ */
+export function useWhitelabeling() {
+ const { data, ...rest } = api.whitelabeling.get.useQuery(undefined, {
+ staleTime: 5 * 60 * 1000,
+ refetchOnWindowFocus: false,
+ });
+ return { config: data ?? null, ...rest };
+}
+
+/**
+ * Hook to access the public whitelabeling config.
+ * Only for unauthenticated pages (login, register, error, invitation, password reset).
+ */
+export function useWhitelabelingPublic() {
+ const { data, ...rest } = api.whitelabeling.getPublic.useQuery(undefined, {
+ staleTime: 5 * 60 * 1000,
+ refetchOnWindowFocus: false,
+ });
+ return { config: data ?? null, ...rest };
+}
diff --git a/apps/dokploy/utils/i18n.ts b/apps/dokploy/utils/i18n.ts
deleted file mode 100644
index c56673d28..000000000
--- a/apps/dokploy/utils/i18n.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import type { NextApiRequestCookies } from "next/dist/server/api-utils";
-
-export function getLocale(cookies: NextApiRequestCookies) {
- const locale = cookies.DOKPLOY_LOCALE ?? "en";
- return locale;
-}
-
-import { serverSideTranslations as originalServerSideTranslations } from "next-i18next/serverSideTranslations";
-import { Languages } from "@/lib/languages";
-
-export const serverSideTranslations = (
- locale: string,
- namespaces = ["common"],
-) =>
- originalServerSideTranslations(locale, namespaces, {
- fallbackLng: "en",
- keySeparator: false,
- i18n: {
- defaultLocale: "en",
- locales: Object.values(Languages).map((language) => language.code),
- localeDetection: false,
- },
- });
diff --git a/apps/monitoring/database/containers.go b/apps/monitoring/database/containers.go
index 4e41f5fae..43ff468a6 100644
--- a/apps/monitoring/database/containers.go
+++ b/apps/monitoring/database/containers.go
@@ -48,23 +48,19 @@ func (db *DB) SaveContainerMetric(metric *ContainerMetric) error {
}
func (db *DB) GetLastNContainerMetrics(containerName string, limit int) ([]ContainerMetric, error) {
- name := strings.TrimPrefix(containerName, "/")
- parts := strings.Split(name, "-")
- if len(parts) > 1 {
- containerName = strings.Join(parts[:len(parts)-1], "-")
- }
+ containerName = strings.TrimPrefix(containerName, "/")
query := `
WITH recent_metrics AS (
SELECT metrics_json
FROM container_metrics
- WHERE container_name = ?
+ WHERE container_name = ? OR container_name LIKE ?
ORDER BY timestamp DESC
LIMIT ?
)
SELECT metrics_json FROM recent_metrics ORDER BY json_extract(metrics_json, '$.timestamp') ASC
`
- rows, err := db.Query(query, containerName, limit)
+ rows, err := db.Query(query, containerName, containerName+".%", limit)
if err != nil {
return nil, err
}
@@ -88,22 +84,18 @@ func (db *DB) GetLastNContainerMetrics(containerName string, limit int) ([]Conta
}
func (db *DB) GetAllMetricsContainer(containerName string) ([]ContainerMetric, error) {
- name := strings.TrimPrefix(containerName, "/")
- parts := strings.Split(name, "-")
- if len(parts) > 1 {
- containerName = strings.Join(parts[:len(parts)-1], "-")
- }
+ containerName = strings.TrimPrefix(containerName, "/")
query := `
WITH recent_metrics AS (
SELECT metrics_json
FROM container_metrics
- WHERE container_name = ?
+ WHERE container_name = ? OR container_name LIKE ?
ORDER BY timestamp DESC
)
SELECT metrics_json FROM recent_metrics ORDER BY json_extract(metrics_json, '$.timestamp') ASC
`
- rows, err := db.Query(query, containerName)
+ rows, err := db.Query(query, containerName, containerName+".%")
if err != nil {
return nil, err
}
diff --git a/apps/schedules/package.json b/apps/schedules/package.json
index 620b73f92..681758cb2 100644
--- a/apps/schedules/package.json
+++ b/apps/schedules/package.json
@@ -3,35 +3,36 @@
"type": "module",
"scripts": {
"dev": "PORT=4001 tsx watch src/index.ts",
- "build": "tsc --project tsconfig.json",
+ "build": "rimraf dist && tsc --project tsconfig.build.json",
"start": "node dist/index.js",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@dokploy/server": "workspace:*",
"@hono/node-server": "^1.14.3",
- "@hono/zod-validator": "0.3.0",
+ "@hono/zod-validator": "0.7.6",
"bullmq": "5.67.3",
"dotenv": "^16.4.5",
- "drizzle-orm": "^0.41.0",
+ "drizzle-orm": "0.45.1",
"hono": "^4.11.7",
"ioredis": "5.4.1",
"pino": "9.4.0",
"pino-pretty": "11.2.2",
"react": "18.2.0",
"react-dom": "18.2.0",
- "zod": "^3.25.32"
+ "zod": "^4.3.6"
},
"devDependencies": {
- "@types/node": "^20.16.0",
- "@types/react": "^18.3.5",
- "@types/react-dom": "^18.3.0",
+ "rimraf": "6.1.3",
+ "@types/node": "^24.4.0",
+ "@types/react": "^18.2.37",
+ "@types/react-dom": "^18.2.15",
"tsx": "^4.16.2",
"typescript": "^5.8.3"
},
- "packageManager": "pnpm@9.12.0",
+ "packageManager": "pnpm@10.22.0",
"engines": {
- "node": "^20.16.0",
- "pnpm": ">=9.12.0"
+ "node": "^24.4.0",
+ "pnpm": ">=10.22.0"
}
}
diff --git a/apps/schedules/src/utils.ts b/apps/schedules/src/utils.ts
index 30d61d814..f09f79be8 100644
--- a/apps/schedules/src/utils.ts
+++ b/apps/schedules/src/utils.ts
@@ -14,14 +14,15 @@ import {
runPostgresBackup,
runVolumeBackup,
} from "@dokploy/server";
-import { db } from "@dokploy/server/dist/db";
import {
+ and,
backups,
+ db,
+ eq,
schedules,
server,
volumeBackups,
-} from "@dokploy/server/dist/db/schema";
-import { and, eq } from "drizzle-orm";
+} from "@dokploy/server/db";
import { logger } from "./logger.js";
import { scheduleJob } from "./queue.js";
import type { QueueJob } from "./schema.js";
@@ -82,6 +83,7 @@ export const runJobs = async (job: QueueJob) => {
return;
}
await runComposeBackup(compose, backup);
+ await keepLatestNBackups(backup, server.serverId);
}
} else if (job.type === "server") {
const { serverId } = job;
diff --git a/apps/schedules/tsconfig.build.json b/apps/schedules/tsconfig.build.json
new file mode 100644
index 000000000..c3b5c9b27
--- /dev/null
+++ b/apps/schedules/tsconfig.build.json
@@ -0,0 +1,8 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "rootDir": "./src",
+ "paths": {}
+ },
+ "include": ["src/**/*"]
+}
diff --git a/apps/schedules/tsconfig.json b/apps/schedules/tsconfig.json
index 3d4adb168..2aad20dbc 100644
--- a/apps/schedules/tsconfig.json
+++ b/apps/schedules/tsconfig.json
@@ -2,13 +2,17 @@
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
- "moduleResolution": "Node",
+ "moduleResolution": "bundler",
"strict": true,
"skipLibCheck": true,
"outDir": "dist",
"jsx": "react-jsx",
- "jsxImportSource": "hono/jsx",
- "declaration": false
+ "declaration": false,
+ "baseUrl": ".",
+ "paths": {
+ "@dokploy/server/*": ["../../packages/server/src/*"]
+ }
},
- "exclude": ["node_modules", "dist"]
+ "exclude": ["node_modules", "dist"],
+ "include": ["src/**/*"]
}
diff --git a/openapi.json b/openapi.json
index 76366bdb2..bab2a3347 100644
--- a/openapi.json
+++ b/openapi.json
@@ -1,20004 +1,48976 @@
{
- "openapi": "3.0.3",
- "info": {
- "title": "Dokploy API",
- "description": "Complete API documentation for Dokploy - Deploy applications, manage databases, and orchestrate your infrastructure. This API allows you to programmatically manage all aspects of your Dokploy instance.",
- "version": "1.0.0",
- "contact": {
- "name": "Dokploy Team",
- "url": "https://dokploy.com"
- },
- "license": {
- "name": "Apache 2.0",
- "url": "https://github.com/dokploy/dokploy/blob/canary/LICENSE"
- }
- },
- "servers": [
- {
- "url": "https://your-dokploy-instance.com/api"
- }
- ],
- "paths": {
- "/admin.setupMonitoring": {
- "post": {
- "operationId": "admin-setupMonitoring",
- "tags": ["admin"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "metricsConfig": {
- "type": "object",
- "properties": {
- "server": {
- "type": "object",
- "properties": {
- "refreshRate": {
- "type": "number",
- "minimum": 2
- },
- "port": {
- "type": "number",
- "minimum": 1
- },
- "token": {
- "type": "string"
- },
- "urlCallback": {
- "type": "string",
- "format": "uri"
- },
- "retentionDays": {
- "type": "number",
- "minimum": 1
- },
- "cronJob": {
- "type": "string",
- "minLength": 1
- },
- "thresholds": {
- "type": "object",
- "properties": {
- "cpu": {
- "type": "number",
- "minimum": 0
- },
- "memory": {
- "type": "number",
- "minimum": 0
- }
- },
- "required": ["cpu", "memory"],
- "additionalProperties": false
- }
- },
- "required": [
- "refreshRate",
- "port",
- "token",
- "urlCallback",
- "retentionDays",
- "cronJob",
- "thresholds"
- ],
- "additionalProperties": false
- },
- "containers": {
- "type": "object",
- "properties": {
- "refreshRate": {
- "type": "number",
- "minimum": 2
- },
- "services": {
- "type": "object",
- "properties": {
- "include": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "exclude": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false
- }
- },
- "required": ["refreshRate", "services"],
- "additionalProperties": false
- }
- },
- "required": ["server", "containers"],
- "additionalProperties": false
- }
- },
- "required": ["metricsConfig"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/docker.getContainers": {
- "get": {
- "operationId": "docker-getContainers",
- "tags": ["docker"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/docker.restartContainer": {
- "post": {
- "operationId": "docker-restartContainer",
- "tags": ["docker"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "containerId": {
- "type": "string",
- "minLength": 1,
- "pattern": "^[a-zA-Z0-9.\\-_]+$"
- }
- },
- "required": ["containerId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/docker.getConfig": {
- "get": {
- "operationId": "docker-getConfig",
- "tags": ["docker"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "containerId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1,
- "pattern": "^[a-zA-Z0-9.\\-_]+$"
- }
- },
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/docker.getContainersByAppNameMatch": {
- "get": {
- "operationId": "docker-getContainersByAppNameMatch",
- "tags": ["docker"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "appType",
- "in": "query",
- "required": false,
- "schema": {
- "anyOf": [
- {
- "type": "string",
- "enum": ["stack"]
- },
- {
- "type": "string",
- "enum": ["docker-compose"]
- }
- ]
- }
- },
- {
- "name": "appName",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1,
- "pattern": "^[a-zA-Z0-9.\\-_]+$"
- }
- },
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/docker.getContainersByAppLabel": {
- "get": {
- "operationId": "docker-getContainersByAppLabel",
- "tags": ["docker"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "appName",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1,
- "pattern": "^[a-zA-Z0-9.\\-_]+$"
- }
- },
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "type",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "enum": ["standalone", "swarm"]
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/docker.getStackContainersByAppName": {
- "get": {
- "operationId": "docker-getStackContainersByAppName",
- "tags": ["docker"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "appName",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1,
- "pattern": "^[a-zA-Z0-9.\\-_]+$"
- }
- },
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/docker.getServiceContainersByAppName": {
- "get": {
- "operationId": "docker-getServiceContainersByAppName",
- "tags": ["docker"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "appName",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1,
- "pattern": "^[a-zA-Z0-9.\\-_]+$"
- }
- },
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/project.create": {
- "post": {
- "operationId": "project-create",
- "tags": ["project"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "env": {
- "type": "string"
- }
- },
- "required": ["name"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/project.one": {
- "get": {
- "operationId": "project-one",
- "tags": ["project"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "projectId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/project.all": {
- "get": {
- "operationId": "project-all",
- "tags": ["project"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/project.remove": {
- "post": {
- "operationId": "project-remove",
- "tags": ["project"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "projectId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["projectId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/project.update": {
- "post": {
- "operationId": "project-update",
- "tags": ["project"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "projectId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "createdAt": {
- "type": "string"
- },
- "organizationId": {
- "type": "string"
- },
- "env": {
- "type": "string"
- }
- },
- "required": ["projectId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/project.duplicate": {
- "post": {
- "operationId": "project-duplicate",
- "tags": ["project"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "sourceEnvironmentId": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "includeServices": {
- "type": "boolean",
- "default": true
- },
- "selectedServices": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "enum": [
- "application",
- "postgres",
- "mariadb",
- "mongo",
- "mysql",
- "redis",
- "compose"
- ]
- }
- },
- "required": ["id", "type"],
- "additionalProperties": false
- }
- },
- "duplicateInSameProject": {
- "type": "boolean",
- "default": false
- }
- },
- "required": ["sourceEnvironmentId", "name"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.create": {
- "post": {
- "operationId": "application-create",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string"
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "environmentId": {
- "type": "string"
- },
- "serverId": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["name", "environmentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.one": {
- "get": {
- "operationId": "application-one",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "applicationId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.reload": {
- "post": {
- "operationId": "application-reload",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appName": {
- "type": "string"
- },
- "applicationId": {
- "type": "string"
- }
- },
- "required": ["appName", "applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.delete": {
- "post": {
- "operationId": "application-delete",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.stop": {
- "post": {
- "operationId": "application-stop",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.start": {
- "post": {
- "operationId": "application-start",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.redeploy": {
- "post": {
- "operationId": "application-redeploy",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string",
- "minLength": 1
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.saveEnvironment": {
- "post": {
- "operationId": "application-saveEnvironment",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- },
- "env": {
- "type": "string",
- "nullable": true
- },
- "buildArgs": {
- "type": "string",
- "nullable": true
- },
- "buildSecrets": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.saveBuildType": {
- "post": {
- "operationId": "application-saveBuildType",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- },
- "buildType": {
- "type": "string",
- "enum": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "dockerfile": {
- "type": "string",
- "nullable": true
- },
- "dockerContextPath": {
- "type": "string",
- "nullable": true
- },
- "dockerBuildStage": {
- "type": "string",
- "nullable": true
- },
- "herokuVersion": {
- "type": "string",
- "nullable": true
- },
- "railpackVersion": {
- "type": "string",
- "nullable": true
- },
- "publishDirectory": {
- "type": "string",
- "nullable": true
- },
- "isStaticSpa": {
- "type": "boolean",
- "nullable": true
- }
- },
- "required": [
- "applicationId",
- "buildType",
- "dockerContextPath",
- "dockerBuildStage"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.saveGithubProvider": {
- "post": {
- "operationId": "application-saveGithubProvider",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- },
- "repository": {
- "type": "string",
- "nullable": true
- },
- "branch": {
- "type": "string",
- "nullable": true
- },
- "owner": {
- "type": "string",
- "nullable": true
- },
- "buildPath": {
- "type": "string",
- "nullable": true
- },
- "githubId": {
- "type": "string",
- "nullable": true
- },
- "watchPaths": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true
- },
- "enableSubmodules": {
- "type": "boolean"
- },
- "triggerType": {
- "type": "string",
- "enum": ["push", "tag"],
- "default": "push"
- }
- },
- "required": [
- "applicationId",
- "owner",
- "githubId",
- "enableSubmodules"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.saveGitlabProvider": {
- "post": {
- "operationId": "application-saveGitlabProvider",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- },
- "gitlabBranch": {
- "type": "string",
- "nullable": true
- },
- "gitlabBuildPath": {
- "type": "string",
- "nullable": true
- },
- "gitlabOwner": {
- "type": "string",
- "nullable": true
- },
- "gitlabRepository": {
- "type": "string",
- "nullable": true
- },
- "gitlabId": {
- "type": "string",
- "nullable": true
- },
- "gitlabProjectId": {
- "type": "number",
- "nullable": true
- },
- "gitlabPathNamespace": {
- "type": "string",
- "nullable": true
- },
- "watchPaths": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true
- },
- "enableSubmodules": {
- "type": "boolean"
- }
- },
- "required": [
- "applicationId",
- "gitlabBranch",
- "gitlabBuildPath",
- "gitlabOwner",
- "gitlabRepository",
- "gitlabId",
- "gitlabProjectId",
- "gitlabPathNamespace",
- "enableSubmodules"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.saveBitbucketProvider": {
- "post": {
- "operationId": "application-saveBitbucketProvider",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "bitbucketBranch": {
- "type": "string",
- "nullable": true
- },
- "bitbucketBuildPath": {
- "type": "string",
- "nullable": true
- },
- "bitbucketOwner": {
- "type": "string",
- "nullable": true
- },
- "bitbucketRepository": {
- "type": "string",
- "nullable": true
- },
- "bitbucketId": {
- "type": "string",
- "nullable": true
- },
- "applicationId": {
- "type": "string"
- },
- "watchPaths": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true
- },
- "enableSubmodules": {
- "type": "boolean"
- }
- },
- "required": [
- "bitbucketBranch",
- "bitbucketBuildPath",
- "bitbucketOwner",
- "bitbucketRepository",
- "bitbucketId",
- "applicationId",
- "enableSubmodules"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.saveGiteaProvider": {
- "post": {
- "operationId": "application-saveGiteaProvider",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- },
- "giteaBranch": {
- "type": "string",
- "nullable": true
- },
- "giteaBuildPath": {
- "type": "string",
- "nullable": true
- },
- "giteaOwner": {
- "type": "string",
- "nullable": true
- },
- "giteaRepository": {
- "type": "string",
- "nullable": true
- },
- "giteaId": {
- "type": "string",
- "nullable": true
- },
- "watchPaths": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true
- },
- "enableSubmodules": {
- "type": "boolean"
- }
- },
- "required": [
- "applicationId",
- "giteaBranch",
- "giteaBuildPath",
- "giteaOwner",
- "giteaRepository",
- "giteaId",
- "enableSubmodules"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.saveDockerProvider": {
- "post": {
- "operationId": "application-saveDockerProvider",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "dockerImage": {
- "type": "string",
- "nullable": true
- },
- "applicationId": {
- "type": "string"
- },
- "username": {
- "type": "string",
- "nullable": true
- },
- "password": {
- "type": "string",
- "nullable": true
- },
- "registryUrl": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.saveGitProvider": {
- "post": {
- "operationId": "application-saveGitProvider",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "customGitBranch": {
- "type": "string",
- "nullable": true
- },
- "applicationId": {
- "type": "string"
- },
- "customGitBuildPath": {
- "type": "string",
- "nullable": true
- },
- "customGitUrl": {
- "type": "string",
- "nullable": true
- },
- "watchPaths": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true
- },
- "enableSubmodules": {
- "type": "boolean"
- },
- "customGitSSHKeyId": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["applicationId", "enableSubmodules"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.disconnectGitProvider": {
- "post": {
- "operationId": "application-disconnectGitProvider",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.markRunning": {
- "post": {
- "operationId": "application-markRunning",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.update": {
- "post": {
- "operationId": "application-update",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string"
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "env": {
- "type": "string",
- "nullable": true
- },
- "previewEnv": {
- "type": "string",
- "nullable": true
- },
- "watchPaths": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true
- },
- "previewBuildArgs": {
- "type": "string",
- "nullable": true
- },
- "previewBuildSecrets": {
- "type": "string",
- "nullable": true
- },
- "previewLabels": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true
- },
- "previewWildcard": {
- "type": "string",
- "nullable": true
- },
- "previewPort": {
- "type": "number",
- "nullable": true
- },
- "previewHttps": {
- "type": "boolean"
- },
- "previewPath": {
- "type": "string",
- "nullable": true
- },
- "previewCertificateType": {
- "type": "string",
- "enum": ["letsencrypt", "none", "custom"]
- },
- "previewCustomCertResolver": {
- "type": "string",
- "nullable": true
- },
- "previewLimit": {
- "type": "number",
- "nullable": true
- },
- "isPreviewDeploymentsActive": {
- "type": "boolean",
- "nullable": true
- },
- "previewRequireCollaboratorPermissions": {
- "type": "boolean",
- "nullable": true
- },
- "rollbackActive": {
- "type": "boolean",
- "nullable": true
- },
- "buildArgs": {
- "type": "string",
- "nullable": true
- },
- "buildSecrets": {
- "type": "string",
- "nullable": true
- },
- "memoryReservation": {
- "type": "string",
- "nullable": true
- },
- "memoryLimit": {
- "type": "string",
- "nullable": true
- },
- "cpuReservation": {
- "type": "string",
- "nullable": true
- },
- "cpuLimit": {
- "type": "string",
- "nullable": true
- },
- "title": {
- "type": "string",
- "nullable": true
- },
- "enabled": {
- "type": "boolean",
- "nullable": true
- },
- "subtitle": {
- "type": "string",
- "nullable": true
- },
- "command": {
- "type": "string",
- "nullable": true
- },
- "refreshToken": {
- "type": "string",
- "nullable": true
- },
- "sourceType": {
- "type": "string",
- "enum": [
- "github",
- "docker",
- "git",
- "gitlab",
- "bitbucket",
- "gitea",
- "drop"
- ]
- },
- "cleanCache": {
- "type": "boolean",
- "nullable": true
- },
- "repository": {
- "type": "string",
- "nullable": true
- },
- "owner": {
- "type": "string",
- "nullable": true
- },
- "branch": {
- "type": "string",
- "nullable": true
- },
- "buildPath": {
- "type": "string",
- "nullable": true
- },
- "triggerType": {
- "type": "string",
- "enum": ["push", "tag"],
- "nullable": true
- },
- "autoDeploy": {
- "type": "boolean",
- "nullable": true
- },
- "gitlabProjectId": {
- "type": "number",
- "nullable": true
- },
- "gitlabRepository": {
- "type": "string",
- "nullable": true
- },
- "gitlabOwner": {
- "type": "string",
- "nullable": true
- },
- "gitlabBranch": {
- "type": "string",
- "nullable": true
- },
- "gitlabBuildPath": {
- "type": "string",
- "nullable": true
- },
- "gitlabPathNamespace": {
- "type": "string",
- "nullable": true
- },
- "giteaRepository": {
- "type": "string",
- "nullable": true
- },
- "giteaOwner": {
- "type": "string",
- "nullable": true
- },
- "giteaBranch": {
- "type": "string",
- "nullable": true
- },
- "giteaBuildPath": {
- "type": "string",
- "nullable": true
- },
- "bitbucketRepository": {
- "type": "string",
- "nullable": true
- },
- "bitbucketOwner": {
- "type": "string",
- "nullable": true
- },
- "bitbucketBranch": {
- "type": "string",
- "nullable": true
- },
- "bitbucketBuildPath": {
- "type": "string",
- "nullable": true
- },
- "username": {
- "type": "string",
- "nullable": true
- },
- "password": {
- "type": "string",
- "nullable": true
- },
- "dockerImage": {
- "type": "string",
- "nullable": true
- },
- "registryUrl": {
- "type": "string",
- "nullable": true
- },
- "customGitUrl": {
- "type": "string",
- "nullable": true
- },
- "customGitBranch": {
- "type": "string",
- "nullable": true
- },
- "customGitBuildPath": {
- "type": "string",
- "nullable": true
- },
- "customGitSSHKeyId": {
- "type": "string",
- "nullable": true
- },
- "enableSubmodules": {
- "type": "boolean"
- },
- "dockerfile": {
- "type": "string",
- "nullable": true
- },
- "dockerContextPath": {
- "type": "string",
- "nullable": true
- },
- "dockerBuildStage": {
- "type": "string",
- "nullable": true
- },
- "dropBuildPath": {
- "type": "string",
- "nullable": true
- },
- "healthCheckSwarm": {
- "type": "object",
- "properties": {
- "Test": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "Interval": {
- "type": "number"
- },
- "Timeout": {
- "type": "number"
- },
- "StartPeriod": {
- "type": "number"
- },
- "Retries": {
- "type": "number"
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "restartPolicySwarm": {
- "type": "object",
- "properties": {
- "Condition": {
- "type": "string"
- },
- "Delay": {
- "type": "number"
- },
- "MaxAttempts": {
- "type": "number"
- },
- "Window": {
- "type": "number"
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "placementSwarm": {
- "type": "object",
- "properties": {
- "Constraints": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "Preferences": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Spread": {
- "type": "object",
- "properties": {
- "SpreadDescriptor": {
- "type": "string"
- }
- },
- "required": ["SpreadDescriptor"],
- "additionalProperties": false
- }
- },
- "required": ["Spread"],
- "additionalProperties": false
- }
- },
- "MaxReplicas": {
- "type": "number"
- },
- "Platforms": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Architecture": {
- "type": "string"
- },
- "OS": {
- "type": "string"
- }
- },
- "required": ["Architecture", "OS"],
- "additionalProperties": false
- }
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "updateConfigSwarm": {
- "type": "object",
- "properties": {
- "Parallelism": {
- "type": "number"
- },
- "Delay": {
- "type": "number"
- },
- "FailureAction": {
- "type": "string"
- },
- "Monitor": {
- "type": "number"
- },
- "MaxFailureRatio": {
- "type": "number"
- },
- "Order": {
- "type": "string"
- }
- },
- "required": ["Parallelism", "Order"],
- "additionalProperties": false,
- "nullable": true
- },
- "rollbackConfigSwarm": {
- "type": "object",
- "properties": {
- "Parallelism": {
- "type": "number"
- },
- "Delay": {
- "type": "number"
- },
- "FailureAction": {
- "type": "string"
- },
- "Monitor": {
- "type": "number"
- },
- "MaxFailureRatio": {
- "type": "number"
- },
- "Order": {
- "type": "string"
- }
- },
- "required": ["Parallelism", "Order"],
- "additionalProperties": false,
- "nullable": true
- },
- "modeSwarm": {
- "type": "object",
- "properties": {
- "Replicated": {
- "type": "object",
- "properties": {
- "Replicas": {
- "type": "number"
- }
- },
- "additionalProperties": false
- },
- "Global": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- },
- "ReplicatedJob": {
- "type": "object",
- "properties": {
- "MaxConcurrent": {
- "type": "number"
- },
- "TotalCompletions": {
- "type": "number"
- }
- },
- "additionalProperties": false
- },
- "GlobalJob": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "labelsSwarm": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- },
- "nullable": true
- },
- "networkSwarm": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Target": {
- "type": "string"
- },
- "Aliases": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "DriverOpts": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- },
- "nullable": true
- },
- "stopGracePeriodSwarm": {
- "type": "integer",
- "nullable": true
- },
- "endpointSpecSwarm": {
- "type": "object",
- "properties": {
- "Mode": {
- "type": "string"
- },
- "Ports": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Protocol": {
- "type": "string"
- },
- "TargetPort": {
- "type": "number"
- },
- "PublishedPort": {
- "type": "number"
- },
- "PublishMode": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "replicas": {
- "type": "number"
- },
- "applicationStatus": {
- "type": "string",
- "enum": ["idle", "running", "done", "error"]
- },
- "buildType": {
- "type": "string",
- "enum": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "railpackVersion": {
- "type": "string",
- "nullable": true
- },
- "herokuVersion": {
- "type": "string",
- "nullable": true
- },
- "publishDirectory": {
- "type": "string",
- "nullable": true
- },
- "isStaticSpa": {
- "type": "boolean",
- "nullable": true
- },
- "createdAt": {
- "type": "string"
- },
- "registryId": {
- "type": "string",
- "nullable": true
- },
- "environmentId": {
- "type": "string"
- },
- "githubId": {
- "type": "string",
- "nullable": true
- },
- "gitlabId": {
- "type": "string",
- "nullable": true
- },
- "giteaId": {
- "type": "string",
- "nullable": true
- },
- "bitbucketId": {
- "type": "string",
- "nullable": true
- },
- "buildServerId": {
- "type": "string",
- "nullable": true
- },
- "buildRegistryId": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.refreshToken": {
- "post": {
- "operationId": "application-refreshToken",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.deploy": {
- "post": {
- "operationId": "application-deploy",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string",
- "minLength": 1
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.cleanQueues": {
- "post": {
- "operationId": "application-cleanQueues",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.killBuild": {
- "post": {
- "operationId": "application-killBuild",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.readTraefikConfig": {
- "get": {
- "operationId": "application-readTraefikConfig",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "applicationId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.updateTraefikConfig": {
- "post": {
- "operationId": "application-updateTraefikConfig",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- },
- "traefikConfig": {
- "type": "string"
- }
- },
- "required": ["applicationId", "traefikConfig"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.readAppMonitoring": {
- "get": {
- "operationId": "application-readAppMonitoring",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "appName",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.move": {
- "post": {
- "operationId": "application-move",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- },
- "targetEnvironmentId": {
- "type": "string"
- }
- },
- "required": ["applicationId", "targetEnvironmentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/application.cancelDeployment": {
- "post": {
- "operationId": "application-cancelDeployment",
- "tags": ["application"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- }
- },
- "required": ["applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.create": {
- "post": {
- "operationId": "mysql-create",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string",
- "minLength": 1
- },
- "dockerImage": {
- "type": "string",
- "default": "mysql:8"
- },
- "environmentId": {
- "type": "string"
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "databaseName": {
- "type": "string",
- "minLength": 1
- },
- "databaseUser": {
- "type": "string",
- "minLength": 1
- },
- "databasePassword": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$"
- },
- "databaseRootPassword": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$"
- },
- "serverId": {
- "type": "string",
- "nullable": true
- }
- },
- "required": [
- "name",
- "appName",
- "environmentId",
- "databaseName",
- "databaseUser",
- "databasePassword",
- "databaseRootPassword"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.one": {
- "get": {
- "operationId": "mysql-one",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "mysqlId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.start": {
- "post": {
- "operationId": "mysql-start",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mysqlId": {
- "type": "string"
- }
- },
- "required": ["mysqlId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.stop": {
- "post": {
- "operationId": "mysql-stop",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mysqlId": {
- "type": "string"
- }
- },
- "required": ["mysqlId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.saveExternalPort": {
- "post": {
- "operationId": "mysql-saveExternalPort",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mysqlId": {
- "type": "string"
- },
- "externalPort": {
- "type": "number",
- "nullable": true
- }
- },
- "required": ["mysqlId", "externalPort"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.deploy": {
- "post": {
- "operationId": "mysql-deploy",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mysqlId": {
- "type": "string"
- }
- },
- "required": ["mysqlId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.changeStatus": {
- "post": {
- "operationId": "mysql-changeStatus",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mysqlId": {
- "type": "string"
- },
- "applicationStatus": {
- "type": "string",
- "enum": ["idle", "running", "done", "error"]
- }
- },
- "required": ["mysqlId", "applicationStatus"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.reload": {
- "post": {
- "operationId": "mysql-reload",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mysqlId": {
- "type": "string"
- },
- "appName": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["mysqlId", "appName"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.remove": {
- "post": {
- "operationId": "mysql-remove",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mysqlId": {
- "type": "string"
- }
- },
- "required": ["mysqlId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.saveEnvironment": {
- "post": {
- "operationId": "mysql-saveEnvironment",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mysqlId": {
- "type": "string"
- },
- "env": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["mysqlId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.update": {
- "post": {
- "operationId": "mysql-update",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mysqlId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "databaseName": {
- "type": "string",
- "minLength": 1
- },
- "databaseUser": {
- "type": "string",
- "minLength": 1
- },
- "databasePassword": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$"
- },
- "databaseRootPassword": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$"
- },
- "dockerImage": {
- "type": "string",
- "default": "mysql:8"
- },
- "command": {
- "type": "string",
- "nullable": true
- },
- "env": {
- "type": "string",
- "nullable": true
- },
- "memoryReservation": {
- "type": "string",
- "nullable": true
- },
- "memoryLimit": {
- "type": "string",
- "nullable": true
- },
- "cpuReservation": {
- "type": "string",
- "nullable": true
- },
- "cpuLimit": {
- "type": "string",
- "nullable": true
- },
- "externalPort": {
- "type": "number",
- "nullable": true
- },
- "applicationStatus": {
- "type": "string",
- "enum": ["idle", "running", "done", "error"]
- },
- "healthCheckSwarm": {
- "type": "object",
- "properties": {
- "Test": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "Interval": {
- "type": "number"
- },
- "Timeout": {
- "type": "number"
- },
- "StartPeriod": {
- "type": "number"
- },
- "Retries": {
- "type": "number"
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "restartPolicySwarm": {
- "type": "object",
- "properties": {
- "Condition": {
- "type": "string"
- },
- "Delay": {
- "type": "number"
- },
- "MaxAttempts": {
- "type": "number"
- },
- "Window": {
- "type": "number"
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "placementSwarm": {
- "type": "object",
- "properties": {
- "Constraints": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "Preferences": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Spread": {
- "type": "object",
- "properties": {
- "SpreadDescriptor": {
- "type": "string"
- }
- },
- "required": ["SpreadDescriptor"],
- "additionalProperties": false
- }
- },
- "required": ["Spread"],
- "additionalProperties": false
- }
- },
- "MaxReplicas": {
- "type": "number"
- },
- "Platforms": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Architecture": {
- "type": "string"
- },
- "OS": {
- "type": "string"
- }
- },
- "required": ["Architecture", "OS"],
- "additionalProperties": false
- }
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "updateConfigSwarm": {
- "type": "object",
- "properties": {
- "Parallelism": {
- "type": "number"
- },
- "Delay": {
- "type": "number"
- },
- "FailureAction": {
- "type": "string"
- },
- "Monitor": {
- "type": "number"
- },
- "MaxFailureRatio": {
- "type": "number"
- },
- "Order": {
- "type": "string"
- }
- },
- "required": ["Parallelism", "Order"],
- "additionalProperties": false,
- "nullable": true
- },
- "rollbackConfigSwarm": {
- "type": "object",
- "properties": {
- "Parallelism": {
- "type": "number"
- },
- "Delay": {
- "type": "number"
- },
- "FailureAction": {
- "type": "string"
- },
- "Monitor": {
- "type": "number"
- },
- "MaxFailureRatio": {
- "type": "number"
- },
- "Order": {
- "type": "string"
- }
- },
- "required": ["Parallelism", "Order"],
- "additionalProperties": false,
- "nullable": true
- },
- "modeSwarm": {
- "type": "object",
- "properties": {
- "Replicated": {
- "type": "object",
- "properties": {
- "Replicas": {
- "type": "number"
- }
- },
- "additionalProperties": false
- },
- "Global": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- },
- "ReplicatedJob": {
- "type": "object",
- "properties": {
- "MaxConcurrent": {
- "type": "number"
- },
- "TotalCompletions": {
- "type": "number"
- }
- },
- "additionalProperties": false
- },
- "GlobalJob": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "labelsSwarm": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- },
- "nullable": true
- },
- "networkSwarm": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Target": {
- "type": "string"
- },
- "Aliases": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "DriverOpts": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- },
- "nullable": true
- },
- "stopGracePeriodSwarm": {
- "type": "integer",
- "nullable": true
- },
- "endpointSpecSwarm": {
- "type": "object",
- "properties": {
- "Mode": {
- "type": "string"
- },
- "Ports": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Protocol": {
- "type": "string"
- },
- "TargetPort": {
- "type": "number"
- },
- "PublishedPort": {
- "type": "number"
- },
- "PublishMode": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "replicas": {
- "type": "number"
- },
- "createdAt": {
- "type": "string"
- },
- "environmentId": {
- "type": "string"
- }
- },
- "required": ["mysqlId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.move": {
- "post": {
- "operationId": "mysql-move",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mysqlId": {
- "type": "string"
- },
- "targetEnvironmentId": {
- "type": "string"
- }
- },
- "required": ["mysqlId", "targetEnvironmentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mysql.rebuild": {
- "post": {
- "operationId": "mysql-rebuild",
- "tags": ["mysql"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mysqlId": {
- "type": "string"
- }
- },
- "required": ["mysqlId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.create": {
- "post": {
- "operationId": "postgres-create",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string"
- },
- "databaseName": {
- "type": "string",
- "minLength": 1
- },
- "databaseUser": {
- "type": "string",
- "minLength": 1
- },
- "databasePassword": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$"
- },
- "dockerImage": {
- "type": "string",
- "default": "postgres:15"
- },
- "environmentId": {
- "type": "string"
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "serverId": {
- "type": "string",
- "nullable": true
- }
- },
- "required": [
- "name",
- "appName",
- "databaseName",
- "databaseUser",
- "databasePassword",
- "environmentId"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.one": {
- "get": {
- "operationId": "postgres-one",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "postgresId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.start": {
- "post": {
- "operationId": "postgres-start",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "postgresId": {
- "type": "string"
- }
- },
- "required": ["postgresId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.stop": {
- "post": {
- "operationId": "postgres-stop",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "postgresId": {
- "type": "string"
- }
- },
- "required": ["postgresId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.saveExternalPort": {
- "post": {
- "operationId": "postgres-saveExternalPort",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "postgresId": {
- "type": "string"
- },
- "externalPort": {
- "type": "number",
- "nullable": true
- }
- },
- "required": ["postgresId", "externalPort"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.deploy": {
- "post": {
- "operationId": "postgres-deploy",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "postgresId": {
- "type": "string"
- }
- },
- "required": ["postgresId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.changeStatus": {
- "post": {
- "operationId": "postgres-changeStatus",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "postgresId": {
- "type": "string"
- },
- "applicationStatus": {
- "type": "string",
- "enum": ["idle", "running", "done", "error"]
- }
- },
- "required": ["postgresId", "applicationStatus"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.remove": {
- "post": {
- "operationId": "postgres-remove",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "postgresId": {
- "type": "string"
- }
- },
- "required": ["postgresId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.saveEnvironment": {
- "post": {
- "operationId": "postgres-saveEnvironment",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "postgresId": {
- "type": "string"
- },
- "env": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["postgresId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.reload": {
- "post": {
- "operationId": "postgres-reload",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "postgresId": {
- "type": "string"
- },
- "appName": {
- "type": "string"
- }
- },
- "required": ["postgresId", "appName"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.update": {
- "post": {
- "operationId": "postgres-update",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "postgresId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string"
- },
- "databaseName": {
- "type": "string",
- "minLength": 1
- },
- "databaseUser": {
- "type": "string",
- "minLength": 1
- },
- "databasePassword": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$"
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "dockerImage": {
- "type": "string",
- "default": "postgres:15"
- },
- "command": {
- "type": "string",
- "nullable": true
- },
- "env": {
- "type": "string",
- "nullable": true
- },
- "memoryReservation": {
- "type": "string",
- "nullable": true
- },
- "externalPort": {
- "type": "number",
- "nullable": true
- },
- "memoryLimit": {
- "type": "string",
- "nullable": true
- },
- "cpuReservation": {
- "type": "string",
- "nullable": true
- },
- "cpuLimit": {
- "type": "string",
- "nullable": true
- },
- "applicationStatus": {
- "type": "string",
- "enum": ["idle", "running", "done", "error"]
- },
- "healthCheckSwarm": {
- "type": "object",
- "properties": {
- "Test": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "Interval": {
- "type": "number"
- },
- "Timeout": {
- "type": "number"
- },
- "StartPeriod": {
- "type": "number"
- },
- "Retries": {
- "type": "number"
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "restartPolicySwarm": {
- "type": "object",
- "properties": {
- "Condition": {
- "type": "string"
- },
- "Delay": {
- "type": "number"
- },
- "MaxAttempts": {
- "type": "number"
- },
- "Window": {
- "type": "number"
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "placementSwarm": {
- "type": "object",
- "properties": {
- "Constraints": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "Preferences": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Spread": {
- "type": "object",
- "properties": {
- "SpreadDescriptor": {
- "type": "string"
- }
- },
- "required": ["SpreadDescriptor"],
- "additionalProperties": false
- }
- },
- "required": ["Spread"],
- "additionalProperties": false
- }
- },
- "MaxReplicas": {
- "type": "number"
- },
- "Platforms": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Architecture": {
- "type": "string"
- },
- "OS": {
- "type": "string"
- }
- },
- "required": ["Architecture", "OS"],
- "additionalProperties": false
- }
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "updateConfigSwarm": {
- "type": "object",
- "properties": {
- "Parallelism": {
- "type": "number"
- },
- "Delay": {
- "type": "number"
- },
- "FailureAction": {
- "type": "string"
- },
- "Monitor": {
- "type": "number"
- },
- "MaxFailureRatio": {
- "type": "number"
- },
- "Order": {
- "type": "string"
- }
- },
- "required": ["Parallelism", "Order"],
- "additionalProperties": false,
- "nullable": true
- },
- "rollbackConfigSwarm": {
- "type": "object",
- "properties": {
- "Parallelism": {
- "type": "number"
- },
- "Delay": {
- "type": "number"
- },
- "FailureAction": {
- "type": "string"
- },
- "Monitor": {
- "type": "number"
- },
- "MaxFailureRatio": {
- "type": "number"
- },
- "Order": {
- "type": "string"
- }
- },
- "required": ["Parallelism", "Order"],
- "additionalProperties": false,
- "nullable": true
- },
- "modeSwarm": {
- "type": "object",
- "properties": {
- "Replicated": {
- "type": "object",
- "properties": {
- "Replicas": {
- "type": "number"
- }
- },
- "additionalProperties": false
- },
- "Global": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- },
- "ReplicatedJob": {
- "type": "object",
- "properties": {
- "MaxConcurrent": {
- "type": "number"
- },
- "TotalCompletions": {
- "type": "number"
- }
- },
- "additionalProperties": false
- },
- "GlobalJob": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "labelsSwarm": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- },
- "nullable": true
- },
- "networkSwarm": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Target": {
- "type": "string"
- },
- "Aliases": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "DriverOpts": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- },
- "nullable": true
- },
- "stopGracePeriodSwarm": {
- "type": "integer",
- "nullable": true
- },
- "endpointSpecSwarm": {
- "type": "object",
- "properties": {
- "Mode": {
- "type": "string"
- },
- "Ports": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Protocol": {
- "type": "string"
- },
- "TargetPort": {
- "type": "number"
- },
- "PublishedPort": {
- "type": "number"
- },
- "PublishMode": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "replicas": {
- "type": "number"
- },
- "createdAt": {
- "type": "string"
- },
- "environmentId": {
- "type": "string"
- }
- },
- "required": ["postgresId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.move": {
- "post": {
- "operationId": "postgres-move",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "postgresId": {
- "type": "string"
- },
- "targetEnvironmentId": {
- "type": "string"
- }
- },
- "required": ["postgresId", "targetEnvironmentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/postgres.rebuild": {
- "post": {
- "operationId": "postgres-rebuild",
- "tags": ["postgres"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "postgresId": {
- "type": "string"
- }
- },
- "required": ["postgresId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.create": {
- "post": {
- "operationId": "redis-create",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string",
- "minLength": 1
- },
- "databasePassword": {
- "type": "string"
- },
- "dockerImage": {
- "type": "string",
- "default": "redis:8"
- },
- "environmentId": {
- "type": "string"
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "serverId": {
- "type": "string",
- "nullable": true
- }
- },
- "required": [
- "name",
- "appName",
- "databasePassword",
- "environmentId"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.one": {
- "get": {
- "operationId": "redis-one",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "redisId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.start": {
- "post": {
- "operationId": "redis-start",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redisId": {
- "type": "string"
- }
- },
- "required": ["redisId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.reload": {
- "post": {
- "operationId": "redis-reload",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redisId": {
- "type": "string"
- },
- "appName": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["redisId", "appName"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.stop": {
- "post": {
- "operationId": "redis-stop",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redisId": {
- "type": "string"
- }
- },
- "required": ["redisId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.saveExternalPort": {
- "post": {
- "operationId": "redis-saveExternalPort",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redisId": {
- "type": "string"
- },
- "externalPort": {
- "type": "number",
- "nullable": true
- }
- },
- "required": ["redisId", "externalPort"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.deploy": {
- "post": {
- "operationId": "redis-deploy",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redisId": {
- "type": "string"
- }
- },
- "required": ["redisId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.changeStatus": {
- "post": {
- "operationId": "redis-changeStatus",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redisId": {
- "type": "string"
- },
- "applicationStatus": {
- "type": "string",
- "enum": ["idle", "running", "done", "error"]
- }
- },
- "required": ["redisId", "applicationStatus"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.remove": {
- "post": {
- "operationId": "redis-remove",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redisId": {
- "type": "string"
- }
- },
- "required": ["redisId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.saveEnvironment": {
- "post": {
- "operationId": "redis-saveEnvironment",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redisId": {
- "type": "string"
- },
- "env": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["redisId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.update": {
- "post": {
- "operationId": "redis-update",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redisId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "databasePassword": {
- "type": "string"
- },
- "dockerImage": {
- "type": "string",
- "default": "redis:8"
- },
- "command": {
- "type": "string",
- "nullable": true
- },
- "env": {
- "type": "string",
- "nullable": true
- },
- "memoryReservation": {
- "type": "string",
- "nullable": true
- },
- "memoryLimit": {
- "type": "string",
- "nullable": true
- },
- "cpuReservation": {
- "type": "string",
- "nullable": true
- },
- "cpuLimit": {
- "type": "string",
- "nullable": true
- },
- "externalPort": {
- "type": "number",
- "nullable": true
- },
- "createdAt": {
- "type": "string"
- },
- "applicationStatus": {
- "type": "string",
- "enum": ["idle", "running", "done", "error"]
- },
- "healthCheckSwarm": {
- "type": "object",
- "properties": {
- "Test": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "Interval": {
- "type": "number"
- },
- "Timeout": {
- "type": "number"
- },
- "StartPeriod": {
- "type": "number"
- },
- "Retries": {
- "type": "number"
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "restartPolicySwarm": {
- "type": "object",
- "properties": {
- "Condition": {
- "type": "string"
- },
- "Delay": {
- "type": "number"
- },
- "MaxAttempts": {
- "type": "number"
- },
- "Window": {
- "type": "number"
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "placementSwarm": {
- "type": "object",
- "properties": {
- "Constraints": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "Preferences": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Spread": {
- "type": "object",
- "properties": {
- "SpreadDescriptor": {
- "type": "string"
- }
- },
- "required": ["SpreadDescriptor"],
- "additionalProperties": false
- }
- },
- "required": ["Spread"],
- "additionalProperties": false
- }
- },
- "MaxReplicas": {
- "type": "number"
- },
- "Platforms": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Architecture": {
- "type": "string"
- },
- "OS": {
- "type": "string"
- }
- },
- "required": ["Architecture", "OS"],
- "additionalProperties": false
- }
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "updateConfigSwarm": {
- "type": "object",
- "properties": {
- "Parallelism": {
- "type": "number"
- },
- "Delay": {
- "type": "number"
- },
- "FailureAction": {
- "type": "string"
- },
- "Monitor": {
- "type": "number"
- },
- "MaxFailureRatio": {
- "type": "number"
- },
- "Order": {
- "type": "string"
- }
- },
- "required": ["Parallelism", "Order"],
- "additionalProperties": false,
- "nullable": true
- },
- "rollbackConfigSwarm": {
- "type": "object",
- "properties": {
- "Parallelism": {
- "type": "number"
- },
- "Delay": {
- "type": "number"
- },
- "FailureAction": {
- "type": "string"
- },
- "Monitor": {
- "type": "number"
- },
- "MaxFailureRatio": {
- "type": "number"
- },
- "Order": {
- "type": "string"
- }
- },
- "required": ["Parallelism", "Order"],
- "additionalProperties": false,
- "nullable": true
- },
- "modeSwarm": {
- "type": "object",
- "properties": {
- "Replicated": {
- "type": "object",
- "properties": {
- "Replicas": {
- "type": "number"
- }
- },
- "additionalProperties": false
- },
- "Global": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- },
- "ReplicatedJob": {
- "type": "object",
- "properties": {
- "MaxConcurrent": {
- "type": "number"
- },
- "TotalCompletions": {
- "type": "number"
- }
- },
- "additionalProperties": false
- },
- "GlobalJob": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "labelsSwarm": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- },
- "nullable": true
- },
- "networkSwarm": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Target": {
- "type": "string"
- },
- "Aliases": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "DriverOpts": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- },
- "nullable": true
- },
- "stopGracePeriodSwarm": {
- "type": "integer",
- "nullable": true
- },
- "endpointSpecSwarm": {
- "type": "object",
- "properties": {
- "Mode": {
- "type": "string"
- },
- "Ports": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Protocol": {
- "type": "string"
- },
- "TargetPort": {
- "type": "number"
- },
- "PublishedPort": {
- "type": "number"
- },
- "PublishMode": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "replicas": {
- "type": "number"
- },
- "environmentId": {
- "type": "string"
- }
- },
- "required": ["redisId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.move": {
- "post": {
- "operationId": "redis-move",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redisId": {
- "type": "string"
- },
- "targetEnvironmentId": {
- "type": "string"
- }
- },
- "required": ["redisId", "targetEnvironmentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redis.rebuild": {
- "post": {
- "operationId": "redis-rebuild",
- "tags": ["redis"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redisId": {
- "type": "string"
- }
- },
- "required": ["redisId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.create": {
- "post": {
- "operationId": "mongo-create",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string",
- "minLength": 1
- },
- "dockerImage": {
- "type": "string",
- "default": "mongo:15"
- },
- "environmentId": {
- "type": "string"
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "databaseUser": {
- "type": "string",
- "minLength": 1
- },
- "databasePassword": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$"
- },
- "serverId": {
- "type": "string",
- "nullable": true
- },
- "replicaSets": {
- "type": "boolean",
- "default": false,
- "nullable": true
- }
- },
- "required": [
- "name",
- "appName",
- "environmentId",
- "databaseUser",
- "databasePassword"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.one": {
- "get": {
- "operationId": "mongo-one",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "mongoId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.start": {
- "post": {
- "operationId": "mongo-start",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mongoId": {
- "type": "string"
- }
- },
- "required": ["mongoId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.stop": {
- "post": {
- "operationId": "mongo-stop",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mongoId": {
- "type": "string"
- }
- },
- "required": ["mongoId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.saveExternalPort": {
- "post": {
- "operationId": "mongo-saveExternalPort",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mongoId": {
- "type": "string"
- },
- "externalPort": {
- "type": "number",
- "nullable": true
- }
- },
- "required": ["mongoId", "externalPort"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.deploy": {
- "post": {
- "operationId": "mongo-deploy",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mongoId": {
- "type": "string"
- }
- },
- "required": ["mongoId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.changeStatus": {
- "post": {
- "operationId": "mongo-changeStatus",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mongoId": {
- "type": "string"
- },
- "applicationStatus": {
- "type": "string",
- "enum": ["idle", "running", "done", "error"]
- }
- },
- "required": ["mongoId", "applicationStatus"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.reload": {
- "post": {
- "operationId": "mongo-reload",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mongoId": {
- "type": "string"
- },
- "appName": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["mongoId", "appName"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.remove": {
- "post": {
- "operationId": "mongo-remove",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mongoId": {
- "type": "string"
- }
- },
- "required": ["mongoId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.saveEnvironment": {
- "post": {
- "operationId": "mongo-saveEnvironment",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mongoId": {
- "type": "string"
- },
- "env": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["mongoId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.update": {
- "post": {
- "operationId": "mongo-update",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mongoId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "databaseUser": {
- "type": "string",
- "minLength": 1
- },
- "databasePassword": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$"
- },
- "dockerImage": {
- "type": "string",
- "default": "mongo:15"
- },
- "command": {
- "type": "string",
- "nullable": true
- },
- "env": {
- "type": "string",
- "nullable": true
- },
- "memoryReservation": {
- "type": "string",
- "nullable": true
- },
- "memoryLimit": {
- "type": "string",
- "nullable": true
- },
- "cpuReservation": {
- "type": "string",
- "nullable": true
- },
- "cpuLimit": {
- "type": "string",
- "nullable": true
- },
- "externalPort": {
- "type": "number",
- "nullable": true
- },
- "applicationStatus": {
- "type": "string",
- "enum": ["idle", "running", "done", "error"]
- },
- "healthCheckSwarm": {
- "type": "object",
- "properties": {
- "Test": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "Interval": {
- "type": "number"
- },
- "Timeout": {
- "type": "number"
- },
- "StartPeriod": {
- "type": "number"
- },
- "Retries": {
- "type": "number"
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "restartPolicySwarm": {
- "type": "object",
- "properties": {
- "Condition": {
- "type": "string"
- },
- "Delay": {
- "type": "number"
- },
- "MaxAttempts": {
- "type": "number"
- },
- "Window": {
- "type": "number"
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "placementSwarm": {
- "type": "object",
- "properties": {
- "Constraints": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "Preferences": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Spread": {
- "type": "object",
- "properties": {
- "SpreadDescriptor": {
- "type": "string"
- }
- },
- "required": ["SpreadDescriptor"],
- "additionalProperties": false
- }
- },
- "required": ["Spread"],
- "additionalProperties": false
- }
- },
- "MaxReplicas": {
- "type": "number"
- },
- "Platforms": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Architecture": {
- "type": "string"
- },
- "OS": {
- "type": "string"
- }
- },
- "required": ["Architecture", "OS"],
- "additionalProperties": false
- }
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "updateConfigSwarm": {
- "type": "object",
- "properties": {
- "Parallelism": {
- "type": "number"
- },
- "Delay": {
- "type": "number"
- },
- "FailureAction": {
- "type": "string"
- },
- "Monitor": {
- "type": "number"
- },
- "MaxFailureRatio": {
- "type": "number"
- },
- "Order": {
- "type": "string"
- }
- },
- "required": ["Parallelism", "Order"],
- "additionalProperties": false,
- "nullable": true
- },
- "rollbackConfigSwarm": {
- "type": "object",
- "properties": {
- "Parallelism": {
- "type": "number"
- },
- "Delay": {
- "type": "number"
- },
- "FailureAction": {
- "type": "string"
- },
- "Monitor": {
- "type": "number"
- },
- "MaxFailureRatio": {
- "type": "number"
- },
- "Order": {
- "type": "string"
- }
- },
- "required": ["Parallelism", "Order"],
- "additionalProperties": false,
- "nullable": true
- },
- "modeSwarm": {
- "type": "object",
- "properties": {
- "Replicated": {
- "type": "object",
- "properties": {
- "Replicas": {
- "type": "number"
- }
- },
- "additionalProperties": false
- },
- "Global": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- },
- "ReplicatedJob": {
- "type": "object",
- "properties": {
- "MaxConcurrent": {
- "type": "number"
- },
- "TotalCompletions": {
- "type": "number"
- }
- },
- "additionalProperties": false
- },
- "GlobalJob": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "labelsSwarm": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- },
- "nullable": true
- },
- "networkSwarm": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Target": {
- "type": "string"
- },
- "Aliases": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "DriverOpts": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- },
- "nullable": true
- },
- "stopGracePeriodSwarm": {
- "type": "integer",
- "nullable": true
- },
- "endpointSpecSwarm": {
- "type": "object",
- "properties": {
- "Mode": {
- "type": "string"
- },
- "Ports": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Protocol": {
- "type": "string"
- },
- "TargetPort": {
- "type": "number"
- },
- "PublishedPort": {
- "type": "number"
- },
- "PublishMode": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "replicas": {
- "type": "number"
- },
- "createdAt": {
- "type": "string"
- },
- "environmentId": {
- "type": "string"
- },
- "replicaSets": {
- "type": "boolean",
- "default": false,
- "nullable": true
- }
- },
- "required": ["mongoId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.move": {
- "post": {
- "operationId": "mongo-move",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mongoId": {
- "type": "string"
- },
- "targetEnvironmentId": {
- "type": "string"
- }
- },
- "required": ["mongoId", "targetEnvironmentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mongo.rebuild": {
- "post": {
- "operationId": "mongo-rebuild",
- "tags": ["mongo"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mongoId": {
- "type": "string"
- }
- },
- "required": ["mongoId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.create": {
- "post": {
- "operationId": "mariadb-create",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string",
- "minLength": 1
- },
- "dockerImage": {
- "type": "string",
- "default": "mariadb:6"
- },
- "databaseRootPassword": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$"
- },
- "environmentId": {
- "type": "string"
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "databaseName": {
- "type": "string",
- "minLength": 1
- },
- "databaseUser": {
- "type": "string",
- "minLength": 1
- },
- "databasePassword": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$"
- },
- "serverId": {
- "type": "string",
- "nullable": true
- }
- },
- "required": [
- "name",
- "appName",
- "databaseRootPassword",
- "environmentId",
- "databaseName",
- "databaseUser",
- "databasePassword"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.one": {
- "get": {
- "operationId": "mariadb-one",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "mariadbId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.start": {
- "post": {
- "operationId": "mariadb-start",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mariadbId": {
- "type": "string"
- }
- },
- "required": ["mariadbId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.stop": {
- "post": {
- "operationId": "mariadb-stop",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mariadbId": {
- "type": "string"
- }
- },
- "required": ["mariadbId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.saveExternalPort": {
- "post": {
- "operationId": "mariadb-saveExternalPort",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mariadbId": {
- "type": "string"
- },
- "externalPort": {
- "type": "number",
- "nullable": true
- }
- },
- "required": ["mariadbId", "externalPort"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.deploy": {
- "post": {
- "operationId": "mariadb-deploy",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mariadbId": {
- "type": "string"
- }
- },
- "required": ["mariadbId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.changeStatus": {
- "post": {
- "operationId": "mariadb-changeStatus",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mariadbId": {
- "type": "string"
- },
- "applicationStatus": {
- "type": "string",
- "enum": ["idle", "running", "done", "error"]
- }
- },
- "required": ["mariadbId", "applicationStatus"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.remove": {
- "post": {
- "operationId": "mariadb-remove",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mariadbId": {
- "type": "string"
- }
- },
- "required": ["mariadbId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.saveEnvironment": {
- "post": {
- "operationId": "mariadb-saveEnvironment",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mariadbId": {
- "type": "string"
- },
- "env": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["mariadbId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.reload": {
- "post": {
- "operationId": "mariadb-reload",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mariadbId": {
- "type": "string"
- },
- "appName": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["mariadbId", "appName"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.update": {
- "post": {
- "operationId": "mariadb-update",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mariadbId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "databaseName": {
- "type": "string",
- "minLength": 1
- },
- "databaseUser": {
- "type": "string",
- "minLength": 1
- },
- "databasePassword": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$"
- },
- "databaseRootPassword": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9@#%^&*()_+\\-=[\\]{}|;:,.<>?~`]*$"
- },
- "dockerImage": {
- "type": "string",
- "default": "mariadb:6"
- },
- "command": {
- "type": "string",
- "nullable": true
- },
- "env": {
- "type": "string",
- "nullable": true
- },
- "memoryReservation": {
- "type": "string",
- "nullable": true
- },
- "memoryLimit": {
- "type": "string",
- "nullable": true
- },
- "cpuReservation": {
- "type": "string",
- "nullable": true
- },
- "cpuLimit": {
- "type": "string",
- "nullable": true
- },
- "externalPort": {
- "type": "number",
- "nullable": true
- },
- "applicationStatus": {
- "type": "string",
- "enum": ["idle", "running", "done", "error"]
- },
- "healthCheckSwarm": {
- "type": "object",
- "properties": {
- "Test": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "Interval": {
- "type": "number"
- },
- "Timeout": {
- "type": "number"
- },
- "StartPeriod": {
- "type": "number"
- },
- "Retries": {
- "type": "number"
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "restartPolicySwarm": {
- "type": "object",
- "properties": {
- "Condition": {
- "type": "string"
- },
- "Delay": {
- "type": "number"
- },
- "MaxAttempts": {
- "type": "number"
- },
- "Window": {
- "type": "number"
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "placementSwarm": {
- "type": "object",
- "properties": {
- "Constraints": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "Preferences": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Spread": {
- "type": "object",
- "properties": {
- "SpreadDescriptor": {
- "type": "string"
- }
- },
- "required": ["SpreadDescriptor"],
- "additionalProperties": false
- }
- },
- "required": ["Spread"],
- "additionalProperties": false
- }
- },
- "MaxReplicas": {
- "type": "number"
- },
- "Platforms": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Architecture": {
- "type": "string"
- },
- "OS": {
- "type": "string"
- }
- },
- "required": ["Architecture", "OS"],
- "additionalProperties": false
- }
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "updateConfigSwarm": {
- "type": "object",
- "properties": {
- "Parallelism": {
- "type": "number"
- },
- "Delay": {
- "type": "number"
- },
- "FailureAction": {
- "type": "string"
- },
- "Monitor": {
- "type": "number"
- },
- "MaxFailureRatio": {
- "type": "number"
- },
- "Order": {
- "type": "string"
- }
- },
- "required": ["Parallelism", "Order"],
- "additionalProperties": false,
- "nullable": true
- },
- "rollbackConfigSwarm": {
- "type": "object",
- "properties": {
- "Parallelism": {
- "type": "number"
- },
- "Delay": {
- "type": "number"
- },
- "FailureAction": {
- "type": "string"
- },
- "Monitor": {
- "type": "number"
- },
- "MaxFailureRatio": {
- "type": "number"
- },
- "Order": {
- "type": "string"
- }
- },
- "required": ["Parallelism", "Order"],
- "additionalProperties": false,
- "nullable": true
- },
- "modeSwarm": {
- "type": "object",
- "properties": {
- "Replicated": {
- "type": "object",
- "properties": {
- "Replicas": {
- "type": "number"
- }
- },
- "additionalProperties": false
- },
- "Global": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- },
- "ReplicatedJob": {
- "type": "object",
- "properties": {
- "MaxConcurrent": {
- "type": "number"
- },
- "TotalCompletions": {
- "type": "number"
- }
- },
- "additionalProperties": false
- },
- "GlobalJob": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "labelsSwarm": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- },
- "nullable": true
- },
- "networkSwarm": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Target": {
- "type": "string"
- },
- "Aliases": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "DriverOpts": {
- "type": "object",
- "properties": {},
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- },
- "nullable": true
- },
- "stopGracePeriodSwarm": {
- "type": "integer",
- "nullable": true
- },
- "endpointSpecSwarm": {
- "type": "object",
- "properties": {
- "Mode": {
- "type": "string"
- },
- "Ports": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "Protocol": {
- "type": "string"
- },
- "TargetPort": {
- "type": "number"
- },
- "PublishedPort": {
- "type": "number"
- },
- "PublishMode": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- },
- "additionalProperties": false,
- "nullable": true
- },
- "replicas": {
- "type": "number"
- },
- "createdAt": {
- "type": "string"
- },
- "environmentId": {
- "type": "string"
- }
- },
- "required": ["mariadbId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.move": {
- "post": {
- "operationId": "mariadb-move",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mariadbId": {
- "type": "string"
- },
- "targetEnvironmentId": {
- "type": "string"
- }
- },
- "required": ["mariadbId", "targetEnvironmentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mariadb.rebuild": {
- "post": {
- "operationId": "mariadb-rebuild",
- "tags": ["mariadb"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mariadbId": {
- "type": "string"
- }
- },
- "required": ["mariadbId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.create": {
- "post": {
- "operationId": "compose-create",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "environmentId": {
- "type": "string"
- },
- "composeType": {
- "type": "string",
- "enum": ["docker-compose", "stack"]
- },
- "appName": {
- "type": "string"
- },
- "serverId": {
- "type": "string",
- "nullable": true
- },
- "composeFile": {
- "type": "string"
- }
- },
- "required": ["name", "environmentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.one": {
- "get": {
- "operationId": "compose-one",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "composeId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.update": {
- "post": {
- "operationId": "compose-update",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string"
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "appName": {
- "type": "string"
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "env": {
- "type": "string",
- "nullable": true
- },
- "composeFile": {
- "type": "string"
- },
- "refreshToken": {
- "type": "string",
- "nullable": true
- },
- "sourceType": {
- "type": "string",
- "enum": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "raw"
- ]
- },
- "composeType": {
- "type": "string",
- "enum": ["docker-compose", "stack"]
- },
- "repository": {
- "type": "string",
- "nullable": true
- },
- "owner": {
- "type": "string",
- "nullable": true
- },
- "branch": {
- "type": "string",
- "nullable": true
- },
- "autoDeploy": {
- "type": "boolean",
- "nullable": true
- },
- "gitlabProjectId": {
- "type": "number",
- "nullable": true
- },
- "gitlabRepository": {
- "type": "string",
- "nullable": true
- },
- "gitlabOwner": {
- "type": "string",
- "nullable": true
- },
- "gitlabBranch": {
- "type": "string",
- "nullable": true
- },
- "gitlabPathNamespace": {
- "type": "string",
- "nullable": true
- },
- "bitbucketRepository": {
- "type": "string",
- "nullable": true
- },
- "bitbucketOwner": {
- "type": "string",
- "nullable": true
- },
- "bitbucketBranch": {
- "type": "string",
- "nullable": true
- },
- "giteaRepository": {
- "type": "string",
- "nullable": true
- },
- "giteaOwner": {
- "type": "string",
- "nullable": true
- },
- "giteaBranch": {
- "type": "string",
- "nullable": true
- },
- "customGitUrl": {
- "type": "string",
- "nullable": true
- },
- "customGitBranch": {
- "type": "string",
- "nullable": true
- },
- "customGitSSHKeyId": {
- "type": "string",
- "nullable": true
- },
- "command": {
- "type": "string"
- },
- "enableSubmodules": {
- "type": "boolean"
- },
- "composePath": {
- "type": "string",
- "minLength": 1
- },
- "suffix": {
- "type": "string"
- },
- "randomize": {
- "type": "boolean"
- },
- "isolatedDeployment": {
- "type": "boolean"
- },
- "isolatedDeploymentsVolume": {
- "type": "boolean"
- },
- "triggerType": {
- "type": "string",
- "enum": ["push", "tag"],
- "nullable": true
- },
- "composeStatus": {
- "type": "string",
- "enum": ["idle", "running", "done", "error"]
- },
- "environmentId": {
- "type": "string"
- },
- "createdAt": {
- "type": "string"
- },
- "watchPaths": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true
- },
- "githubId": {
- "type": "string",
- "nullable": true
- },
- "gitlabId": {
- "type": "string",
- "nullable": true
- },
- "bitbucketId": {
- "type": "string",
- "nullable": true
- },
- "giteaId": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.delete": {
- "post": {
- "operationId": "compose-delete",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- },
- "deleteVolumes": {
- "type": "boolean"
- }
- },
- "required": ["composeId", "deleteVolumes"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.cleanQueues": {
- "post": {
- "operationId": "compose-cleanQueues",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.killBuild": {
- "post": {
- "operationId": "compose-killBuild",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.loadServices": {
- "get": {
- "operationId": "compose-loadServices",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "composeId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- },
- {
- "name": "type",
- "in": "query",
- "required": false,
- "schema": {
- "anyOf": [
- {
- "not": {}
- },
- {
- "type": "string",
- "enum": ["fetch", "cache"]
- }
- ],
- "default": "cache"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.loadMountsByService": {
- "get": {
- "operationId": "compose-loadMountsByService",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "composeId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- },
- {
- "name": "serviceName",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.fetchSourceType": {
- "post": {
- "operationId": "compose-fetchSourceType",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.randomizeCompose": {
- "post": {
- "operationId": "compose-randomizeCompose",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- },
- "suffix": {
- "type": "string"
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.isolatedDeployment": {
- "post": {
- "operationId": "compose-isolatedDeployment",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- },
- "suffix": {
- "type": "string"
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.getConvertedCompose": {
- "get": {
- "operationId": "compose-getConvertedCompose",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "composeId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.deploy": {
- "post": {
- "operationId": "compose-deploy",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.redeploy": {
- "post": {
- "operationId": "compose-redeploy",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.stop": {
- "post": {
- "operationId": "compose-stop",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.start": {
- "post": {
- "operationId": "compose-start",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.getDefaultCommand": {
- "get": {
- "operationId": "compose-getDefaultCommand",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "composeId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.refreshToken": {
- "post": {
- "operationId": "compose-refreshToken",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.deployTemplate": {
- "post": {
- "operationId": "compose-deployTemplate",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "environmentId": {
- "type": "string"
- },
- "serverId": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "baseUrl": {
- "type": "string"
- }
- },
- "required": ["environmentId", "id"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.templates": {
- "get": {
- "operationId": "compose-templates",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "baseUrl",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.getTags": {
- "get": {
- "operationId": "compose-getTags",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "baseUrl",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.disconnectGitProvider": {
- "post": {
- "operationId": "compose-disconnectGitProvider",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.move": {
- "post": {
- "operationId": "compose-move",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string"
- },
- "targetEnvironmentId": {
- "type": "string"
- }
- },
- "required": ["composeId", "targetEnvironmentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.processTemplate": {
- "post": {
- "operationId": "compose-processTemplate",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "base64": {
- "type": "string"
- },
- "composeId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["base64", "composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.import": {
- "post": {
- "operationId": "compose-import",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "base64": {
- "type": "string"
- },
- "composeId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["base64", "composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/compose.cancelDeployment": {
- "post": {
- "operationId": "compose-cancelDeployment",
- "tags": ["compose"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "composeId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["composeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.all": {
- "get": {
- "operationId": "user-all",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.one": {
- "get": {
- "operationId": "user-one",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "userId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.get": {
- "get": {
- "operationId": "user-get",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.haveRootAccess": {
- "get": {
- "operationId": "user-haveRootAccess",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.getBackups": {
- "get": {
- "operationId": "user-getBackups",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.getServerMetrics": {
- "get": {
- "operationId": "user-getServerMetrics",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.update": {
- "post": {
- "operationId": "user-update",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string"
- },
- "isRegistered": {
- "type": "boolean"
- },
- "expirationDate": {
- "type": "string"
- },
- "createdAt2": {
- "type": "string"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time",
- "nullable": true
- },
- "twoFactorEnabled": {
- "type": "boolean",
- "nullable": true
- },
- "email": {
- "type": "string",
- "format": "email",
- "minLength": 1
- },
- "emailVerified": {
- "type": "boolean"
- },
- "image": {
- "type": "string",
- "nullable": true
- },
- "banned": {
- "type": "boolean",
- "nullable": true
- },
- "banReason": {
- "type": "string",
- "nullable": true
- },
- "banExpires": {
- "type": "string",
- "format": "date-time",
- "nullable": true
- },
- "updatedAt": {
- "type": "string",
- "format": "date-time"
- },
- "serverIp": {
- "type": "string",
- "nullable": true
- },
- "certificateType": {
- "type": "string",
- "enum": ["letsencrypt", "none", "custom"]
- },
- "https": {
- "type": "boolean"
- },
- "host": {
- "type": "string",
- "nullable": true
- },
- "letsEncryptEmail": {
- "type": "string",
- "nullable": true
- },
- "sshPrivateKey": {
- "type": "string",
- "nullable": true
- },
- "enableDockerCleanup": {
- "type": "boolean"
- },
- "logCleanupCron": {
- "type": "string",
- "nullable": true
- },
- "enablePaidFeatures": {
- "type": "boolean"
- },
- "allowImpersonation": {
- "type": "boolean"
- },
- "metricsConfig": {
- "type": "object",
- "properties": {
- "server": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": ["Dokploy", "Remote"]
- },
- "refreshRate": {
- "type": "number"
- },
- "port": {
- "type": "number"
- },
- "token": {
- "type": "string"
- },
- "urlCallback": {
- "type": "string"
- },
- "retentionDays": {
- "type": "number"
- },
- "cronJob": {
- "type": "string"
- },
- "thresholds": {
- "type": "object",
- "properties": {
- "cpu": {
- "type": "number"
- },
- "memory": {
- "type": "number"
- }
- },
- "required": ["cpu", "memory"],
- "additionalProperties": false
- }
- },
- "required": [
- "type",
- "refreshRate",
- "port",
- "token",
- "urlCallback",
- "retentionDays",
- "cronJob",
- "thresholds"
- ],
- "additionalProperties": false
- },
- "containers": {
- "type": "object",
- "properties": {
- "refreshRate": {
- "type": "number"
- },
- "services": {
- "type": "object",
- "properties": {
- "include": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "exclude": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": ["include", "exclude"],
- "additionalProperties": false
- }
- },
- "required": ["refreshRate", "services"],
- "additionalProperties": false
- }
- },
- "required": ["server", "containers"],
- "additionalProperties": false
- },
- "cleanupCacheApplications": {
- "type": "boolean"
- },
- "cleanupCacheOnPreviews": {
- "type": "boolean"
- },
- "cleanupCacheOnCompose": {
- "type": "boolean"
- },
- "stripeCustomerId": {
- "type": "string",
- "nullable": true
- },
- "stripeSubscriptionId": {
- "type": "string",
- "nullable": true
- },
- "serversQuantity": {
- "type": "number"
- },
- "password": {
- "type": "string"
- },
- "currentPassword": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.getUserByToken": {
- "get": {
- "operationId": "user-getUserByToken",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "token",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.getMetricsToken": {
- "get": {
- "operationId": "user-getMetricsToken",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.remove": {
- "post": {
- "operationId": "user-remove",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "userId": {
- "type": "string"
- }
- },
- "required": ["userId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.assignPermissions": {
- "post": {
- "operationId": "user-assignPermissions",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "accessedProjects": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "accessedEnvironments": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "accessedServices": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "canCreateProjects": {
- "type": "boolean"
- },
- "canCreateServices": {
- "type": "boolean"
- },
- "canDeleteProjects": {
- "type": "boolean"
- },
- "canDeleteServices": {
- "type": "boolean"
- },
- "canAccessToDocker": {
- "type": "boolean"
- },
- "canAccessToTraefikFiles": {
- "type": "boolean"
- },
- "canAccessToAPI": {
- "type": "boolean"
- },
- "canAccessToSSHKeys": {
- "type": "boolean"
- },
- "canAccessToGitProviders": {
- "type": "boolean"
- },
- "canDeleteEnvironments": {
- "type": "boolean"
- },
- "canCreateEnvironments": {
- "type": "boolean"
- }
- },
- "required": [
- "id",
- "accessedProjects",
- "accessedEnvironments",
- "accessedServices",
- "canCreateProjects",
- "canCreateServices",
- "canDeleteProjects",
- "canDeleteServices",
- "canAccessToDocker",
- "canAccessToTraefikFiles",
- "canAccessToAPI",
- "canAccessToSSHKeys",
- "canAccessToGitProviders",
- "canDeleteEnvironments",
- "canCreateEnvironments"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.getInvitations": {
- "get": {
- "operationId": "user-getInvitations",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.getContainerMetrics": {
- "get": {
- "operationId": "user-getContainerMetrics",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "url",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "token",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "appName",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "dataPoints",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.generateToken": {
- "post": {
- "operationId": "user-generateToken",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.deleteApiKey": {
- "post": {
- "operationId": "user-deleteApiKey",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "apiKeyId": {
- "type": "string"
- }
- },
- "required": ["apiKeyId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.createApiKey": {
- "post": {
- "operationId": "user-createApiKey",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "prefix": {
- "type": "string"
- },
- "expiresIn": {
- "type": "number"
- },
- "metadata": {
- "type": "object",
- "properties": {
- "organizationId": {
- "type": "string"
- }
- },
- "required": ["organizationId"],
- "additionalProperties": false
- },
- "rateLimitEnabled": {
- "type": "boolean"
- },
- "rateLimitTimeWindow": {
- "type": "number"
- },
- "rateLimitMax": {
- "type": "number"
- },
- "remaining": {
- "type": "number"
- },
- "refillAmount": {
- "type": "number"
- },
- "refillInterval": {
- "type": "number"
- }
- },
- "required": ["name", "metadata"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.checkUserOrganizations": {
- "get": {
- "operationId": "user-checkUserOrganizations",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "userId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/user.sendInvitation": {
- "post": {
- "operationId": "user-sendInvitation",
- "tags": ["user"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "invitationId": {
- "type": "string",
- "minLength": 1
- },
- "notificationId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["invitationId", "notificationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/domain.create": {
- "post": {
- "operationId": "domain-create",
- "tags": ["domain"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "host": {
- "type": "string",
- "minLength": 1
- },
- "path": {
- "type": "string",
- "minLength": 1,
- "nullable": true
- },
- "port": {
- "type": "number",
- "minimum": 1,
- "maximum": 65535,
- "nullable": true
- },
- "https": {
- "type": "boolean"
- },
- "applicationId": {
- "type": "string",
- "nullable": true
- },
- "certificateType": {
- "type": "string",
- "enum": ["letsencrypt", "none", "custom"]
- },
- "customCertResolver": {
- "type": "string",
- "nullable": true
- },
- "composeId": {
- "type": "string",
- "nullable": true
- },
- "serviceName": {
- "type": "string",
- "nullable": true
- },
- "domainType": {
- "type": "string",
- "enum": ["compose", "application", "preview"],
- "nullable": true
- },
- "previewDeploymentId": {
- "type": "string",
- "nullable": true
- },
- "internalPath": {
- "type": "string",
- "nullable": true
- },
- "stripPath": {
- "type": "boolean"
- }
- },
- "required": ["host"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/domain.byApplicationId": {
- "get": {
- "operationId": "domain-byApplicationId",
- "tags": ["domain"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "applicationId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/domain.byComposeId": {
- "get": {
- "operationId": "domain-byComposeId",
- "tags": ["domain"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "composeId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/domain.generateDomain": {
- "post": {
- "operationId": "domain-generateDomain",
- "tags": ["domain"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appName": {
- "type": "string"
- },
- "serverId": {
- "type": "string"
- }
- },
- "required": ["appName"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/domain.canGenerateTraefikMeDomains": {
- "get": {
- "operationId": "domain-canGenerateTraefikMeDomains",
- "tags": ["domain"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/domain.update": {
- "post": {
- "operationId": "domain-update",
- "tags": ["domain"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "host": {
- "type": "string",
- "minLength": 1
- },
- "path": {
- "type": "string",
- "minLength": 1,
- "nullable": true
- },
- "port": {
- "type": "number",
- "minimum": 1,
- "maximum": 65535,
- "nullable": true
- },
- "https": {
- "type": "boolean"
- },
- "certificateType": {
- "type": "string",
- "enum": ["letsencrypt", "none", "custom"]
- },
- "customCertResolver": {
- "type": "string",
- "nullable": true
- },
- "serviceName": {
- "type": "string",
- "nullable": true
- },
- "domainType": {
- "type": "string",
- "enum": ["compose", "application", "preview"],
- "nullable": true
- },
- "internalPath": {
- "type": "string",
- "nullable": true
- },
- "stripPath": {
- "type": "boolean"
- },
- "domainId": {
- "type": "string"
- }
- },
- "required": ["host", "domainId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/domain.one": {
- "get": {
- "operationId": "domain-one",
- "tags": ["domain"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "domainId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/domain.delete": {
- "post": {
- "operationId": "domain-delete",
- "tags": ["domain"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "domainId": {
- "type": "string"
- }
- },
- "required": ["domainId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/domain.validateDomain": {
- "post": {
- "operationId": "domain-validateDomain",
- "tags": ["domain"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "domain": {
- "type": "string"
- },
- "serverIp": {
- "type": "string"
- }
- },
- "required": ["domain"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/destination.create": {
- "post": {
- "operationId": "destination-create",
- "tags": ["destination"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "provider": {
- "type": "string",
- "nullable": true
- },
- "accessKey": {
- "type": "string"
- },
- "bucket": {
- "type": "string"
- },
- "region": {
- "type": "string"
- },
- "endpoint": {
- "type": "string"
- },
- "secretAccessKey": {
- "type": "string"
- },
- "serverId": {
- "type": "string"
- }
- },
- "required": [
- "name",
- "provider",
- "accessKey",
- "bucket",
- "region",
- "endpoint",
- "secretAccessKey"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/destination.testConnection": {
- "post": {
- "operationId": "destination-testConnection",
- "tags": ["destination"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "provider": {
- "type": "string",
- "nullable": true
- },
- "accessKey": {
- "type": "string"
- },
- "bucket": {
- "type": "string"
- },
- "region": {
- "type": "string"
- },
- "endpoint": {
- "type": "string"
- },
- "secretAccessKey": {
- "type": "string"
- },
- "serverId": {
- "type": "string"
- }
- },
- "required": [
- "name",
- "provider",
- "accessKey",
- "bucket",
- "region",
- "endpoint",
- "secretAccessKey"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/destination.one": {
- "get": {
- "operationId": "destination-one",
- "tags": ["destination"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "destinationId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/destination.all": {
- "get": {
- "operationId": "destination-all",
- "tags": ["destination"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/destination.remove": {
- "post": {
- "operationId": "destination-remove",
- "tags": ["destination"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "destinationId": {
- "type": "string"
- }
- },
- "required": ["destinationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/destination.update": {
- "post": {
- "operationId": "destination-update",
- "tags": ["destination"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "accessKey": {
- "type": "string"
- },
- "bucket": {
- "type": "string"
- },
- "region": {
- "type": "string"
- },
- "endpoint": {
- "type": "string"
- },
- "secretAccessKey": {
- "type": "string"
- },
- "destinationId": {
- "type": "string"
- },
- "provider": {
- "type": "string",
- "nullable": true
- },
- "serverId": {
- "type": "string"
- }
- },
- "required": [
- "name",
- "accessKey",
- "bucket",
- "region",
- "endpoint",
- "secretAccessKey",
- "destinationId",
- "provider"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/backup.create": {
- "post": {
- "operationId": "backup-create",
- "tags": ["backup"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "schedule": {
- "type": "string"
- },
- "enabled": {
- "type": "boolean",
- "nullable": true
- },
- "prefix": {
- "type": "string",
- "minLength": 1
- },
- "destinationId": {
- "type": "string"
- },
- "keepLatestCount": {
- "type": "number",
- "nullable": true
- },
- "database": {
- "type": "string",
- "minLength": 1
- },
- "mariadbId": {
- "type": "string",
- "nullable": true
- },
- "mysqlId": {
- "type": "string",
- "nullable": true
- },
- "postgresId": {
- "type": "string",
- "nullable": true
- },
- "mongoId": {
- "type": "string",
- "nullable": true
- },
- "databaseType": {
- "type": "string",
- "enum": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- },
- "userId": {
- "type": "string",
- "nullable": true
- },
- "backupType": {
- "type": "string",
- "enum": ["database", "compose"]
- },
- "composeId": {
- "type": "string",
- "nullable": true
- },
- "serviceName": {
- "type": "string",
- "nullable": true
- },
- "metadata": {
- "nullable": true
- }
- },
- "required": [
- "schedule",
- "prefix",
- "destinationId",
- "database",
- "databaseType"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/backup.one": {
- "get": {
- "operationId": "backup-one",
- "tags": ["backup"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "backupId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/backup.update": {
- "post": {
- "operationId": "backup-update",
- "tags": ["backup"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "schedule": {
- "type": "string"
- },
- "enabled": {
- "type": "boolean",
- "nullable": true
- },
- "prefix": {
- "type": "string",
- "minLength": 1
- },
- "backupId": {
- "type": "string"
- },
- "destinationId": {
- "type": "string"
- },
- "database": {
- "type": "string",
- "minLength": 1
- },
- "keepLatestCount": {
- "type": "number",
- "nullable": true
- },
- "serviceName": {
- "type": "string",
- "nullable": true
- },
- "metadata": {
- "nullable": true
- },
- "databaseType": {
- "type": "string",
- "enum": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- }
- },
- "required": [
- "schedule",
- "prefix",
- "backupId",
- "destinationId",
- "database",
- "serviceName",
- "databaseType"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/backup.remove": {
- "post": {
- "operationId": "backup-remove",
- "tags": ["backup"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "backupId": {
- "type": "string"
- }
- },
- "required": ["backupId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/backup.manualBackupPostgres": {
- "post": {
- "operationId": "backup-manualBackupPostgres",
- "tags": ["backup"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "backupId": {
- "type": "string"
- }
- },
- "required": ["backupId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/backup.manualBackupMySql": {
- "post": {
- "operationId": "backup-manualBackupMySql",
- "tags": ["backup"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "backupId": {
- "type": "string"
- }
- },
- "required": ["backupId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/backup.manualBackupMariadb": {
- "post": {
- "operationId": "backup-manualBackupMariadb",
- "tags": ["backup"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "backupId": {
- "type": "string"
- }
- },
- "required": ["backupId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/backup.manualBackupCompose": {
- "post": {
- "operationId": "backup-manualBackupCompose",
- "tags": ["backup"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "backupId": {
- "type": "string"
- }
- },
- "required": ["backupId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/backup.manualBackupMongo": {
- "post": {
- "operationId": "backup-manualBackupMongo",
- "tags": ["backup"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "backupId": {
- "type": "string"
- }
- },
- "required": ["backupId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/backup.manualBackupWebServer": {
- "post": {
- "operationId": "backup-manualBackupWebServer",
- "tags": ["backup"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "backupId": {
- "type": "string"
- }
- },
- "required": ["backupId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/backup.listBackupFiles": {
- "get": {
- "operationId": "backup-listBackupFiles",
- "tags": ["backup"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "destinationId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "search",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/deployment.all": {
- "get": {
- "operationId": "deployment-all",
- "tags": ["deployment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "applicationId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/deployment.allByCompose": {
- "get": {
- "operationId": "deployment-allByCompose",
- "tags": ["deployment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "composeId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/deployment.allByServer": {
- "get": {
- "operationId": "deployment-allByServer",
- "tags": ["deployment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/deployment.allByType": {
- "get": {
- "operationId": "deployment-allByType",
- "tags": ["deployment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "id",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- },
- {
- "name": "type",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "enum": [
- "application",
- "compose",
- "server",
- "schedule",
- "previewDeployment",
- "backup",
- "volumeBackup"
- ]
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/deployment.killProcess": {
- "post": {
- "operationId": "deployment-killProcess",
- "tags": ["deployment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "deploymentId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["deploymentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/previewDeployment.all": {
- "get": {
- "operationId": "previewDeployment-all",
- "tags": ["previewDeployment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "applicationId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/previewDeployment.delete": {
- "post": {
- "operationId": "previewDeployment-delete",
- "tags": ["previewDeployment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "previewDeploymentId": {
- "type": "string"
- }
- },
- "required": ["previewDeploymentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/previewDeployment.one": {
- "get": {
- "operationId": "previewDeployment-one",
- "tags": ["previewDeployment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "previewDeploymentId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mounts.create": {
- "post": {
- "operationId": "mounts-create",
- "tags": ["mounts"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": ["bind", "volume", "file"]
- },
- "hostPath": {
- "type": "string",
- "nullable": true
- },
- "volumeName": {
- "type": "string",
- "nullable": true
- },
- "content": {
- "type": "string",
- "nullable": true
- },
- "mountPath": {
- "type": "string",
- "minLength": 1
- },
- "serviceType": {
- "type": "string",
- "enum": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ],
- "default": "application"
- },
- "filePath": {
- "type": "string",
- "nullable": true
- },
- "serviceId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["type", "mountPath", "serviceId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mounts.remove": {
- "post": {
- "operationId": "mounts-remove",
- "tags": ["mounts"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mountId": {
- "type": "string"
- }
- },
- "required": ["mountId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mounts.one": {
- "get": {
- "operationId": "mounts-one",
- "tags": ["mounts"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "mountId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mounts.update": {
- "post": {
- "operationId": "mounts-update",
- "tags": ["mounts"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "mountId": {
- "type": "string",
- "minLength": 1
- },
- "type": {
- "type": "string",
- "enum": ["bind", "volume", "file"]
- },
- "hostPath": {
- "type": "string",
- "nullable": true
- },
- "volumeName": {
- "type": "string",
- "nullable": true
- },
- "filePath": {
- "type": "string",
- "nullable": true
- },
- "content": {
- "type": "string",
- "nullable": true
- },
- "serviceType": {
- "type": "string",
- "enum": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ],
- "default": "application"
- },
- "mountPath": {
- "type": "string",
- "minLength": 1
- },
- "applicationId": {
- "type": "string",
- "nullable": true
- },
- "postgresId": {
- "type": "string",
- "nullable": true
- },
- "mariadbId": {
- "type": "string",
- "nullable": true
- },
- "mongoId": {
- "type": "string",
- "nullable": true
- },
- "mysqlId": {
- "type": "string",
- "nullable": true
- },
- "redisId": {
- "type": "string",
- "nullable": true
- },
- "composeId": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["mountId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/mounts.allNamedByApplicationId": {
- "get": {
- "operationId": "mounts-allNamedByApplicationId",
- "tags": ["mounts"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "applicationId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/certificates.create": {
- "post": {
- "operationId": "certificates-create",
- "tags": ["certificates"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "certificateId": {
- "type": "string"
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "certificateData": {
- "type": "string",
- "minLength": 1
- },
- "privateKey": {
- "type": "string",
- "minLength": 1
- },
- "certificatePath": {
- "type": "string"
- },
- "autoRenew": {
- "type": "boolean",
- "nullable": true
- },
- "organizationId": {
- "type": "string"
- },
- "serverId": {
- "type": "string",
- "nullable": true
- }
- },
- "required": [
- "name",
- "certificateData",
- "privateKey",
- "organizationId"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/certificates.one": {
- "get": {
- "operationId": "certificates-one",
- "tags": ["certificates"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "certificateId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/certificates.remove": {
- "post": {
- "operationId": "certificates-remove",
- "tags": ["certificates"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "certificateId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["certificateId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/certificates.all": {
- "get": {
- "operationId": "certificates-all",
- "tags": ["certificates"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.reloadServer": {
- "post": {
- "operationId": "settings-reloadServer",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.cleanRedis": {
- "post": {
- "operationId": "settings-cleanRedis",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.reloadRedis": {
- "post": {
- "operationId": "settings-reloadRedis",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.reloadTraefik": {
- "post": {
- "operationId": "settings-reloadTraefik",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": false,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverId": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.toggleDashboard": {
- "post": {
- "operationId": "settings-toggleDashboard",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "enableDashboard": {
- "type": "boolean"
- },
- "serverId": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.cleanUnusedImages": {
- "post": {
- "operationId": "settings-cleanUnusedImages",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": false,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverId": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.cleanUnusedVolumes": {
- "post": {
- "operationId": "settings-cleanUnusedVolumes",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": false,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverId": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.cleanStoppedContainers": {
- "post": {
- "operationId": "settings-cleanStoppedContainers",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": false,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverId": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.cleanDockerBuilder": {
- "post": {
- "operationId": "settings-cleanDockerBuilder",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": false,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverId": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.cleanDockerPrune": {
- "post": {
- "operationId": "settings-cleanDockerPrune",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": false,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverId": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.cleanAll": {
- "post": {
- "operationId": "settings-cleanAll",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": false,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverId": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.cleanMonitoring": {
- "post": {
- "operationId": "settings-cleanMonitoring",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.saveSSHPrivateKey": {
- "post": {
- "operationId": "settings-saveSSHPrivateKey",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "sshPrivateKey": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["sshPrivateKey"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.assignDomainServer": {
- "post": {
- "operationId": "settings-assignDomainServer",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "host": {
- "type": "string",
- "nullable": true
- },
- "certificateType": {
- "type": "string",
- "enum": ["letsencrypt", "none", "custom"]
- },
- "letsEncryptEmail": {
- "type": "string",
- "nullable": true
- },
- "https": {
- "type": "boolean"
- }
- },
- "required": ["host", "certificateType"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.cleanSSHPrivateKey": {
- "post": {
- "operationId": "settings-cleanSSHPrivateKey",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.updateDockerCleanup": {
- "post": {
- "operationId": "settings-updateDockerCleanup",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "enableDockerCleanup": {
- "type": "boolean"
- },
- "serverId": {
- "type": "string"
- }
- },
- "required": ["enableDockerCleanup"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.readTraefikConfig": {
- "get": {
- "operationId": "settings-readTraefikConfig",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.updateTraefikConfig": {
- "post": {
- "operationId": "settings-updateTraefikConfig",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "traefikConfig": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["traefikConfig"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.readWebServerTraefikConfig": {
- "get": {
- "operationId": "settings-readWebServerTraefikConfig",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.updateWebServerTraefikConfig": {
- "post": {
- "operationId": "settings-updateWebServerTraefikConfig",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "traefikConfig": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["traefikConfig"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.readMiddlewareTraefikConfig": {
- "get": {
- "operationId": "settings-readMiddlewareTraefikConfig",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.updateMiddlewareTraefikConfig": {
- "post": {
- "operationId": "settings-updateMiddlewareTraefikConfig",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "traefikConfig": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["traefikConfig"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.getUpdateData": {
- "post": {
- "operationId": "settings-getUpdateData",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.updateServer": {
- "post": {
- "operationId": "settings-updateServer",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.getDokployVersion": {
- "get": {
- "operationId": "settings-getDokployVersion",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.getReleaseTag": {
- "get": {
- "operationId": "settings-getReleaseTag",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.readDirectories": {
- "get": {
- "operationId": "settings-readDirectories",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.updateTraefikFile": {
- "post": {
- "operationId": "settings-updateTraefikFile",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "path": {
- "type": "string",
- "minLength": 1
- },
- "traefikConfig": {
- "type": "string",
- "minLength": 1
- },
- "serverId": {
- "type": "string"
- }
- },
- "required": ["path", "traefikConfig"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.readTraefikFile": {
- "get": {
- "operationId": "settings-readTraefikFile",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "path",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- },
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.getIp": {
- "get": {
- "operationId": "settings-getIp",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.getOpenApiDocument": {
- "get": {
- "operationId": "settings-getOpenApiDocument",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.readTraefikEnv": {
- "get": {
- "operationId": "settings-readTraefikEnv",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.writeTraefikEnv": {
- "post": {
- "operationId": "settings-writeTraefikEnv",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "env": {
- "type": "string"
- },
- "serverId": {
- "type": "string"
- }
- },
- "required": ["env"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.haveTraefikDashboardPortEnabled": {
- "get": {
- "operationId": "settings-haveTraefikDashboardPortEnabled",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.haveActivateRequests": {
- "get": {
- "operationId": "settings-haveActivateRequests",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.toggleRequests": {
- "post": {
- "operationId": "settings-toggleRequests",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "enable": {
- "type": "boolean"
- }
- },
- "required": ["enable"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.isCloud": {
- "get": {
- "operationId": "settings-isCloud",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.isUserSubscribed": {
- "get": {
- "operationId": "settings-isUserSubscribed",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.health": {
- "get": {
- "operationId": "settings-health",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.setupGPU": {
- "post": {
- "operationId": "settings-setupGPU",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverId": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.checkGPUStatus": {
- "get": {
- "operationId": "settings-checkGPUStatus",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.updateTraefikPorts": {
- "post": {
- "operationId": "settings-updateTraefikPorts",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverId": {
- "type": "string"
- },
- "additionalPorts": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "targetPort": {
- "type": "number"
- },
- "publishedPort": {
- "type": "number"
- },
- "protocol": {
- "type": "string",
- "enum": ["tcp", "udp", "sctp"]
- }
- },
- "required": ["targetPort", "publishedPort", "protocol"],
- "additionalProperties": false
- }
- }
- },
- "required": ["additionalPorts"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.getTraefikPorts": {
- "get": {
- "operationId": "settings-getTraefikPorts",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.updateLogCleanup": {
- "post": {
- "operationId": "settings-updateLogCleanup",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "cronExpression": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["cronExpression"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.getLogCleanupStatus": {
- "get": {
- "operationId": "settings-getLogCleanupStatus",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/settings.getDokployCloudIps": {
- "get": {
- "operationId": "settings-getDokployCloudIps",
- "tags": ["settings"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/security.create": {
- "post": {
- "operationId": "security-create",
- "tags": ["security"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "applicationId": {
- "type": "string"
- },
- "username": {
- "type": "string",
- "minLength": 1
- },
- "password": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["applicationId", "username", "password"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/security.one": {
- "get": {
- "operationId": "security-one",
- "tags": ["security"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "securityId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/security.delete": {
- "post": {
- "operationId": "security-delete",
- "tags": ["security"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "securityId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["securityId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/security.update": {
- "post": {
- "operationId": "security-update",
- "tags": ["security"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "securityId": {
- "type": "string",
- "minLength": 1
- },
- "username": {
- "type": "string",
- "minLength": 1
- },
- "password": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["securityId", "username", "password"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redirects.create": {
- "post": {
- "operationId": "redirects-create",
- "tags": ["redirects"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "regex": {
- "type": "string",
- "minLength": 1
- },
- "replacement": {
- "type": "string",
- "minLength": 1
- },
- "permanent": {
- "type": "boolean"
- },
- "applicationId": {
- "type": "string"
- }
- },
- "required": [
- "regex",
- "replacement",
- "permanent",
- "applicationId"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redirects.one": {
- "get": {
- "operationId": "redirects-one",
- "tags": ["redirects"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "redirectId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redirects.delete": {
- "post": {
- "operationId": "redirects-delete",
- "tags": ["redirects"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redirectId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["redirectId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/redirects.update": {
- "post": {
- "operationId": "redirects-update",
- "tags": ["redirects"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "redirectId": {
- "type": "string",
- "minLength": 1
- },
- "regex": {
- "type": "string",
- "minLength": 1
- },
- "replacement": {
- "type": "string",
- "minLength": 1
- },
- "permanent": {
- "type": "boolean"
- }
- },
- "required": ["redirectId", "regex", "replacement", "permanent"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/port.create": {
- "post": {
- "operationId": "port-create",
- "tags": ["port"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "publishedPort": {
- "type": "number"
- },
- "publishMode": {
- "type": "string",
- "enum": ["ingress", "host"],
- "default": "ingress"
- },
- "targetPort": {
- "type": "number"
- },
- "protocol": {
- "type": "string",
- "enum": ["tcp", "udp"],
- "default": "tcp"
- },
- "applicationId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["publishedPort", "targetPort", "applicationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/port.one": {
- "get": {
- "operationId": "port-one",
- "tags": ["port"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "portId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/port.delete": {
- "post": {
- "operationId": "port-delete",
- "tags": ["port"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "portId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["portId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/port.update": {
- "post": {
- "operationId": "port-update",
- "tags": ["port"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "portId": {
- "type": "string",
- "minLength": 1
- },
- "publishedPort": {
- "type": "number"
- },
- "publishMode": {
- "type": "string",
- "enum": ["ingress", "host"],
- "default": "ingress"
- },
- "targetPort": {
- "type": "number"
- },
- "protocol": {
- "type": "string",
- "enum": ["tcp", "udp"],
- "default": "tcp"
- }
- },
- "required": ["portId", "publishedPort", "targetPort"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/registry.create": {
- "post": {
- "operationId": "registry-create",
- "tags": ["registry"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "registryName": {
- "type": "string",
- "minLength": 1
- },
- "username": {
- "type": "string",
- "minLength": 1
- },
- "password": {
- "type": "string",
- "minLength": 1
- },
- "registryUrl": {
- "type": "string"
- },
- "registryType": {
- "type": "string",
- "enum": ["cloud"]
- },
- "imagePrefix": {
- "type": "string",
- "nullable": true
- },
- "serverId": {
- "type": "string"
- }
- },
- "required": [
- "registryName",
- "username",
- "password",
- "registryUrl",
- "registryType",
- "imagePrefix"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/registry.remove": {
- "post": {
- "operationId": "registry-remove",
- "tags": ["registry"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "registryId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["registryId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/registry.update": {
- "post": {
- "operationId": "registry-update",
- "tags": ["registry"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "registryId": {
- "type": "string",
- "minLength": 1
- },
- "registryName": {
- "type": "string",
- "minLength": 1
- },
- "imagePrefix": {
- "type": "string",
- "nullable": true
- },
- "username": {
- "type": "string",
- "minLength": 1
- },
- "password": {
- "type": "string",
- "minLength": 1
- },
- "registryUrl": {
- "type": "string"
- },
- "createdAt": {
- "type": "string"
- },
- "registryType": {
- "type": "string",
- "enum": ["cloud"]
- },
- "organizationId": {
- "type": "string",
- "minLength": 1
- },
- "serverId": {
- "type": "string"
- }
- },
- "required": ["registryId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/registry.all": {
- "get": {
- "operationId": "registry-all",
- "tags": ["registry"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/registry.one": {
- "get": {
- "operationId": "registry-one",
- "tags": ["registry"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "registryId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/registry.testRegistry": {
- "post": {
- "operationId": "registry-testRegistry",
- "tags": ["registry"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "registryName": {
- "type": "string"
- },
- "username": {
- "type": "string",
- "minLength": 1
- },
- "password": {
- "type": "string",
- "minLength": 1
- },
- "registryUrl": {
- "type": "string"
- },
- "registryType": {
- "type": "string",
- "enum": ["cloud"]
- },
- "imagePrefix": {
- "type": "string",
- "nullable": true
- },
- "serverId": {
- "type": "string"
- }
- },
- "required": [
- "username",
- "password",
- "registryUrl",
- "registryType"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/cluster.getNodes": {
- "get": {
- "operationId": "cluster-getNodes",
- "tags": ["cluster"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/cluster.removeWorker": {
- "post": {
- "operationId": "cluster-removeWorker",
- "tags": ["cluster"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "nodeId": {
- "type": "string"
- },
- "serverId": {
- "type": "string"
- }
- },
- "required": ["nodeId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/cluster.addWorker": {
- "get": {
- "operationId": "cluster-addWorker",
- "tags": ["cluster"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/cluster.addManager": {
- "get": {
- "operationId": "cluster-addManager",
- "tags": ["cluster"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.createSlack": {
- "post": {
- "operationId": "notification-createSlack",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverThreshold": {
- "type": "boolean"
- },
- "webhookUrl": {
- "type": "string",
- "minLength": 1
- },
- "channel": {
- "type": "string"
- }
- },
- "required": [
- "appBuildError",
- "databaseBackup",
- "dokployRestart",
- "name",
- "appDeploy",
- "dockerCleanup",
- "serverThreshold",
- "webhookUrl",
- "channel"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.updateSlack": {
- "post": {
- "operationId": "notification-updateSlack",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverThreshold": {
- "type": "boolean"
- },
- "webhookUrl": {
- "type": "string",
- "minLength": 1
- },
- "channel": {
- "type": "string"
- },
- "notificationId": {
- "type": "string",
- "minLength": 1
- },
- "slackId": {
- "type": "string"
- },
- "organizationId": {
- "type": "string"
- }
- },
- "required": ["notificationId", "slackId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.testSlackConnection": {
- "post": {
- "operationId": "notification-testSlackConnection",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "webhookUrl": {
- "type": "string",
- "minLength": 1
- },
- "channel": {
- "type": "string"
- }
- },
- "required": ["webhookUrl", "channel"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.createTelegram": {
- "post": {
- "operationId": "notification-createTelegram",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverThreshold": {
- "type": "boolean"
- },
- "botToken": {
- "type": "string",
- "minLength": 1
- },
- "chatId": {
- "type": "string",
- "minLength": 1
- },
- "messageThreadId": {
- "type": "string"
- }
- },
- "required": [
- "appBuildError",
- "databaseBackup",
- "dokployRestart",
- "name",
- "appDeploy",
- "dockerCleanup",
- "serverThreshold",
- "botToken",
- "chatId",
- "messageThreadId"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.updateTelegram": {
- "post": {
- "operationId": "notification-updateTelegram",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverThreshold": {
- "type": "boolean"
- },
- "botToken": {
- "type": "string",
- "minLength": 1
- },
- "chatId": {
- "type": "string",
- "minLength": 1
- },
- "messageThreadId": {
- "type": "string"
- },
- "notificationId": {
- "type": "string",
- "minLength": 1
- },
- "telegramId": {
- "type": "string",
- "minLength": 1
- },
- "organizationId": {
- "type": "string"
- }
- },
- "required": ["notificationId", "telegramId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.testTelegramConnection": {
- "post": {
- "operationId": "notification-testTelegramConnection",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "botToken": {
- "type": "string",
- "minLength": 1
- },
- "chatId": {
- "type": "string",
- "minLength": 1
- },
- "messageThreadId": {
- "type": "string"
- }
- },
- "required": ["botToken", "chatId", "messageThreadId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.createDiscord": {
- "post": {
- "operationId": "notification-createDiscord",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverThreshold": {
- "type": "boolean"
- },
- "webhookUrl": {
- "type": "string",
- "minLength": 1
- },
- "decoration": {
- "type": "boolean"
- }
- },
- "required": [
- "appBuildError",
- "databaseBackup",
- "dokployRestart",
- "name",
- "appDeploy",
- "dockerCleanup",
- "serverThreshold",
- "webhookUrl",
- "decoration"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.updateDiscord": {
- "post": {
- "operationId": "notification-updateDiscord",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverThreshold": {
- "type": "boolean"
- },
- "webhookUrl": {
- "type": "string",
- "minLength": 1
- },
- "decoration": {
- "type": "boolean"
- },
- "notificationId": {
- "type": "string",
- "minLength": 1
- },
- "discordId": {
- "type": "string",
- "minLength": 1
- },
- "organizationId": {
- "type": "string"
- }
- },
- "required": ["notificationId", "discordId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.testDiscordConnection": {
- "post": {
- "operationId": "notification-testDiscordConnection",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "webhookUrl": {
- "type": "string",
- "minLength": 1
- },
- "decoration": {
- "type": "boolean"
- }
- },
- "required": ["webhookUrl"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.createEmail": {
- "post": {
- "operationId": "notification-createEmail",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverThreshold": {
- "type": "boolean"
- },
- "smtpServer": {
- "type": "string",
- "minLength": 1
- },
- "smtpPort": {
- "type": "number",
- "minimum": 1
- },
- "username": {
- "type": "string",
- "minLength": 1
- },
- "password": {
- "type": "string",
- "minLength": 1
- },
- "fromAddress": {
- "type": "string",
- "minLength": 1
- },
- "toAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "minItems": 1
- }
- },
- "required": [
- "appBuildError",
- "databaseBackup",
- "dokployRestart",
- "name",
- "appDeploy",
- "dockerCleanup",
- "serverThreshold",
- "smtpServer",
- "smtpPort",
- "username",
- "password",
- "fromAddress",
- "toAddresses"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.updateEmail": {
- "post": {
- "operationId": "notification-updateEmail",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverThreshold": {
- "type": "boolean"
- },
- "smtpServer": {
- "type": "string",
- "minLength": 1
- },
- "smtpPort": {
- "type": "number",
- "minimum": 1
- },
- "username": {
- "type": "string",
- "minLength": 1
- },
- "password": {
- "type": "string",
- "minLength": 1
- },
- "fromAddress": {
- "type": "string",
- "minLength": 1
- },
- "toAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "minItems": 1
- },
- "notificationId": {
- "type": "string",
- "minLength": 1
- },
- "emailId": {
- "type": "string",
- "minLength": 1
- },
- "organizationId": {
- "type": "string"
- }
- },
- "required": ["notificationId", "emailId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.testEmailConnection": {
- "post": {
- "operationId": "notification-testEmailConnection",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "smtpServer": {
- "type": "string",
- "minLength": 1
- },
- "smtpPort": {
- "type": "number",
- "minimum": 1
- },
- "username": {
- "type": "string",
- "minLength": 1
- },
- "password": {
- "type": "string",
- "minLength": 1
- },
- "toAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "minItems": 1
- },
- "fromAddress": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "smtpServer",
- "smtpPort",
- "username",
- "password",
- "toAddresses",
- "fromAddress"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.remove": {
- "post": {
- "operationId": "notification-remove",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "notificationId": {
- "type": "string"
- }
- },
- "required": ["notificationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.one": {
- "get": {
- "operationId": "notification-one",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "notificationId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.all": {
- "get": {
- "operationId": "notification-all",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.receiveNotification": {
- "post": {
- "operationId": "notification-receiveNotification",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "ServerType": {
- "type": "string",
- "enum": ["Dokploy", "Remote"],
- "default": "Dokploy"
- },
- "Type": {
- "type": "string",
- "enum": ["Memory", "CPU"]
- },
- "Value": {
- "type": "number"
- },
- "Threshold": {
- "type": "number"
- },
- "Message": {
- "type": "string"
- },
- "Timestamp": {
- "type": "string"
- },
- "Token": {
- "type": "string"
- }
- },
- "required": [
- "Type",
- "Value",
- "Threshold",
- "Message",
- "Timestamp",
- "Token"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.createGotify": {
- "post": {
- "operationId": "notification-createGotify",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverUrl": {
- "type": "string",
- "minLength": 1
- },
- "appToken": {
- "type": "string",
- "minLength": 1
- },
- "priority": {
- "type": "number",
- "minimum": 1
- },
- "decoration": {
- "type": "boolean"
- }
- },
- "required": [
- "appBuildError",
- "databaseBackup",
- "dokployRestart",
- "name",
- "appDeploy",
- "dockerCleanup",
- "serverUrl",
- "appToken",
- "priority",
- "decoration"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.updateGotify": {
- "post": {
- "operationId": "notification-updateGotify",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverUrl": {
- "type": "string",
- "minLength": 1
- },
- "appToken": {
- "type": "string",
- "minLength": 1
- },
- "priority": {
- "type": "number",
- "minimum": 1
- },
- "decoration": {
- "type": "boolean"
- },
- "notificationId": {
- "type": "string",
- "minLength": 1
- },
- "gotifyId": {
- "type": "string",
- "minLength": 1
- },
- "organizationId": {
- "type": "string"
- }
- },
- "required": ["notificationId", "gotifyId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.testGotifyConnection": {
- "post": {
- "operationId": "notification-testGotifyConnection",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverUrl": {
- "type": "string",
- "minLength": 1
- },
- "appToken": {
- "type": "string",
- "minLength": 1
- },
- "priority": {
- "type": "number",
- "minimum": 1
- },
- "decoration": {
- "type": "boolean"
- }
- },
- "required": ["serverUrl", "appToken", "priority"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.createNtfy": {
- "post": {
- "operationId": "notification-createNtfy",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverUrl": {
- "type": "string",
- "minLength": 1
- },
- "topic": {
- "type": "string",
- "minLength": 1
- },
- "accessToken": {
- "type": "string",
- "minLength": 1
- },
- "priority": {
- "type": "number",
- "minimum": 1
- }
- },
- "required": [
- "appBuildError",
- "databaseBackup",
- "dokployRestart",
- "name",
- "appDeploy",
- "dockerCleanup",
- "serverUrl",
- "topic",
- "accessToken",
- "priority"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.updateNtfy": {
- "post": {
- "operationId": "notification-updateNtfy",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverUrl": {
- "type": "string",
- "minLength": 1
- },
- "topic": {
- "type": "string",
- "minLength": 1
- },
- "accessToken": {
- "type": "string",
- "minLength": 1
- },
- "priority": {
- "type": "number",
- "minimum": 1
- },
- "notificationId": {
- "type": "string",
- "minLength": 1
- },
- "ntfyId": {
- "type": "string",
- "minLength": 1
- },
- "organizationId": {
- "type": "string"
- }
- },
- "required": ["notificationId", "ntfyId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.testNtfyConnection": {
- "post": {
- "operationId": "notification-testNtfyConnection",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverUrl": {
- "type": "string",
- "minLength": 1
- },
- "topic": {
- "type": "string",
- "minLength": 1
- },
- "accessToken": {
- "type": "string",
- "minLength": 1
- },
- "priority": {
- "type": "number",
- "minimum": 1
- }
- },
- "required": ["serverUrl", "topic", "accessToken", "priority"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.createLark": {
- "post": {
- "operationId": "notification-createLark",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverThreshold": {
- "type": "boolean"
- },
- "webhookUrl": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "appBuildError",
- "databaseBackup",
- "dokployRestart",
- "name",
- "appDeploy",
- "dockerCleanup",
- "serverThreshold",
- "webhookUrl"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.updateLark": {
- "post": {
- "operationId": "notification-updateLark",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appBuildError": {
- "type": "boolean"
- },
- "databaseBackup": {
- "type": "boolean"
- },
- "dokployRestart": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "appDeploy": {
- "type": "boolean"
- },
- "dockerCleanup": {
- "type": "boolean"
- },
- "serverThreshold": {
- "type": "boolean"
- },
- "webhookUrl": {
- "type": "string",
- "minLength": 1
- },
- "notificationId": {
- "type": "string",
- "minLength": 1
- },
- "larkId": {
- "type": "string",
- "minLength": 1
- },
- "organizationId": {
- "type": "string"
- }
- },
- "required": ["notificationId", "larkId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.testLarkConnection": {
- "post": {
- "operationId": "notification-testLarkConnection",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "webhookUrl": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["webhookUrl"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/notification.getEmailProviders": {
- "get": {
- "operationId": "notification-getEmailProviders",
- "tags": ["notification"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/sshKey.create": {
- "post": {
- "operationId": "sshKey-create",
- "tags": ["sshKey"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "privateKey": {
- "type": "string"
- },
- "publicKey": {
- "type": "string"
- },
- "organizationId": {
- "type": "string"
- }
- },
- "required": [
- "name",
- "privateKey",
- "publicKey",
- "organizationId"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/sshKey.remove": {
- "post": {
- "operationId": "sshKey-remove",
- "tags": ["sshKey"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "sshKeyId": {
- "type": "string"
- }
- },
- "required": ["sshKeyId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/sshKey.one": {
- "get": {
- "operationId": "sshKey-one",
- "tags": ["sshKey"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "sshKeyId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/sshKey.all": {
- "get": {
- "operationId": "sshKey-all",
- "tags": ["sshKey"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/sshKey.generate": {
- "post": {
- "operationId": "sshKey-generate",
- "tags": ["sshKey"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": ["rsa", "ed25519"]
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/sshKey.update": {
- "post": {
- "operationId": "sshKey-update",
- "tags": ["sshKey"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "lastUsedAt": {
- "type": "string",
- "nullable": true
- },
- "sshKeyId": {
- "type": "string"
- }
- },
- "required": ["sshKeyId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitProvider.getAll": {
- "get": {
- "operationId": "gitProvider-getAll",
- "tags": ["gitProvider"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitProvider.remove": {
- "post": {
- "operationId": "gitProvider-remove",
- "tags": ["gitProvider"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "gitProviderId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["gitProviderId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitea.create": {
- "post": {
- "operationId": "gitea-create",
- "tags": ["gitea"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "giteaId": {
- "type": "string"
- },
- "giteaUrl": {
- "type": "string",
- "minLength": 1
- },
- "redirectUri": {
- "type": "string"
- },
- "clientId": {
- "type": "string"
- },
- "clientSecret": {
- "type": "string"
- },
- "gitProviderId": {
- "type": "string"
- },
- "accessToken": {
- "type": "string"
- },
- "refreshToken": {
- "type": "string"
- },
- "expiresAt": {
- "type": "number"
- },
- "scopes": {
- "type": "string"
- },
- "lastAuthenticatedAt": {
- "type": "number"
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "giteaUsername": {
- "type": "string"
- },
- "organizationName": {
- "type": "string"
- }
- },
- "required": ["giteaUrl", "name"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitea.one": {
- "get": {
- "operationId": "gitea-one",
- "tags": ["gitea"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "giteaId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitea.giteaProviders": {
- "get": {
- "operationId": "gitea-giteaProviders",
- "tags": ["gitea"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitea.getGiteaRepositories": {
- "get": {
- "operationId": "gitea-getGiteaRepositories",
- "tags": ["gitea"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "giteaId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitea.getGiteaBranches": {
- "get": {
- "operationId": "gitea-getGiteaBranches",
- "tags": ["gitea"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "owner",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- },
- {
- "name": "repositoryName",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- },
- {
- "name": "giteaId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitea.testConnection": {
- "post": {
- "operationId": "gitea-testConnection",
- "tags": ["gitea"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "giteaId": {
- "type": "string"
- },
- "organizationName": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitea.update": {
- "post": {
- "operationId": "gitea-update",
- "tags": ["gitea"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "giteaId": {
- "type": "string",
- "minLength": 1
- },
- "giteaUrl": {
- "type": "string",
- "minLength": 1
- },
- "redirectUri": {
- "type": "string"
- },
- "clientId": {
- "type": "string"
- },
- "clientSecret": {
- "type": "string"
- },
- "gitProviderId": {
- "type": "string"
- },
- "accessToken": {
- "type": "string"
- },
- "refreshToken": {
- "type": "string"
- },
- "expiresAt": {
- "type": "number"
- },
- "scopes": {
- "type": "string"
- },
- "lastAuthenticatedAt": {
- "type": "number"
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "giteaUsername": {
- "type": "string"
- },
- "organizationName": {
- "type": "string"
- }
- },
- "required": ["giteaId", "giteaUrl", "gitProviderId", "name"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitea.getGiteaUrl": {
- "get": {
- "operationId": "gitea-getGiteaUrl",
- "tags": ["gitea"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "giteaId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/bitbucket.create": {
- "post": {
- "operationId": "bitbucket-create",
- "tags": ["bitbucket"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "bitbucketId": {
- "type": "string"
- },
- "bitbucketUsername": {
- "type": "string"
- },
- "bitbucketEmail": {
- "type": "string",
- "format": "email"
- },
- "appPassword": {
- "type": "string"
- },
- "apiToken": {
- "type": "string"
- },
- "bitbucketWorkspaceName": {
- "type": "string"
- },
- "gitProviderId": {
- "type": "string"
- },
- "authId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["authId", "name"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/bitbucket.one": {
- "get": {
- "operationId": "bitbucket-one",
- "tags": ["bitbucket"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "bitbucketId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/bitbucket.bitbucketProviders": {
- "get": {
- "operationId": "bitbucket-bitbucketProviders",
- "tags": ["bitbucket"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/bitbucket.getBitbucketRepositories": {
- "get": {
- "operationId": "bitbucket-getBitbucketRepositories",
- "tags": ["bitbucket"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "bitbucketId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/bitbucket.getBitbucketBranches": {
- "get": {
- "operationId": "bitbucket-getBitbucketBranches",
- "tags": ["bitbucket"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "owner",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "bitbucketId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/bitbucket.testConnection": {
- "post": {
- "operationId": "bitbucket-testConnection",
- "tags": ["bitbucket"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "bitbucketId": {
- "type": "string",
- "minLength": 1
- },
- "bitbucketUsername": {
- "type": "string"
- },
- "bitbucketEmail": {
- "type": "string",
- "format": "email"
- },
- "workspaceName": {
- "type": "string"
- },
- "apiToken": {
- "type": "string"
- },
- "appPassword": {
- "type": "string"
- }
- },
- "required": ["bitbucketId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/bitbucket.update": {
- "post": {
- "operationId": "bitbucket-update",
- "tags": ["bitbucket"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "bitbucketId": {
- "type": "string",
- "minLength": 1
- },
- "bitbucketUsername": {
- "type": "string"
- },
- "bitbucketEmail": {
- "type": "string",
- "format": "email"
- },
- "appPassword": {
- "type": "string"
- },
- "apiToken": {
- "type": "string"
- },
- "bitbucketWorkspaceName": {
- "type": "string"
- },
- "gitProviderId": {
- "type": "string"
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "organizationId": {
- "type": "string"
- }
- },
- "required": ["bitbucketId", "gitProviderId", "name"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitlab.create": {
- "post": {
- "operationId": "gitlab-create",
- "tags": ["gitlab"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "gitlabId": {
- "type": "string"
- },
- "gitlabUrl": {
- "type": "string",
- "minLength": 1
- },
- "applicationId": {
- "type": "string"
- },
- "redirectUri": {
- "type": "string"
- },
- "secret": {
- "type": "string"
- },
- "accessToken": {
- "type": "string",
- "nullable": true
- },
- "refreshToken": {
- "type": "string",
- "nullable": true
- },
- "groupName": {
- "type": "string"
- },
- "expiresAt": {
- "type": "number",
- "nullable": true
- },
- "gitProviderId": {
- "type": "string"
- },
- "authId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["gitlabUrl", "authId", "name"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitlab.one": {
- "get": {
- "operationId": "gitlab-one",
- "tags": ["gitlab"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "gitlabId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitlab.gitlabProviders": {
- "get": {
- "operationId": "gitlab-gitlabProviders",
- "tags": ["gitlab"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitlab.getGitlabRepositories": {
- "get": {
- "operationId": "gitlab-getGitlabRepositories",
- "tags": ["gitlab"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "gitlabId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitlab.getGitlabBranches": {
- "get": {
- "operationId": "gitlab-getGitlabBranches",
- "tags": ["gitlab"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "owner",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "gitlabId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitlab.testConnection": {
- "post": {
- "operationId": "gitlab-testConnection",
- "tags": ["gitlab"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "gitlabId": {
- "type": "string"
- },
- "groupName": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/gitlab.update": {
- "post": {
- "operationId": "gitlab-update",
- "tags": ["gitlab"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "gitlabId": {
- "type": "string",
- "minLength": 1
- },
- "gitlabUrl": {
- "type": "string",
- "minLength": 1
- },
- "applicationId": {
- "type": "string"
- },
- "redirectUri": {
- "type": "string"
- },
- "secret": {
- "type": "string"
- },
- "accessToken": {
- "type": "string",
- "nullable": true
- },
- "refreshToken": {
- "type": "string",
- "nullable": true
- },
- "groupName": {
- "type": "string"
- },
- "expiresAt": {
- "type": "number",
- "nullable": true
- },
- "gitProviderId": {
- "type": "string"
- },
- "name": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["gitlabId", "gitlabUrl", "gitProviderId", "name"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/github.one": {
- "get": {
- "operationId": "github-one",
- "tags": ["github"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "githubId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/github.getGithubRepositories": {
- "get": {
- "operationId": "github-getGithubRepositories",
- "tags": ["github"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "githubId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/github.getGithubBranches": {
- "get": {
- "operationId": "github-getGithubBranches",
- "tags": ["github"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "repo",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- },
- {
- "name": "owner",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- },
- {
- "name": "githubId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/github.githubProviders": {
- "get": {
- "operationId": "github-githubProviders",
- "tags": ["github"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/github.testConnection": {
- "post": {
- "operationId": "github-testConnection",
- "tags": ["github"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "githubId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["githubId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/github.update": {
- "post": {
- "operationId": "github-update",
- "tags": ["github"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "githubId": {
- "type": "string",
- "minLength": 1
- },
- "githubAppName": {
- "type": "string",
- "minLength": 1
- },
- "githubAppId": {
- "type": "number",
- "nullable": true
- },
- "githubClientId": {
- "type": "string",
- "nullable": true
- },
- "githubClientSecret": {
- "type": "string",
- "nullable": true
- },
- "githubInstallationId": {
- "type": "string",
- "nullable": true
- },
- "githubPrivateKey": {
- "type": "string",
- "nullable": true
- },
- "githubWebhookSecret": {
- "type": "string",
- "nullable": true
- },
- "gitProviderId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "githubId",
- "githubAppName",
- "gitProviderId",
- "name"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.create": {
- "post": {
- "operationId": "server-create",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "ipAddress": {
- "type": "string"
- },
- "port": {
- "type": "number"
- },
- "username": {
- "type": "string"
- },
- "sshKeyId": {
- "type": "string",
- "nullable": true
- },
- "serverType": {
- "type": "string",
- "enum": ["deploy", "build"]
- }
- },
- "required": [
- "name",
- "ipAddress",
- "port",
- "username",
- "sshKeyId",
- "serverType"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.one": {
- "get": {
- "operationId": "server-one",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.getDefaultCommand": {
- "get": {
- "operationId": "server-getDefaultCommand",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.all": {
- "get": {
- "operationId": "server-all",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.count": {
- "get": {
- "operationId": "server-count",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.withSSHKey": {
- "get": {
- "operationId": "server-withSSHKey",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.buildServers": {
- "get": {
- "operationId": "server-buildServers",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.setup": {
- "post": {
- "operationId": "server-setup",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["serverId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.validate": {
- "get": {
- "operationId": "server-validate",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.security": {
- "get": {
- "operationId": "server-security",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.setupMonitoring": {
- "post": {
- "operationId": "server-setupMonitoring",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverId": {
- "type": "string",
- "minLength": 1
- },
- "metricsConfig": {
- "type": "object",
- "properties": {
- "server": {
- "type": "object",
- "properties": {
- "refreshRate": {
- "type": "number",
- "minimum": 2
- },
- "port": {
- "type": "number",
- "minimum": 1
- },
- "token": {
- "type": "string"
- },
- "urlCallback": {
- "type": "string",
- "format": "uri"
- },
- "retentionDays": {
- "type": "number",
- "minimum": 1
- },
- "cronJob": {
- "type": "string",
- "minLength": 1
- },
- "thresholds": {
- "type": "object",
- "properties": {
- "cpu": {
- "type": "number",
- "minimum": 0
- },
- "memory": {
- "type": "number",
- "minimum": 0
- }
- },
- "required": ["cpu", "memory"],
- "additionalProperties": false
- }
- },
- "required": [
- "refreshRate",
- "port",
- "token",
- "urlCallback",
- "retentionDays",
- "cronJob",
- "thresholds"
- ],
- "additionalProperties": false
- },
- "containers": {
- "type": "object",
- "properties": {
- "refreshRate": {
- "type": "number",
- "minimum": 2
- },
- "services": {
- "type": "object",
- "properties": {
- "include": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "exclude": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false
- }
- },
- "required": ["refreshRate", "services"],
- "additionalProperties": false
- }
- },
- "required": ["server", "containers"],
- "additionalProperties": false
- }
- },
- "required": ["serverId", "metricsConfig"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.remove": {
- "post": {
- "operationId": "server-remove",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "serverId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["serverId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.update": {
- "post": {
- "operationId": "server-update",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "serverId": {
- "type": "string",
- "minLength": 1
- },
- "ipAddress": {
- "type": "string"
- },
- "port": {
- "type": "number"
- },
- "username": {
- "type": "string"
- },
- "sshKeyId": {
- "type": "string",
- "nullable": true
- },
- "serverType": {
- "type": "string",
- "enum": ["deploy", "build"]
- },
- "command": {
- "type": "string"
- }
- },
- "required": [
- "name",
- "serverId",
- "ipAddress",
- "port",
- "username",
- "sshKeyId",
- "serverType"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.publicIp": {
- "get": {
- "operationId": "server-publicIp",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.getServerTime": {
- "get": {
- "operationId": "server-getServerTime",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/server.getServerMetrics": {
- "get": {
- "operationId": "server-getServerMetrics",
- "tags": ["server"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "url",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "token",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "dataPoints",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/stripe.getProducts": {
- "get": {
- "operationId": "stripe-getProducts",
- "tags": ["stripe"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/stripe.createCheckoutSession": {
- "post": {
- "operationId": "stripe-createCheckoutSession",
- "tags": ["stripe"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "productId": {
- "type": "string"
- },
- "serverQuantity": {
- "type": "number",
- "minimum": 1
- },
- "isAnnual": {
- "type": "boolean"
- }
- },
- "required": ["productId", "serverQuantity", "isAnnual"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/stripe.createCustomerPortalSession": {
- "post": {
- "operationId": "stripe-createCustomerPortalSession",
- "tags": ["stripe"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/stripe.canCreateMoreServers": {
- "get": {
- "operationId": "stripe-canCreateMoreServers",
- "tags": ["stripe"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/swarm.getNodes": {
- "get": {
- "operationId": "swarm-getNodes",
- "tags": ["swarm"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/swarm.getNodeInfo": {
- "get": {
- "operationId": "swarm-getNodeInfo",
- "tags": ["swarm"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "nodeId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/swarm.getNodeApps": {
- "get": {
- "operationId": "swarm-getNodeApps",
- "tags": ["swarm"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "serverId",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/ai.one": {
- "get": {
- "operationId": "ai-one",
- "tags": ["ai"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "aiId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/ai.getModels": {
- "get": {
- "operationId": "ai-getModels",
- "tags": ["ai"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "apiUrl",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- },
- {
- "name": "apiKey",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/ai.create": {
- "post": {
- "operationId": "ai-create",
- "tags": ["ai"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "apiUrl": {
- "type": "string",
- "format": "uri"
- },
- "apiKey": {
- "type": "string"
- },
- "model": {
- "type": "string",
- "minLength": 1
- },
- "isEnabled": {
- "type": "boolean"
- }
- },
- "required": ["name", "apiUrl", "apiKey", "model", "isEnabled"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/ai.update": {
- "post": {
- "operationId": "ai-update",
- "tags": ["ai"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "aiId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "apiUrl": {
- "type": "string",
- "format": "uri"
- },
- "apiKey": {
- "type": "string"
- },
- "model": {
- "type": "string",
- "minLength": 1
- },
- "isEnabled": {
- "type": "boolean"
- },
- "createdAt": {
- "type": "string"
- }
- },
- "required": ["aiId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/ai.getAll": {
- "get": {
- "operationId": "ai-getAll",
- "tags": ["ai"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/ai.get": {
- "get": {
- "operationId": "ai-get",
- "tags": ["ai"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "aiId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/ai.delete": {
- "post": {
- "operationId": "ai-delete",
- "tags": ["ai"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "aiId": {
- "type": "string"
- }
- },
- "required": ["aiId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/ai.suggest": {
- "post": {
- "operationId": "ai-suggest",
- "tags": ["ai"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "aiId": {
- "type": "string"
- },
- "input": {
- "type": "string"
- },
- "serverId": {
- "type": "string"
- }
- },
- "required": ["aiId", "input"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/ai.deploy": {
- "post": {
- "operationId": "ai-deploy",
- "tags": ["ai"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "environmentId": {
- "type": "string",
- "minLength": 1
- },
- "id": {
- "type": "string",
- "minLength": 1
- },
- "dockerCompose": {
- "type": "string",
- "minLength": 1
- },
- "envVariables": {
- "type": "string"
- },
- "serverId": {
- "type": "string"
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string"
- },
- "domains": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "host": {
- "type": "string",
- "minLength": 1
- },
- "port": {
- "type": "number",
- "minimum": 1
- },
- "serviceName": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["host", "port", "serviceName"],
- "additionalProperties": false
- }
- },
- "configFiles": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "filePath": {
- "type": "string",
- "minLength": 1
- },
- "content": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["filePath", "content"],
- "additionalProperties": false
- }
- }
- },
- "required": [
- "environmentId",
- "id",
- "dockerCompose",
- "envVariables",
- "name",
- "description"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/organization.create": {
- "post": {
- "operationId": "organization-create",
- "tags": ["organization"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "logo": {
- "type": "string"
- }
- },
- "required": ["name"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/organization.all": {
- "get": {
- "operationId": "organization-all",
- "tags": ["organization"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/organization.one": {
- "get": {
- "operationId": "organization-one",
- "tags": ["organization"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "organizationId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/organization.update": {
- "post": {
- "operationId": "organization-update",
- "tags": ["organization"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "organizationId": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "logo": {
- "type": "string"
- }
- },
- "required": ["organizationId", "name"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/organization.delete": {
- "post": {
- "operationId": "organization-delete",
- "tags": ["organization"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "organizationId": {
- "type": "string"
- }
- },
- "required": ["organizationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/organization.allInvitations": {
- "get": {
- "operationId": "organization-allInvitations",
- "tags": ["organization"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/organization.removeInvitation": {
- "post": {
- "operationId": "organization-removeInvitation",
- "tags": ["organization"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "invitationId": {
- "type": "string"
- }
- },
- "required": ["invitationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/organization.setDefault": {
- "post": {
- "operationId": "organization-setDefault",
- "tags": ["organization"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "organizationId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["organizationId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/schedule.create": {
- "post": {
- "operationId": "schedule-create",
- "tags": ["schedule"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "scheduleId": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "cronExpression": {
- "type": "string"
- },
- "appName": {
- "type": "string"
- },
- "serviceName": {
- "type": "string",
- "nullable": true
- },
- "shellType": {
- "type": "string",
- "enum": ["bash", "sh"]
- },
- "scheduleType": {
- "type": "string",
- "enum": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "command": {
- "type": "string"
- },
- "script": {
- "type": "string",
- "nullable": true
- },
- "applicationId": {
- "type": "string",
- "nullable": true
- },
- "composeId": {
- "type": "string",
- "nullable": true
- },
- "serverId": {
- "type": "string",
- "nullable": true
- },
- "userId": {
- "type": "string",
- "nullable": true
- },
- "enabled": {
- "type": "boolean"
- },
- "createdAt": {
- "type": "string"
- }
- },
- "required": ["name", "cronExpression", "command"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/schedule.update": {
- "post": {
- "operationId": "schedule-update",
- "tags": ["schedule"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "scheduleId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string"
- },
- "cronExpression": {
- "type": "string"
- },
- "appName": {
- "type": "string"
- },
- "serviceName": {
- "type": "string",
- "nullable": true
- },
- "shellType": {
- "type": "string",
- "enum": ["bash", "sh"]
- },
- "scheduleType": {
- "type": "string",
- "enum": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "command": {
- "type": "string"
- },
- "script": {
- "type": "string",
- "nullable": true
- },
- "applicationId": {
- "type": "string",
- "nullable": true
- },
- "composeId": {
- "type": "string",
- "nullable": true
- },
- "serverId": {
- "type": "string",
- "nullable": true
- },
- "userId": {
- "type": "string",
- "nullable": true
- },
- "enabled": {
- "type": "boolean"
- },
- "createdAt": {
- "type": "string"
- }
- },
- "required": ["scheduleId", "name", "cronExpression", "command"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/schedule.delete": {
- "post": {
- "operationId": "schedule-delete",
- "tags": ["schedule"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "scheduleId": {
- "type": "string"
- }
- },
- "required": ["scheduleId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/schedule.list": {
- "get": {
- "operationId": "schedule-list",
- "tags": ["schedule"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "id",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "scheduleType",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "enum": ["application", "compose", "server", "dokploy-server"]
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/schedule.one": {
- "get": {
- "operationId": "schedule-one",
- "tags": ["schedule"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "scheduleId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/schedule.runManually": {
- "post": {
- "operationId": "schedule-runManually",
- "tags": ["schedule"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "scheduleId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["scheduleId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/rollback.delete": {
- "post": {
- "operationId": "rollback-delete",
- "tags": ["rollback"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "rollbackId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["rollbackId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/rollback.rollback": {
- "post": {
- "operationId": "rollback-rollback",
- "tags": ["rollback"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "rollbackId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["rollbackId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/volumeBackups.list": {
- "get": {
- "operationId": "volumeBackups-list",
- "tags": ["volumeBackups"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "id",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- },
- {
- "name": "volumeBackupType",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "enum": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ]
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/volumeBackups.create": {
- "post": {
- "operationId": "volumeBackups-create",
- "tags": ["volumeBackups"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "volumeName": {
- "type": "string"
- },
- "prefix": {
- "type": "string"
- },
- "serviceType": {
- "type": "string",
- "enum": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ]
- },
- "appName": {
- "type": "string"
- },
- "serviceName": {
- "type": "string",
- "nullable": true
- },
- "turnOff": {
- "type": "boolean"
- },
- "cronExpression": {
- "type": "string"
- },
- "keepLatestCount": {
- "type": "number",
- "nullable": true
- },
- "enabled": {
- "type": "boolean",
- "nullable": true
- },
- "applicationId": {
- "type": "string",
- "nullable": true
- },
- "postgresId": {
- "type": "string",
- "nullable": true
- },
- "mariadbId": {
- "type": "string",
- "nullable": true
- },
- "mongoId": {
- "type": "string",
- "nullable": true
- },
- "mysqlId": {
- "type": "string",
- "nullable": true
- },
- "redisId": {
- "type": "string",
- "nullable": true
- },
- "composeId": {
- "type": "string",
- "nullable": true
- },
- "createdAt": {
- "type": "string"
- },
- "destinationId": {
- "type": "string"
- }
- },
- "required": [
- "name",
- "volumeName",
- "prefix",
- "cronExpression",
- "destinationId"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/volumeBackups.one": {
- "get": {
- "operationId": "volumeBackups-one",
- "tags": ["volumeBackups"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "volumeBackupId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/volumeBackups.delete": {
- "post": {
- "operationId": "volumeBackups-delete",
- "tags": ["volumeBackups"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "volumeBackupId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["volumeBackupId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/volumeBackups.update": {
- "post": {
- "operationId": "volumeBackups-update",
- "tags": ["volumeBackups"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "volumeName": {
- "type": "string"
- },
- "prefix": {
- "type": "string"
- },
- "serviceType": {
- "type": "string",
- "enum": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ]
- },
- "appName": {
- "type": "string"
- },
- "serviceName": {
- "type": "string",
- "nullable": true
- },
- "turnOff": {
- "type": "boolean"
- },
- "cronExpression": {
- "type": "string"
- },
- "keepLatestCount": {
- "type": "number",
- "nullable": true
- },
- "enabled": {
- "type": "boolean",
- "nullable": true
- },
- "applicationId": {
- "type": "string",
- "nullable": true
- },
- "postgresId": {
- "type": "string",
- "nullable": true
- },
- "mariadbId": {
- "type": "string",
- "nullable": true
- },
- "mongoId": {
- "type": "string",
- "nullable": true
- },
- "mysqlId": {
- "type": "string",
- "nullable": true
- },
- "redisId": {
- "type": "string",
- "nullable": true
- },
- "composeId": {
- "type": "string",
- "nullable": true
- },
- "createdAt": {
- "type": "string"
- },
- "destinationId": {
- "type": "string"
- },
- "volumeBackupId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "name",
- "volumeName",
- "prefix",
- "cronExpression",
- "destinationId",
- "volumeBackupId"
- ],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/volumeBackups.runManually": {
- "post": {
- "operationId": "volumeBackups-runManually",
- "tags": ["volumeBackups"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "volumeBackupId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["volumeBackupId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/environment.create": {
- "post": {
- "operationId": "environment-create",
- "tags": ["environment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "projectId": {
- "type": "string"
- }
- },
- "required": ["name", "projectId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/environment.one": {
- "get": {
- "operationId": "environment-one",
- "tags": ["environment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "environmentId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/environment.byProjectId": {
- "get": {
- "operationId": "environment-byProjectId",
- "tags": ["environment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "parameters": [
- {
- "name": "projectId",
- "in": "query",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/environment.remove": {
- "post": {
- "operationId": "environment-remove",
- "tags": ["environment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "environmentId": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": ["environmentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/environment.update": {
- "post": {
- "operationId": "environment-update",
- "tags": ["environment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "environmentId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- },
- "createdAt": {
- "type": "string"
- },
- "env": {
- "type": "string"
- },
- "projectId": {
- "type": "string"
- }
- },
- "required": ["environmentId"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- },
- "/environment.duplicate": {
- "post": {
- "operationId": "environment-duplicate",
- "tags": ["environment"],
- "security": [
- {
- "Authorization": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "environmentId": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- },
- "description": {
- "type": "string",
- "nullable": true
- }
- },
- "required": ["environmentId", "name"],
- "additionalProperties": false
- }
- }
- }
- },
- "parameters": [],
- "responses": {
- "200": {
- "description": "Successful response",
- "content": {
- "application/json": {}
- }
- },
- "default": {
- "$ref": "#/components/responses/error"
- }
- }
- }
- }
- },
- "components": {
- "securitySchemes": {
- "apiKey": {
- "type": "apiKey",
- "in": "header",
- "name": "x-api-key",
- "description": "API key authentication. Generate an API key from your Dokploy dashboard under Settings > API Keys."
- }
- },
- "responses": {
- "error": {
- "description": "Error response",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "issues": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- }
- },
- "required": ["message"],
- "additionalProperties": false
- }
- }
- },
- "required": ["message", "code"],
- "additionalProperties": false
- }
- }
- }
- }
- }
- },
- "tags": [
- {
- "name": "admin"
- },
- {
- "name": "docker"
- },
- {
- "name": "compose"
- },
- {
- "name": "registry"
- },
- {
- "name": "cluster"
- },
- {
- "name": "user"
- },
- {
- "name": "domain"
- },
- {
- "name": "destination"
- },
- {
- "name": "backup"
- },
- {
- "name": "deployment"
- },
- {
- "name": "mounts"
- },
- {
- "name": "certificates"
- },
- {
- "name": "settings"
- },
- {
- "name": "security"
- },
- {
- "name": "redirects"
- },
- {
- "name": "port"
- },
- {
- "name": "project"
- },
- {
- "name": "application"
- },
- {
- "name": "mysql"
- },
- {
- "name": "postgres"
- },
- {
- "name": "redis"
- },
- {
- "name": "mongo"
- },
- {
- "name": "mariadb"
- },
- {
- "name": "sshRouter"
- },
- {
- "name": "gitProvider"
- },
- {
- "name": "bitbucket"
- },
- {
- "name": "github"
- },
- {
- "name": "gitlab"
- },
- {
- "name": "gitea"
- },
- {
- "name": "server"
- },
- {
- "name": "swarm"
- },
- {
- "name": "ai"
- },
- {
- "name": "organization"
- },
- {
- "name": "schedule"
- },
- {
- "name": "rollback"
- },
- {
- "name": "volumeBackups"
- },
- {
- "name": "environment"
- }
- ],
- "externalDocs": {
- "description": "Full documentation",
- "url": "https://docs.dokploy.com"
- },
- "security": [
- {
- "apiKey": []
- }
- ]
+ "openapi": "3.1.0",
+ "info": {
+ "title": "Dokploy API",
+ "description": "Complete API documentation for Dokploy - Deploy applications, manage databases, and orchestrate your infrastructure. This API allows you to programmatically manage all aspects of your Dokploy instance.",
+ "version": "1.0.0",
+ "contact": {
+ "name": "Dokploy Team",
+ "url": "https://dokploy.com"
+ },
+ "license": {
+ "name": "Apache 2.0",
+ "url": "https://github.com/dokploy/dokploy/blob/canary/LICENSE"
+ }
+ },
+ "servers": [
+ {
+ "url": "https://your-dokploy-instance.com/api"
+ }
+ ],
+ "tags": [
+ {
+ "name": "admin"
+ },
+ {
+ "name": "docker"
+ },
+ {
+ "name": "compose"
+ },
+ {
+ "name": "registry"
+ },
+ {
+ "name": "cluster"
+ },
+ {
+ "name": "user"
+ },
+ {
+ "name": "domain"
+ },
+ {
+ "name": "destination"
+ },
+ {
+ "name": "backup"
+ },
+ {
+ "name": "deployment"
+ },
+ {
+ "name": "mounts"
+ },
+ {
+ "name": "certificates"
+ },
+ {
+ "name": "settings"
+ },
+ {
+ "name": "security"
+ },
+ {
+ "name": "redirects"
+ },
+ {
+ "name": "port"
+ },
+ {
+ "name": "project"
+ },
+ {
+ "name": "application"
+ },
+ {
+ "name": "mysql"
+ },
+ {
+ "name": "postgres"
+ },
+ {
+ "name": "redis"
+ },
+ {
+ "name": "mongo"
+ },
+ {
+ "name": "mariadb"
+ },
+ {
+ "name": "sshRouter"
+ },
+ {
+ "name": "gitProvider"
+ },
+ {
+ "name": "bitbucket"
+ },
+ {
+ "name": "github"
+ },
+ {
+ "name": "gitlab"
+ },
+ {
+ "name": "gitea"
+ },
+ {
+ "name": "server"
+ },
+ {
+ "name": "swarm"
+ },
+ {
+ "name": "ai"
+ },
+ {
+ "name": "organization"
+ },
+ {
+ "name": "schedule"
+ },
+ {
+ "name": "rollback"
+ },
+ {
+ "name": "volumeBackups"
+ },
+ {
+ "name": "environment"
+ }
+ ],
+ "externalDocs": {
+ "description": "Full documentation",
+ "url": "https://docs.dokploy.com"
+ },
+ "paths": {
+ "/admin.setupMonitoring": {
+ "post": {
+ "operationId": "admin-setupMonitoring",
+ "tags": [
+ "admin"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "metricsConfig": {
+ "type": "object",
+ "properties": {
+ "server": {
+ "type": "object",
+ "properties": {
+ "refreshRate": {
+ "type": "number"
+ },
+ "port": {
+ "type": "number"
+ },
+ "token": {
+ "type": "string"
+ },
+ "urlCallback": {
+ "type": "string"
+ },
+ "retentionDays": {
+ "type": "number"
+ },
+ "cronJob": {
+ "type": "string"
+ },
+ "thresholds": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "number"
+ },
+ "memory": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "cpu",
+ "memory"
+ ]
+ }
+ },
+ "required": [
+ "refreshRate",
+ "port",
+ "token",
+ "urlCallback",
+ "retentionDays",
+ "cronJob",
+ "thresholds"
+ ]
+ },
+ "containers": {
+ "type": "object",
+ "properties": {
+ "refreshRate": {
+ "type": "number"
+ },
+ "services": {
+ "type": "object",
+ "properties": {
+ "include": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "exclude": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "required": [
+ "refreshRate",
+ "services"
+ ]
+ }
+ },
+ "required": [
+ "server",
+ "containers"
+ ]
+ }
+ },
+ "required": [
+ "metricsConfig"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/docker.getContainers": {
+ "get": {
+ "operationId": "docker-getContainers",
+ "tags": [
+ "docker"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/docker.restartContainer": {
+ "post": {
+ "operationId": "docker-restartContainer",
+ "tags": [
+ "docker"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "containerId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "containerId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/docker.getConfig": {
+ "get": {
+ "operationId": "docker-getConfig",
+ "tags": [
+ "docker"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "containerId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/docker.getContainersByAppNameMatch": {
+ "get": {
+ "operationId": "docker-getContainersByAppNameMatch",
+ "tags": [
+ "docker"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "appType",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "stack",
+ "docker-compose"
+ ]
+ }
+ },
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/docker.getContainersByAppLabel": {
+ "get": {
+ "operationId": "docker-getContainersByAppLabel",
+ "tags": [
+ "docker"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "standalone",
+ "swarm"
+ ]
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/docker.getStackContainersByAppName": {
+ "get": {
+ "operationId": "docker-getStackContainersByAppName",
+ "tags": [
+ "docker"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/docker.getServiceContainersByAppName": {
+ "get": {
+ "operationId": "docker-getServiceContainersByAppName",
+ "tags": [
+ "docker"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/project.create": {
+ "post": {
+ "operationId": "project-create",
+ "tags": [
+ "project"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "env": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/project.one": {
+ "get": {
+ "operationId": "project-one",
+ "tags": [
+ "project"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "projectId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/project.all": {
+ "get": {
+ "operationId": "project-all",
+ "tags": [
+ "project"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/project.allForPermissions": {
+ "get": {
+ "operationId": "project-allForPermissions",
+ "tags": [
+ "project"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/project.search": {
+ "get": {
+ "operationId": "project-search",
+ "tags": [
+ "project"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "q",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "description",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 20,
+ "type": "number"
+ }
+ },
+ {
+ "in": "query",
+ "name": "offset",
+ "schema": {
+ "default": 0,
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/project.remove": {
+ "post": {
+ "operationId": "project-remove",
+ "tags": [
+ "project"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "projectId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "projectId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/project.update": {
+ "post": {
+ "operationId": "project-update",
+ "tags": [
+ "project"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "projectId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ },
+ "env": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "projectId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/project.duplicate": {
+ "post": {
+ "operationId": "project-duplicate",
+ "tags": [
+ "project"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "sourceEnvironmentId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "includeServices": {
+ "default": true,
+ "type": "boolean"
+ },
+ "selectedServices": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "application",
+ "postgres",
+ "mariadb",
+ "mongo",
+ "mysql",
+ "redis",
+ "compose"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "type"
+ ]
+ }
+ },
+ "duplicateInSameProject": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "sourceEnvironmentId",
+ "name"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.create": {
+ "post": {
+ "operationId": "application-create",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "environmentId": {
+ "type": "string"
+ },
+ "serverId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "name",
+ "environmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.one": {
+ "get": {
+ "operationId": "application-one",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "applicationId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.reload": {
+ "post": {
+ "operationId": "application-reload",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appName": {
+ "type": "string"
+ },
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "appName",
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.delete": {
+ "post": {
+ "operationId": "application-delete",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.stop": {
+ "post": {
+ "operationId": "application-stop",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.start": {
+ "post": {
+ "operationId": "application-start",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.redeploy": {
+ "post": {
+ "operationId": "application-redeploy",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.saveEnvironment": {
+ "post": {
+ "operationId": "application-saveEnvironment",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "buildArgs": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "buildSecrets": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "createEnvFile": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "applicationId",
+ "env",
+ "buildArgs",
+ "buildSecrets",
+ "createEnvFile"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.saveBuildType": {
+ "post": {
+ "operationId": "application-saveBuildType",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "buildType": {
+ "type": "string",
+ "enum": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "dockerfile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "dockerContextPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "dockerBuildStage": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "herokuVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "railpackVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "publishDirectory": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "isStaticSpa": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "applicationId",
+ "buildType",
+ "dockerfile",
+ "dockerContextPath",
+ "dockerBuildStage",
+ "herokuVersion",
+ "railpackVersion"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.saveGithubProvider": {
+ "post": {
+ "operationId": "application-saveGithubProvider",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "repository": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "branch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "owner": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "buildPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "githubId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "triggerType": {
+ "default": "push",
+ "type": "string",
+ "enum": [
+ "push",
+ "tag"
+ ]
+ },
+ "enableSubmodules": {
+ "type": "boolean"
+ },
+ "watchPaths": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "applicationId",
+ "repository",
+ "branch",
+ "owner",
+ "buildPath",
+ "githubId",
+ "triggerType"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.saveGitlabProvider": {
+ "post": {
+ "operationId": "application-saveGitlabProvider",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "gitlabBranch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabBuildPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabOwner": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabRepository": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabProjectId": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabPathNamespace": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "enableSubmodules": {
+ "type": "boolean"
+ },
+ "watchPaths": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "applicationId",
+ "gitlabBranch",
+ "gitlabBuildPath",
+ "gitlabOwner",
+ "gitlabRepository",
+ "gitlabId",
+ "gitlabProjectId",
+ "gitlabPathNamespace"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.saveBitbucketProvider": {
+ "post": {
+ "operationId": "application-saveBitbucketProvider",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "bitbucketBranch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketBuildPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketOwner": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketRepository": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketRepositorySlug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "applicationId": {
+ "type": "string"
+ },
+ "enableSubmodules": {
+ "type": "boolean"
+ },
+ "watchPaths": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "bitbucketBranch",
+ "bitbucketBuildPath",
+ "bitbucketOwner",
+ "bitbucketRepository",
+ "bitbucketRepositorySlug",
+ "bitbucketId",
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.saveGiteaProvider": {
+ "post": {
+ "operationId": "application-saveGiteaProvider",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "giteaBranch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaBuildPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaOwner": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaRepository": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "enableSubmodules": {
+ "type": "boolean"
+ },
+ "watchPaths": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "applicationId",
+ "giteaBranch",
+ "giteaBuildPath",
+ "giteaOwner",
+ "giteaRepository",
+ "giteaId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.saveDockerProvider": {
+ "post": {
+ "operationId": "application-saveDockerProvider",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "dockerImage": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "applicationId": {
+ "type": "string"
+ },
+ "username": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "password": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "registryUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "dockerImage",
+ "applicationId",
+ "username",
+ "password",
+ "registryUrl"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.saveGitProvider": {
+ "post": {
+ "operationId": "application-saveGitProvider",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "customGitBranch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "applicationId": {
+ "type": "string"
+ },
+ "customGitBuildPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "customGitUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "watchPaths": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "enableSubmodules": {
+ "type": "boolean"
+ },
+ "customGitSSHKeyId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "customGitBranch",
+ "applicationId",
+ "customGitBuildPath",
+ "customGitUrl",
+ "watchPaths"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.disconnectGitProvider": {
+ "post": {
+ "operationId": "application-disconnectGitProvider",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.markRunning": {
+ "post": {
+ "operationId": "application-markRunning",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.update": {
+ "post": {
+ "operationId": "application-update",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "previewEnv": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "watchPaths": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "previewBuildArgs": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "previewBuildSecrets": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "previewLabels": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "previewWildcard": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "previewPort": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "previewHttps": {
+ "type": "boolean"
+ },
+ "previewPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "previewCertificateType": {
+ "type": "string",
+ "enum": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "previewCustomCertResolver": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "previewLimit": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "isPreviewDeploymentsActive": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "previewRequireCollaboratorPermissions": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "rollbackActive": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "buildArgs": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "buildSecrets": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "memoryReservation": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "memoryLimit": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cpuReservation": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cpuLimit": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "title": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "enabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "subtitle": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "command": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "args": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "refreshToken": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "sourceType": {
+ "type": "string",
+ "enum": [
+ "github",
+ "docker",
+ "git",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "cleanCache": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "repository": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "owner": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "branch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "buildPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "triggerType": {
+ "anyOf": [
+ {
+ "type": "string",
+ "enum": [
+ "push",
+ "tag"
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "autoDeploy": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabProjectId": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabRepository": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabOwner": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabBranch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabBuildPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabPathNamespace": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaRepository": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaOwner": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaBranch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaBuildPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketRepository": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketRepositorySlug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketOwner": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketBranch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketBuildPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "username": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "password": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "dockerImage": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "registryUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "customGitUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "customGitBranch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "customGitBuildPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "customGitSSHKeyId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "enableSubmodules": {
+ "type": "boolean"
+ },
+ "dockerfile": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "dockerContextPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "dockerBuildStage": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "dropBuildPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "healthCheckSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Test": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Interval": {
+ "type": "number"
+ },
+ "Timeout": {
+ "type": "number"
+ },
+ "StartPeriod": {
+ "type": "number"
+ },
+ "Retries": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "restartPolicySwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Condition": {
+ "type": "string"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "MaxAttempts": {
+ "type": "number"
+ },
+ "Window": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "placementSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Constraints": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Preferences": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Spread": {
+ "type": "object",
+ "properties": {
+ "SpreadDescriptor": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "SpreadDescriptor"
+ ]
+ }
+ },
+ "required": [
+ "Spread"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "MaxReplicas": {
+ "type": "number"
+ },
+ "Platforms": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Architecture": {
+ "type": "string"
+ },
+ "OS": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Architecture",
+ "OS"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "updateConfigSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Parallelism": {
+ "type": "number"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "FailureAction": {
+ "type": "string"
+ },
+ "Monitor": {
+ "type": "number"
+ },
+ "MaxFailureRatio": {
+ "type": "number"
+ },
+ "Order": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Parallelism",
+ "Order"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "rollbackConfigSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Parallelism": {
+ "type": "number"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "FailureAction": {
+ "type": "string"
+ },
+ "Monitor": {
+ "type": "number"
+ },
+ "MaxFailureRatio": {
+ "type": "number"
+ },
+ "Order": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Parallelism",
+ "Order"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "modeSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Replicated": {
+ "type": "object",
+ "properties": {
+ "Replicas": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "Global": {
+ "type": "object",
+ "properties": {}
+ },
+ "ReplicatedJob": {
+ "type": "object",
+ "properties": {
+ "MaxConcurrent": {
+ "type": "number"
+ },
+ "TotalCompletions": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "GlobalJob": {
+ "type": "object",
+ "properties": {}
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "labelsSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "networkSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Target": {
+ "type": "string"
+ },
+ "Aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "DriverOpts": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stopGracePeriodSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "endpointSpecSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Mode": {
+ "type": "string"
+ },
+ "Ports": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Protocol": {
+ "type": "string"
+ },
+ "TargetPort": {
+ "type": "number"
+ },
+ "PublishedPort": {
+ "type": "number"
+ },
+ "PublishMode": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ulimitsSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Name": {
+ "type": "string"
+ },
+ "Soft": {
+ "type": "number"
+ },
+ "Hard": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "Name",
+ "Soft",
+ "Hard"
+ ],
+ "additionalProperties": false
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "replicas": {
+ "type": "number"
+ },
+ "applicationStatus": {
+ "type": "string",
+ "enum": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "buildType": {
+ "type": "string",
+ "enum": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "railpackVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "herokuVersion": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "publishDirectory": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "isStaticSpa": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "createEnvFile": {
+ "type": "boolean"
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "registryId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "rollbackRegistryId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "environmentId": {
+ "type": "string"
+ },
+ "githubId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "buildServerId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "buildRegistryId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.refreshToken": {
+ "post": {
+ "operationId": "application-refreshToken",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.deploy": {
+ "post": {
+ "operationId": "application-deploy",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.cleanQueues": {
+ "post": {
+ "operationId": "application-cleanQueues",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.clearDeployments": {
+ "post": {
+ "operationId": "application-clearDeployments",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.killBuild": {
+ "post": {
+ "operationId": "application-killBuild",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.readTraefikConfig": {
+ "get": {
+ "operationId": "application-readTraefikConfig",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "applicationId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/drop-deployment": {
+ "post": {
+ "operationId": "application-dropDeployment",
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "multipart/form-data": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "zip": {
+ "format": "binary",
+ "type": "string"
+ },
+ "dropBuildPath": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "zip"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.updateTraefikConfig": {
+ "post": {
+ "operationId": "application-updateTraefikConfig",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "traefikConfig": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId",
+ "traefikConfig"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.readAppMonitoring": {
+ "get": {
+ "operationId": "application-readAppMonitoring",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.move": {
+ "post": {
+ "operationId": "application-move",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "targetEnvironmentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId",
+ "targetEnvironmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.cancelDeployment": {
+ "post": {
+ "operationId": "application-cancelDeployment",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/application.search": {
+ "get": {
+ "operationId": "application-search",
+ "tags": [
+ "application"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "q",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "description",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "repository",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "owner",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "dockerImage",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "projectId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "environmentId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 20,
+ "type": "number"
+ }
+ },
+ {
+ "in": "query",
+ "name": "offset",
+ "schema": {
+ "default": 0,
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.create": {
+ "post": {
+ "operationId": "mysql-create",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "dockerImage": {
+ "default": "mysql:8",
+ "type": "string"
+ },
+ "environmentId": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "databaseName": {
+ "type": "string"
+ },
+ "databaseUser": {
+ "type": "string"
+ },
+ "databasePassword": {
+ "type": "string"
+ },
+ "databaseRootPassword": {
+ "type": "string"
+ },
+ "serverId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "name",
+ "environmentId",
+ "databaseName",
+ "databaseUser",
+ "databasePassword"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.one": {
+ "get": {
+ "operationId": "mysql-one",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "mysqlId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.start": {
+ "post": {
+ "operationId": "mysql-start",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mysqlId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mysqlId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.stop": {
+ "post": {
+ "operationId": "mysql-stop",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mysqlId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mysqlId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.saveExternalPort": {
+ "post": {
+ "operationId": "mysql-saveExternalPort",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mysqlId": {
+ "type": "string"
+ },
+ "externalPort": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "mysqlId",
+ "externalPort"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.deploy": {
+ "post": {
+ "operationId": "mysql-deploy",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mysqlId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mysqlId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.changeStatus": {
+ "post": {
+ "operationId": "mysql-changeStatus",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mysqlId": {
+ "type": "string"
+ },
+ "applicationStatus": {
+ "type": "string",
+ "enum": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ }
+ },
+ "required": [
+ "mysqlId",
+ "applicationStatus"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.reload": {
+ "post": {
+ "operationId": "mysql-reload",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mysqlId": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mysqlId",
+ "appName"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.remove": {
+ "post": {
+ "operationId": "mysql-remove",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mysqlId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mysqlId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.saveEnvironment": {
+ "post": {
+ "operationId": "mysql-saveEnvironment",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mysqlId": {
+ "type": "string"
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "mysqlId",
+ "env"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.update": {
+ "post": {
+ "operationId": "mysql-update",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mysqlId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "databaseName": {
+ "type": "string"
+ },
+ "databaseUser": {
+ "type": "string"
+ },
+ "databasePassword": {
+ "type": "string"
+ },
+ "databaseRootPassword": {
+ "type": "string"
+ },
+ "dockerImage": {
+ "default": "mysql:8",
+ "type": "string"
+ },
+ "command": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "args": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "memoryReservation": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "memoryLimit": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cpuReservation": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cpuLimit": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "externalPort": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "applicationStatus": {
+ "type": "string",
+ "enum": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "healthCheckSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Test": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Interval": {
+ "type": "number"
+ },
+ "Timeout": {
+ "type": "number"
+ },
+ "StartPeriod": {
+ "type": "number"
+ },
+ "Retries": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "restartPolicySwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Condition": {
+ "type": "string"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "MaxAttempts": {
+ "type": "number"
+ },
+ "Window": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "placementSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Constraints": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Preferences": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Spread": {
+ "type": "object",
+ "properties": {
+ "SpreadDescriptor": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "SpreadDescriptor"
+ ]
+ }
+ },
+ "required": [
+ "Spread"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "MaxReplicas": {
+ "type": "number"
+ },
+ "Platforms": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Architecture": {
+ "type": "string"
+ },
+ "OS": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Architecture",
+ "OS"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "updateConfigSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Parallelism": {
+ "type": "number"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "FailureAction": {
+ "type": "string"
+ },
+ "Monitor": {
+ "type": "number"
+ },
+ "MaxFailureRatio": {
+ "type": "number"
+ },
+ "Order": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Parallelism",
+ "Order"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "rollbackConfigSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Parallelism": {
+ "type": "number"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "FailureAction": {
+ "type": "string"
+ },
+ "Monitor": {
+ "type": "number"
+ },
+ "MaxFailureRatio": {
+ "type": "number"
+ },
+ "Order": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Parallelism",
+ "Order"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "modeSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Replicated": {
+ "type": "object",
+ "properties": {
+ "Replicas": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "Global": {
+ "type": "object",
+ "properties": {}
+ },
+ "ReplicatedJob": {
+ "type": "object",
+ "properties": {
+ "MaxConcurrent": {
+ "type": "number"
+ },
+ "TotalCompletions": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "GlobalJob": {
+ "type": "object",
+ "properties": {}
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "labelsSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "networkSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Target": {
+ "type": "string"
+ },
+ "Aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "DriverOpts": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stopGracePeriodSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "endpointSpecSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Mode": {
+ "type": "string"
+ },
+ "Ports": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Protocol": {
+ "type": "string"
+ },
+ "TargetPort": {
+ "type": "number"
+ },
+ "PublishedPort": {
+ "type": "number"
+ },
+ "PublishMode": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ulimitsSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Name": {
+ "type": "string"
+ },
+ "Soft": {
+ "type": "number"
+ },
+ "Hard": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "Name",
+ "Soft",
+ "Hard"
+ ],
+ "additionalProperties": false
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "replicas": {
+ "type": "number"
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "environmentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mysqlId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.move": {
+ "post": {
+ "operationId": "mysql-move",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mysqlId": {
+ "type": "string"
+ },
+ "targetEnvironmentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mysqlId",
+ "targetEnvironmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.rebuild": {
+ "post": {
+ "operationId": "mysql-rebuild",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mysqlId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mysqlId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mysql.search": {
+ "get": {
+ "operationId": "mysql-search",
+ "tags": [
+ "mysql"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "q",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "description",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "projectId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "environmentId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 20,
+ "type": "number"
+ }
+ },
+ {
+ "in": "query",
+ "name": "offset",
+ "schema": {
+ "default": 0,
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.create": {
+ "post": {
+ "operationId": "postgres-create",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "databaseName": {
+ "type": "string"
+ },
+ "databaseUser": {
+ "type": "string"
+ },
+ "databasePassword": {
+ "type": "string"
+ },
+ "dockerImage": {
+ "default": "postgres:18",
+ "type": "string"
+ },
+ "environmentId": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serverId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "name",
+ "databaseName",
+ "databaseUser",
+ "databasePassword",
+ "environmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.one": {
+ "get": {
+ "operationId": "postgres-one",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "postgresId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.start": {
+ "post": {
+ "operationId": "postgres-start",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "postgresId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "postgresId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.stop": {
+ "post": {
+ "operationId": "postgres-stop",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "postgresId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "postgresId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.saveExternalPort": {
+ "post": {
+ "operationId": "postgres-saveExternalPort",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "postgresId": {
+ "type": "string"
+ },
+ "externalPort": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "postgresId",
+ "externalPort"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.deploy": {
+ "post": {
+ "operationId": "postgres-deploy",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "postgresId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "postgresId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.changeStatus": {
+ "post": {
+ "operationId": "postgres-changeStatus",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "postgresId": {
+ "type": "string"
+ },
+ "applicationStatus": {
+ "type": "string",
+ "enum": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ }
+ },
+ "required": [
+ "postgresId",
+ "applicationStatus"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.remove": {
+ "post": {
+ "operationId": "postgres-remove",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "postgresId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "postgresId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.saveEnvironment": {
+ "post": {
+ "operationId": "postgres-saveEnvironment",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "postgresId": {
+ "type": "string"
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "postgresId",
+ "env"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.reload": {
+ "post": {
+ "operationId": "postgres-reload",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "postgresId": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "postgresId",
+ "appName"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.update": {
+ "post": {
+ "operationId": "postgres-update",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "postgresId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "databaseName": {
+ "type": "string"
+ },
+ "databaseUser": {
+ "type": "string"
+ },
+ "databasePassword": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "dockerImage": {
+ "default": "postgres:18",
+ "type": "string"
+ },
+ "command": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "args": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "memoryReservation": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "externalPort": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "memoryLimit": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cpuReservation": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cpuLimit": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "applicationStatus": {
+ "type": "string",
+ "enum": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "healthCheckSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Test": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Interval": {
+ "type": "number"
+ },
+ "Timeout": {
+ "type": "number"
+ },
+ "StartPeriod": {
+ "type": "number"
+ },
+ "Retries": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "restartPolicySwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Condition": {
+ "type": "string"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "MaxAttempts": {
+ "type": "number"
+ },
+ "Window": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "placementSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Constraints": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Preferences": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Spread": {
+ "type": "object",
+ "properties": {
+ "SpreadDescriptor": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "SpreadDescriptor"
+ ]
+ }
+ },
+ "required": [
+ "Spread"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "MaxReplicas": {
+ "type": "number"
+ },
+ "Platforms": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Architecture": {
+ "type": "string"
+ },
+ "OS": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Architecture",
+ "OS"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "updateConfigSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Parallelism": {
+ "type": "number"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "FailureAction": {
+ "type": "string"
+ },
+ "Monitor": {
+ "type": "number"
+ },
+ "MaxFailureRatio": {
+ "type": "number"
+ },
+ "Order": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Parallelism",
+ "Order"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "rollbackConfigSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Parallelism": {
+ "type": "number"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "FailureAction": {
+ "type": "string"
+ },
+ "Monitor": {
+ "type": "number"
+ },
+ "MaxFailureRatio": {
+ "type": "number"
+ },
+ "Order": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Parallelism",
+ "Order"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "modeSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Replicated": {
+ "type": "object",
+ "properties": {
+ "Replicas": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "Global": {
+ "type": "object",
+ "properties": {}
+ },
+ "ReplicatedJob": {
+ "type": "object",
+ "properties": {
+ "MaxConcurrent": {
+ "type": "number"
+ },
+ "TotalCompletions": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "GlobalJob": {
+ "type": "object",
+ "properties": {}
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "labelsSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "networkSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Target": {
+ "type": "string"
+ },
+ "Aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "DriverOpts": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stopGracePeriodSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "endpointSpecSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Mode": {
+ "type": "string"
+ },
+ "Ports": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Protocol": {
+ "type": "string"
+ },
+ "TargetPort": {
+ "type": "number"
+ },
+ "PublishedPort": {
+ "type": "number"
+ },
+ "PublishMode": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ulimitsSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Name": {
+ "type": "string"
+ },
+ "Soft": {
+ "type": "number"
+ },
+ "Hard": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "Name",
+ "Soft",
+ "Hard"
+ ],
+ "additionalProperties": false
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "replicas": {
+ "type": "number"
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "environmentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "postgresId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.move": {
+ "post": {
+ "operationId": "postgres-move",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "postgresId": {
+ "type": "string"
+ },
+ "targetEnvironmentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "postgresId",
+ "targetEnvironmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.rebuild": {
+ "post": {
+ "operationId": "postgres-rebuild",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "postgresId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "postgresId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/postgres.search": {
+ "get": {
+ "operationId": "postgres-search",
+ "tags": [
+ "postgres"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "q",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "description",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "projectId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "environmentId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 20,
+ "type": "number"
+ }
+ },
+ {
+ "in": "query",
+ "name": "offset",
+ "schema": {
+ "default": 0,
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.create": {
+ "post": {
+ "operationId": "redis-create",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "databasePassword": {
+ "type": "string"
+ },
+ "dockerImage": {
+ "default": "redis:8",
+ "type": "string"
+ },
+ "environmentId": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serverId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "name",
+ "databasePassword",
+ "environmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.one": {
+ "get": {
+ "operationId": "redis-one",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "redisId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.start": {
+ "post": {
+ "operationId": "redis-start",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redisId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "redisId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.reload": {
+ "post": {
+ "operationId": "redis-reload",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redisId": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "redisId",
+ "appName"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.stop": {
+ "post": {
+ "operationId": "redis-stop",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redisId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "redisId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.saveExternalPort": {
+ "post": {
+ "operationId": "redis-saveExternalPort",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redisId": {
+ "type": "string"
+ },
+ "externalPort": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "redisId",
+ "externalPort"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.deploy": {
+ "post": {
+ "operationId": "redis-deploy",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redisId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "redisId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.changeStatus": {
+ "post": {
+ "operationId": "redis-changeStatus",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redisId": {
+ "type": "string"
+ },
+ "applicationStatus": {
+ "type": "string",
+ "enum": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ }
+ },
+ "required": [
+ "redisId",
+ "applicationStatus"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.remove": {
+ "post": {
+ "operationId": "redis-remove",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redisId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "redisId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.saveEnvironment": {
+ "post": {
+ "operationId": "redis-saveEnvironment",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redisId": {
+ "type": "string"
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "redisId",
+ "env"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.update": {
+ "post": {
+ "operationId": "redis-update",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redisId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "databasePassword": {
+ "type": "string"
+ },
+ "dockerImage": {
+ "default": "redis:8",
+ "type": "string"
+ },
+ "command": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "args": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "memoryReservation": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "memoryLimit": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cpuReservation": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cpuLimit": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "externalPort": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "applicationStatus": {
+ "type": "string",
+ "enum": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "healthCheckSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Test": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Interval": {
+ "type": "number"
+ },
+ "Timeout": {
+ "type": "number"
+ },
+ "StartPeriod": {
+ "type": "number"
+ },
+ "Retries": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "restartPolicySwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Condition": {
+ "type": "string"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "MaxAttempts": {
+ "type": "number"
+ },
+ "Window": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "placementSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Constraints": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Preferences": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Spread": {
+ "type": "object",
+ "properties": {
+ "SpreadDescriptor": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "SpreadDescriptor"
+ ]
+ }
+ },
+ "required": [
+ "Spread"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "MaxReplicas": {
+ "type": "number"
+ },
+ "Platforms": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Architecture": {
+ "type": "string"
+ },
+ "OS": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Architecture",
+ "OS"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "updateConfigSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Parallelism": {
+ "type": "number"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "FailureAction": {
+ "type": "string"
+ },
+ "Monitor": {
+ "type": "number"
+ },
+ "MaxFailureRatio": {
+ "type": "number"
+ },
+ "Order": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Parallelism",
+ "Order"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "rollbackConfigSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Parallelism": {
+ "type": "number"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "FailureAction": {
+ "type": "string"
+ },
+ "Monitor": {
+ "type": "number"
+ },
+ "MaxFailureRatio": {
+ "type": "number"
+ },
+ "Order": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Parallelism",
+ "Order"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "modeSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Replicated": {
+ "type": "object",
+ "properties": {
+ "Replicas": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "Global": {
+ "type": "object",
+ "properties": {}
+ },
+ "ReplicatedJob": {
+ "type": "object",
+ "properties": {
+ "MaxConcurrent": {
+ "type": "number"
+ },
+ "TotalCompletions": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "GlobalJob": {
+ "type": "object",
+ "properties": {}
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "labelsSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "networkSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Target": {
+ "type": "string"
+ },
+ "Aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "DriverOpts": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stopGracePeriodSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "endpointSpecSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Mode": {
+ "type": "string"
+ },
+ "Ports": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Protocol": {
+ "type": "string"
+ },
+ "TargetPort": {
+ "type": "number"
+ },
+ "PublishedPort": {
+ "type": "number"
+ },
+ "PublishMode": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ulimitsSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Name": {
+ "type": "string"
+ },
+ "Soft": {
+ "type": "number"
+ },
+ "Hard": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "Name",
+ "Soft",
+ "Hard"
+ ],
+ "additionalProperties": false
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "replicas": {
+ "type": "number"
+ },
+ "environmentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "redisId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.move": {
+ "post": {
+ "operationId": "redis-move",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redisId": {
+ "type": "string"
+ },
+ "targetEnvironmentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "redisId",
+ "targetEnvironmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.rebuild": {
+ "post": {
+ "operationId": "redis-rebuild",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redisId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "redisId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redis.search": {
+ "get": {
+ "operationId": "redis-search",
+ "tags": [
+ "redis"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "q",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "description",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "projectId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "environmentId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 20,
+ "type": "number"
+ }
+ },
+ {
+ "in": "query",
+ "name": "offset",
+ "schema": {
+ "default": 0,
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.create": {
+ "post": {
+ "operationId": "mongo-create",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "dockerImage": {
+ "default": "mongo:15",
+ "type": "string"
+ },
+ "environmentId": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "databaseUser": {
+ "type": "string"
+ },
+ "databasePassword": {
+ "type": "string"
+ },
+ "serverId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "replicaSets": {
+ "anyOf": [
+ {
+ "default": false,
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "name",
+ "environmentId",
+ "databaseUser",
+ "databasePassword"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.one": {
+ "get": {
+ "operationId": "mongo-one",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "mongoId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.start": {
+ "post": {
+ "operationId": "mongo-start",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mongoId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mongoId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.stop": {
+ "post": {
+ "operationId": "mongo-stop",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mongoId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mongoId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.saveExternalPort": {
+ "post": {
+ "operationId": "mongo-saveExternalPort",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mongoId": {
+ "type": "string"
+ },
+ "externalPort": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "mongoId",
+ "externalPort"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.deploy": {
+ "post": {
+ "operationId": "mongo-deploy",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mongoId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mongoId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.changeStatus": {
+ "post": {
+ "operationId": "mongo-changeStatus",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mongoId": {
+ "type": "string"
+ },
+ "applicationStatus": {
+ "type": "string",
+ "enum": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ }
+ },
+ "required": [
+ "mongoId",
+ "applicationStatus"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.reload": {
+ "post": {
+ "operationId": "mongo-reload",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mongoId": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mongoId",
+ "appName"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.remove": {
+ "post": {
+ "operationId": "mongo-remove",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mongoId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mongoId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.saveEnvironment": {
+ "post": {
+ "operationId": "mongo-saveEnvironment",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mongoId": {
+ "type": "string"
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "mongoId",
+ "env"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.update": {
+ "post": {
+ "operationId": "mongo-update",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mongoId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "databaseUser": {
+ "type": "string"
+ },
+ "databasePassword": {
+ "type": "string"
+ },
+ "dockerImage": {
+ "default": "mongo:15",
+ "type": "string"
+ },
+ "command": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "args": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "memoryReservation": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "memoryLimit": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cpuReservation": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cpuLimit": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "externalPort": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "applicationStatus": {
+ "type": "string",
+ "enum": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "healthCheckSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Test": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Interval": {
+ "type": "number"
+ },
+ "Timeout": {
+ "type": "number"
+ },
+ "StartPeriod": {
+ "type": "number"
+ },
+ "Retries": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "restartPolicySwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Condition": {
+ "type": "string"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "MaxAttempts": {
+ "type": "number"
+ },
+ "Window": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "placementSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Constraints": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Preferences": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Spread": {
+ "type": "object",
+ "properties": {
+ "SpreadDescriptor": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "SpreadDescriptor"
+ ]
+ }
+ },
+ "required": [
+ "Spread"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "MaxReplicas": {
+ "type": "number"
+ },
+ "Platforms": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Architecture": {
+ "type": "string"
+ },
+ "OS": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Architecture",
+ "OS"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "updateConfigSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Parallelism": {
+ "type": "number"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "FailureAction": {
+ "type": "string"
+ },
+ "Monitor": {
+ "type": "number"
+ },
+ "MaxFailureRatio": {
+ "type": "number"
+ },
+ "Order": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Parallelism",
+ "Order"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "rollbackConfigSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Parallelism": {
+ "type": "number"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "FailureAction": {
+ "type": "string"
+ },
+ "Monitor": {
+ "type": "number"
+ },
+ "MaxFailureRatio": {
+ "type": "number"
+ },
+ "Order": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Parallelism",
+ "Order"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "modeSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Replicated": {
+ "type": "object",
+ "properties": {
+ "Replicas": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "Global": {
+ "type": "object",
+ "properties": {}
+ },
+ "ReplicatedJob": {
+ "type": "object",
+ "properties": {
+ "MaxConcurrent": {
+ "type": "number"
+ },
+ "TotalCompletions": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "GlobalJob": {
+ "type": "object",
+ "properties": {}
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "labelsSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "networkSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Target": {
+ "type": "string"
+ },
+ "Aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "DriverOpts": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stopGracePeriodSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "endpointSpecSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Mode": {
+ "type": "string"
+ },
+ "Ports": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Protocol": {
+ "type": "string"
+ },
+ "TargetPort": {
+ "type": "number"
+ },
+ "PublishedPort": {
+ "type": "number"
+ },
+ "PublishMode": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ulimitsSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Name": {
+ "type": "string"
+ },
+ "Soft": {
+ "type": "number"
+ },
+ "Hard": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "Name",
+ "Soft",
+ "Hard"
+ ],
+ "additionalProperties": false
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "replicas": {
+ "type": "number"
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "environmentId": {
+ "type": "string"
+ },
+ "replicaSets": {
+ "anyOf": [
+ {
+ "default": false,
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "mongoId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.move": {
+ "post": {
+ "operationId": "mongo-move",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mongoId": {
+ "type": "string"
+ },
+ "targetEnvironmentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mongoId",
+ "targetEnvironmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.rebuild": {
+ "post": {
+ "operationId": "mongo-rebuild",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mongoId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mongoId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mongo.search": {
+ "get": {
+ "operationId": "mongo-search",
+ "tags": [
+ "mongo"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "q",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "description",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "projectId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "environmentId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 20,
+ "type": "number"
+ }
+ },
+ {
+ "in": "query",
+ "name": "offset",
+ "schema": {
+ "default": 0,
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.create": {
+ "post": {
+ "operationId": "mariadb-create",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "dockerImage": {
+ "default": "mariadb:6",
+ "type": "string"
+ },
+ "databaseRootPassword": {
+ "type": "string"
+ },
+ "environmentId": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "databaseName": {
+ "type": "string"
+ },
+ "databaseUser": {
+ "type": "string"
+ },
+ "databasePassword": {
+ "type": "string"
+ },
+ "serverId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "name",
+ "environmentId",
+ "databaseName",
+ "databaseUser",
+ "databasePassword"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.one": {
+ "get": {
+ "operationId": "mariadb-one",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "mariadbId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.start": {
+ "post": {
+ "operationId": "mariadb-start",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mariadbId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mariadbId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.stop": {
+ "post": {
+ "operationId": "mariadb-stop",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mariadbId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mariadbId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.saveExternalPort": {
+ "post": {
+ "operationId": "mariadb-saveExternalPort",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mariadbId": {
+ "type": "string"
+ },
+ "externalPort": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "mariadbId",
+ "externalPort"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.deploy": {
+ "post": {
+ "operationId": "mariadb-deploy",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mariadbId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mariadbId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.changeStatus": {
+ "post": {
+ "operationId": "mariadb-changeStatus",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mariadbId": {
+ "type": "string"
+ },
+ "applicationStatus": {
+ "type": "string",
+ "enum": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ }
+ },
+ "required": [
+ "mariadbId",
+ "applicationStatus"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.remove": {
+ "post": {
+ "operationId": "mariadb-remove",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mariadbId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mariadbId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.saveEnvironment": {
+ "post": {
+ "operationId": "mariadb-saveEnvironment",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mariadbId": {
+ "type": "string"
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "mariadbId",
+ "env"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.reload": {
+ "post": {
+ "operationId": "mariadb-reload",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mariadbId": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mariadbId",
+ "appName"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.update": {
+ "post": {
+ "operationId": "mariadb-update",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mariadbId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "databaseName": {
+ "type": "string"
+ },
+ "databaseUser": {
+ "type": "string"
+ },
+ "databasePassword": {
+ "type": "string"
+ },
+ "databaseRootPassword": {
+ "type": "string"
+ },
+ "dockerImage": {
+ "default": "mariadb:6",
+ "type": "string"
+ },
+ "command": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "args": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "memoryReservation": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "memoryLimit": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cpuReservation": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cpuLimit": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "externalPort": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "applicationStatus": {
+ "type": "string",
+ "enum": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "healthCheckSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Test": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Interval": {
+ "type": "number"
+ },
+ "Timeout": {
+ "type": "number"
+ },
+ "StartPeriod": {
+ "type": "number"
+ },
+ "Retries": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "restartPolicySwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Condition": {
+ "type": "string"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "MaxAttempts": {
+ "type": "number"
+ },
+ "Window": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "placementSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Constraints": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Preferences": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Spread": {
+ "type": "object",
+ "properties": {
+ "SpreadDescriptor": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "SpreadDescriptor"
+ ]
+ }
+ },
+ "required": [
+ "Spread"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "MaxReplicas": {
+ "type": "number"
+ },
+ "Platforms": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Architecture": {
+ "type": "string"
+ },
+ "OS": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Architecture",
+ "OS"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "updateConfigSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Parallelism": {
+ "type": "number"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "FailureAction": {
+ "type": "string"
+ },
+ "Monitor": {
+ "type": "number"
+ },
+ "MaxFailureRatio": {
+ "type": "number"
+ },
+ "Order": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Parallelism",
+ "Order"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "rollbackConfigSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Parallelism": {
+ "type": "number"
+ },
+ "Delay": {
+ "type": "number"
+ },
+ "FailureAction": {
+ "type": "string"
+ },
+ "Monitor": {
+ "type": "number"
+ },
+ "MaxFailureRatio": {
+ "type": "number"
+ },
+ "Order": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Parallelism",
+ "Order"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "modeSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Replicated": {
+ "type": "object",
+ "properties": {
+ "Replicas": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "Global": {
+ "type": "object",
+ "properties": {}
+ },
+ "ReplicatedJob": {
+ "type": "object",
+ "properties": {
+ "MaxConcurrent": {
+ "type": "number"
+ },
+ "TotalCompletions": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "GlobalJob": {
+ "type": "object",
+ "properties": {}
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "labelsSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "networkSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Target": {
+ "type": "string"
+ },
+ "Aliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "DriverOpts": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stopGracePeriodSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "endpointSpecSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "Mode": {
+ "type": "string"
+ },
+ "Ports": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Protocol": {
+ "type": "string"
+ },
+ "TargetPort": {
+ "type": "number"
+ },
+ "PublishedPort": {
+ "type": "number"
+ },
+ "PublishMode": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ulimitsSwarm": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Name": {
+ "type": "string"
+ },
+ "Soft": {
+ "type": "number"
+ },
+ "Hard": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "Name",
+ "Soft",
+ "Hard"
+ ],
+ "additionalProperties": false
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "replicas": {
+ "type": "number"
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "environmentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mariadbId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.move": {
+ "post": {
+ "operationId": "mariadb-move",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mariadbId": {
+ "type": "string"
+ },
+ "targetEnvironmentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mariadbId",
+ "targetEnvironmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.rebuild": {
+ "post": {
+ "operationId": "mariadb-rebuild",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mariadbId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mariadbId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mariadb.search": {
+ "get": {
+ "operationId": "mariadb-search",
+ "tags": [
+ "mariadb"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "q",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "description",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "projectId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "environmentId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 20,
+ "type": "number"
+ }
+ },
+ {
+ "in": "query",
+ "name": "offset",
+ "schema": {
+ "default": 0,
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.create": {
+ "post": {
+ "operationId": "compose-create",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "environmentId": {
+ "type": "string"
+ },
+ "composeType": {
+ "type": "string",
+ "enum": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "appName": {
+ "type": "string"
+ },
+ "serverId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "composeFile": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "environmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.one": {
+ "get": {
+ "operationId": "compose-one",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "composeId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.update": {
+ "post": {
+ "operationId": "compose-update",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "env": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "composeFile": {
+ "type": "string"
+ },
+ "refreshToken": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "sourceType": {
+ "type": "string",
+ "enum": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "raw"
+ ]
+ },
+ "composeType": {
+ "type": "string",
+ "enum": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "repository": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "owner": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "branch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "autoDeploy": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabProjectId": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabRepository": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabOwner": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabBranch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabPathNamespace": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketRepository": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketRepositorySlug": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketOwner": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketBranch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaRepository": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaOwner": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaBranch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "customGitUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "customGitBranch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "customGitSSHKeyId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "command": {
+ "type": "string"
+ },
+ "enableSubmodules": {
+ "type": "boolean"
+ },
+ "composePath": {
+ "type": "string"
+ },
+ "suffix": {
+ "type": "string"
+ },
+ "randomize": {
+ "type": "boolean"
+ },
+ "isolatedDeployment": {
+ "type": "boolean"
+ },
+ "isolatedDeploymentsVolume": {
+ "type": "boolean"
+ },
+ "triggerType": {
+ "anyOf": [
+ {
+ "type": "string",
+ "enum": [
+ "push",
+ "tag"
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "composeStatus": {
+ "type": "string",
+ "enum": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "environmentId": {
+ "type": "string"
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "watchPaths": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "githubId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "gitlabId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bitbucketId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "giteaId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.delete": {
+ "post": {
+ "operationId": "compose-delete",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ },
+ "deleteVolumes": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "composeId",
+ "deleteVolumes"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.cleanQueues": {
+ "post": {
+ "operationId": "compose-cleanQueues",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.clearDeployments": {
+ "post": {
+ "operationId": "compose-clearDeployments",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.killBuild": {
+ "post": {
+ "operationId": "compose-killBuild",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.loadServices": {
+ "get": {
+ "operationId": "compose-loadServices",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "composeId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "type",
+ "schema": {
+ "default": "cache",
+ "type": "string",
+ "enum": [
+ "fetch",
+ "cache"
+ ]
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.loadMountsByService": {
+ "get": {
+ "operationId": "compose-loadMountsByService",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "composeId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "serviceName",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.fetchSourceType": {
+ "post": {
+ "operationId": "compose-fetchSourceType",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.randomizeCompose": {
+ "post": {
+ "operationId": "compose-randomizeCompose",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ },
+ "suffix": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.isolatedDeployment": {
+ "post": {
+ "operationId": "compose-isolatedDeployment",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ },
+ "suffix": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.getConvertedCompose": {
+ "get": {
+ "operationId": "compose-getConvertedCompose",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "composeId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.deploy": {
+ "post": {
+ "operationId": "compose-deploy",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.redeploy": {
+ "post": {
+ "operationId": "compose-redeploy",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.stop": {
+ "post": {
+ "operationId": "compose-stop",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.start": {
+ "post": {
+ "operationId": "compose-start",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.getDefaultCommand": {
+ "get": {
+ "operationId": "compose-getDefaultCommand",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "composeId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.refreshToken": {
+ "post": {
+ "operationId": "compose-refreshToken",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.deployTemplate": {
+ "post": {
+ "operationId": "compose-deployTemplate",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "environmentId": {
+ "type": "string"
+ },
+ "serverId": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "baseUrl": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "environmentId",
+ "id"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.templates": {
+ "get": {
+ "operationId": "compose-templates",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "baseUrl",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.getTags": {
+ "get": {
+ "operationId": "compose-getTags",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "baseUrl",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.disconnectGitProvider": {
+ "post": {
+ "operationId": "compose-disconnectGitProvider",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.move": {
+ "post": {
+ "operationId": "compose-move",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ },
+ "targetEnvironmentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId",
+ "targetEnvironmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.processTemplate": {
+ "post": {
+ "operationId": "compose-processTemplate",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "base64": {
+ "type": "string"
+ },
+ "composeId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "base64",
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.import": {
+ "post": {
+ "operationId": "compose-import",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "base64": {
+ "type": "string"
+ },
+ "composeId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "base64",
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.cancelDeployment": {
+ "post": {
+ "operationId": "compose-cancelDeployment",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "composeId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "composeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compose.search": {
+ "get": {
+ "operationId": "compose-search",
+ "tags": [
+ "compose"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "q",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "description",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "projectId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "environmentId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 20,
+ "type": "number"
+ }
+ },
+ {
+ "in": "query",
+ "name": "offset",
+ "schema": {
+ "default": 0,
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.all": {
+ "get": {
+ "operationId": "user-all",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.one": {
+ "get": {
+ "operationId": "user-one",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "userId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.get": {
+ "get": {
+ "operationId": "user-get",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.haveRootAccess": {
+ "get": {
+ "operationId": "user-haveRootAccess",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.getBackups": {
+ "get": {
+ "operationId": "user-getBackups",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.getServerMetrics": {
+ "get": {
+ "operationId": "user-getServerMetrics",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.update": {
+ "post": {
+ "operationId": "user-update",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "firstName": {
+ "type": "string"
+ },
+ "lastName": {
+ "type": "string"
+ },
+ "isRegistered": {
+ "type": "boolean"
+ },
+ "expirationDate": {
+ "type": "string"
+ },
+ "createdAt2": {
+ "type": "string"
+ },
+ "createdAt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "twoFactorEnabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "email": {
+ "type": "string"
+ },
+ "emailVerified": {
+ "type": "boolean"
+ },
+ "image": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "banned": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "banReason": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "banExpires": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "updatedAt": {
+ "type": "string"
+ },
+ "enablePaidFeatures": {
+ "type": "boolean"
+ },
+ "allowImpersonation": {
+ "type": "boolean"
+ },
+ "enableEnterpriseFeatures": {
+ "type": "boolean"
+ },
+ "licenseKey": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stripeCustomerId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stripeSubscriptionId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serversQuantity": {
+ "type": "number"
+ },
+ "password": {
+ "type": "string"
+ },
+ "currentPassword": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.getUserByToken": {
+ "get": {
+ "operationId": "user-getUserByToken",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "token",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.getMetricsToken": {
+ "get": {
+ "operationId": "user-getMetricsToken",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.remove": {
+ "post": {
+ "operationId": "user-remove",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "userId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.assignPermissions": {
+ "post": {
+ "operationId": "user-assignPermissions",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "accessedProjects": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "accessedEnvironments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "accessedServices": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "canCreateProjects": {
+ "type": "boolean"
+ },
+ "canCreateServices": {
+ "type": "boolean"
+ },
+ "canDeleteProjects": {
+ "type": "boolean"
+ },
+ "canDeleteServices": {
+ "type": "boolean"
+ },
+ "canAccessToDocker": {
+ "type": "boolean"
+ },
+ "canAccessToTraefikFiles": {
+ "type": "boolean"
+ },
+ "canAccessToAPI": {
+ "type": "boolean"
+ },
+ "canAccessToSSHKeys": {
+ "type": "boolean"
+ },
+ "canAccessToGitProviders": {
+ "type": "boolean"
+ },
+ "canDeleteEnvironments": {
+ "type": "boolean"
+ },
+ "canCreateEnvironments": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "id",
+ "accessedProjects",
+ "accessedEnvironments",
+ "accessedServices",
+ "canCreateProjects",
+ "canCreateServices",
+ "canDeleteProjects",
+ "canDeleteServices",
+ "canAccessToDocker",
+ "canAccessToTraefikFiles",
+ "canAccessToAPI",
+ "canAccessToSSHKeys",
+ "canAccessToGitProviders",
+ "canDeleteEnvironments",
+ "canCreateEnvironments"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.getInvitations": {
+ "get": {
+ "operationId": "user-getInvitations",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.getContainerMetrics": {
+ "get": {
+ "operationId": "user-getContainerMetrics",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "url",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "token",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "appName",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "dataPoints",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.generateToken": {
+ "post": {
+ "operationId": "user-generateToken",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.deleteApiKey": {
+ "post": {
+ "operationId": "user-deleteApiKey",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "apiKeyId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "apiKeyId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.createApiKey": {
+ "post": {
+ "operationId": "user-createApiKey",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "prefix": {
+ "type": "string"
+ },
+ "expiresIn": {
+ "type": "number"
+ },
+ "metadata": {
+ "type": "object",
+ "properties": {
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "organizationId"
+ ]
+ },
+ "rateLimitEnabled": {
+ "type": "boolean"
+ },
+ "rateLimitTimeWindow": {
+ "type": "number"
+ },
+ "rateLimitMax": {
+ "type": "number"
+ },
+ "remaining": {
+ "type": "number"
+ },
+ "refillAmount": {
+ "type": "number"
+ },
+ "refillInterval": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "name",
+ "metadata"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.checkUserOrganizations": {
+ "get": {
+ "operationId": "user-checkUserOrganizations",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "userId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/user.sendInvitation": {
+ "post": {
+ "operationId": "user-sendInvitation",
+ "tags": [
+ "user"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "invitationId": {
+ "type": "string"
+ },
+ "notificationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "invitationId",
+ "notificationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/domain.create": {
+ "post": {
+ "operationId": "domain-create",
+ "tags": [
+ "domain"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string"
+ },
+ "path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "port": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "https": {
+ "type": "boolean"
+ },
+ "applicationId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "certificateType": {
+ "type": "string",
+ "enum": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "customCertResolver": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "composeId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serviceName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "domainType": {
+ "anyOf": [
+ {
+ "type": "string",
+ "enum": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "previewDeploymentId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "internalPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stripPath": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "host"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/domain.byApplicationId": {
+ "get": {
+ "operationId": "domain-byApplicationId",
+ "tags": [
+ "domain"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "applicationId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/domain.byComposeId": {
+ "get": {
+ "operationId": "domain-byComposeId",
+ "tags": [
+ "domain"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "composeId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/domain.generateDomain": {
+ "post": {
+ "operationId": "domain-generateDomain",
+ "tags": [
+ "domain"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appName": {
+ "type": "string"
+ },
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "appName"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/domain.canGenerateTraefikMeDomains": {
+ "get": {
+ "operationId": "domain-canGenerateTraefikMeDomains",
+ "tags": [
+ "domain"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/domain.update": {
+ "post": {
+ "operationId": "domain-update",
+ "tags": [
+ "domain"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string"
+ },
+ "path": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "port": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "https": {
+ "type": "boolean"
+ },
+ "certificateType": {
+ "type": "string",
+ "enum": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "customCertResolver": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serviceName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "domainType": {
+ "anyOf": [
+ {
+ "type": "string",
+ "enum": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "internalPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "stripPath": {
+ "type": "boolean"
+ },
+ "domainId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "host",
+ "domainId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/domain.one": {
+ "get": {
+ "operationId": "domain-one",
+ "tags": [
+ "domain"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "domainId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/domain.delete": {
+ "post": {
+ "operationId": "domain-delete",
+ "tags": [
+ "domain"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "domainId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "domainId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/domain.validateDomain": {
+ "post": {
+ "operationId": "domain-validateDomain",
+ "tags": [
+ "domain"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "domain": {
+ "type": "string"
+ },
+ "serverIp": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "domain"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/destination.create": {
+ "post": {
+ "operationId": "destination-create",
+ "tags": [
+ "destination"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "accessKey": {
+ "type": "string"
+ },
+ "bucket": {
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ },
+ "endpoint": {
+ "type": "string"
+ },
+ "secretAccessKey": {
+ "type": "string"
+ },
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "provider",
+ "accessKey",
+ "bucket",
+ "region",
+ "endpoint",
+ "secretAccessKey"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/destination.testConnection": {
+ "post": {
+ "operationId": "destination-testConnection",
+ "tags": [
+ "destination"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "accessKey": {
+ "type": "string"
+ },
+ "bucket": {
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ },
+ "endpoint": {
+ "type": "string"
+ },
+ "secretAccessKey": {
+ "type": "string"
+ },
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "provider",
+ "accessKey",
+ "bucket",
+ "region",
+ "endpoint",
+ "secretAccessKey"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/destination.one": {
+ "get": {
+ "operationId": "destination-one",
+ "tags": [
+ "destination"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "destinationId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/destination.all": {
+ "get": {
+ "operationId": "destination-all",
+ "tags": [
+ "destination"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/destination.remove": {
+ "post": {
+ "operationId": "destination-remove",
+ "tags": [
+ "destination"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "destinationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "destinationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/destination.update": {
+ "post": {
+ "operationId": "destination-update",
+ "tags": [
+ "destination"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "accessKey": {
+ "type": "string"
+ },
+ "bucket": {
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ },
+ "endpoint": {
+ "type": "string"
+ },
+ "secretAccessKey": {
+ "type": "string"
+ },
+ "destinationId": {
+ "type": "string"
+ },
+ "provider": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "accessKey",
+ "bucket",
+ "region",
+ "endpoint",
+ "secretAccessKey",
+ "destinationId",
+ "provider"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/backup.create": {
+ "post": {
+ "operationId": "backup-create",
+ "tags": [
+ "backup"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "schedule": {
+ "type": "string"
+ },
+ "enabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "prefix": {
+ "type": "string"
+ },
+ "destinationId": {
+ "type": "string"
+ },
+ "keepLatestCount": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "database": {
+ "type": "string"
+ },
+ "mariadbId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "mysqlId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "postgresId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "mongoId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "databaseType": {
+ "type": "string",
+ "enum": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "userId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "backupType": {
+ "type": "string",
+ "enum": [
+ "database",
+ "compose"
+ ]
+ },
+ "composeId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serviceName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "metadata": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "schedule",
+ "prefix",
+ "destinationId",
+ "database",
+ "databaseType"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/backup.one": {
+ "get": {
+ "operationId": "backup-one",
+ "tags": [
+ "backup"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "backupId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/backup.update": {
+ "post": {
+ "operationId": "backup-update",
+ "tags": [
+ "backup"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "schedule": {
+ "type": "string"
+ },
+ "enabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "prefix": {
+ "type": "string"
+ },
+ "backupId": {
+ "type": "string"
+ },
+ "destinationId": {
+ "type": "string"
+ },
+ "database": {
+ "type": "string"
+ },
+ "keepLatestCount": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serviceName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "metadata": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "databaseType": {
+ "type": "string",
+ "enum": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ }
+ },
+ "required": [
+ "schedule",
+ "enabled",
+ "prefix",
+ "backupId",
+ "destinationId",
+ "database",
+ "keepLatestCount",
+ "serviceName",
+ "metadata",
+ "databaseType"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/backup.remove": {
+ "post": {
+ "operationId": "backup-remove",
+ "tags": [
+ "backup"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "backupId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "backupId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/backup.manualBackupPostgres": {
+ "post": {
+ "operationId": "backup-manualBackupPostgres",
+ "tags": [
+ "backup"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "backupId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "backupId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/backup.manualBackupMySql": {
+ "post": {
+ "operationId": "backup-manualBackupMySql",
+ "tags": [
+ "backup"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "backupId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "backupId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/backup.manualBackupMariadb": {
+ "post": {
+ "operationId": "backup-manualBackupMariadb",
+ "tags": [
+ "backup"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "backupId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "backupId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/backup.manualBackupCompose": {
+ "post": {
+ "operationId": "backup-manualBackupCompose",
+ "tags": [
+ "backup"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "backupId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "backupId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/backup.manualBackupMongo": {
+ "post": {
+ "operationId": "backup-manualBackupMongo",
+ "tags": [
+ "backup"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "backupId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "backupId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/backup.manualBackupWebServer": {
+ "post": {
+ "operationId": "backup-manualBackupWebServer",
+ "tags": [
+ "backup"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "backupId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "backupId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/backup.listBackupFiles": {
+ "get": {
+ "operationId": "backup-listBackupFiles",
+ "tags": [
+ "backup"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "destinationId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "search",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/deployment.all": {
+ "get": {
+ "operationId": "deployment-all",
+ "tags": [
+ "deployment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "applicationId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/deployment.allByCompose": {
+ "get": {
+ "operationId": "deployment-allByCompose",
+ "tags": [
+ "deployment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "composeId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/deployment.allByServer": {
+ "get": {
+ "operationId": "deployment-allByServer",
+ "tags": [
+ "deployment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/deployment.allCentralized": {
+ "get": {
+ "operationId": "deployment-allCentralized",
+ "tags": [
+ "deployment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/deployment.queueList": {
+ "get": {
+ "operationId": "deployment-queueList",
+ "tags": [
+ "deployment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/deployment.allByType": {
+ "get": {
+ "operationId": "deployment-allByType",
+ "tags": [
+ "deployment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "id",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "application",
+ "compose",
+ "server",
+ "schedule",
+ "previewDeployment",
+ "backup",
+ "volumeBackup"
+ ]
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/deployment.killProcess": {
+ "post": {
+ "operationId": "deployment-killProcess",
+ "tags": [
+ "deployment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "deploymentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "deploymentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/deployment.removeDeployment": {
+ "post": {
+ "operationId": "deployment-removeDeployment",
+ "tags": [
+ "deployment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "deploymentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "deploymentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/previewDeployment.all": {
+ "get": {
+ "operationId": "previewDeployment-all",
+ "tags": [
+ "previewDeployment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "applicationId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/previewDeployment.delete": {
+ "post": {
+ "operationId": "previewDeployment-delete",
+ "tags": [
+ "previewDeployment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "previewDeploymentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "previewDeploymentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/previewDeployment.one": {
+ "get": {
+ "operationId": "previewDeployment-one",
+ "tags": [
+ "previewDeployment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "previewDeploymentId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/previewDeployment.redeploy": {
+ "post": {
+ "operationId": "previewDeployment-redeploy",
+ "tags": [
+ "previewDeployment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "previewDeploymentId": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "previewDeploymentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mounts.create": {
+ "post": {
+ "operationId": "mounts-create",
+ "tags": [
+ "mounts"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "hostPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "volumeName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "content": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "mountPath": {
+ "type": "string"
+ },
+ "serviceType": {
+ "type": "string",
+ "enum": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "filePath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serviceId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "type",
+ "mountPath",
+ "serviceId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mounts.remove": {
+ "post": {
+ "operationId": "mounts-remove",
+ "tags": [
+ "mounts"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mountId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "mountId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mounts.one": {
+ "get": {
+ "operationId": "mounts-one",
+ "tags": [
+ "mounts"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "mountId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mounts.update": {
+ "post": {
+ "operationId": "mounts-update",
+ "tags": [
+ "mounts"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "mountId": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "bind",
+ "volume",
+ "file"
+ ]
+ },
+ "hostPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "volumeName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "filePath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "content": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serviceType": {
+ "type": "string",
+ "enum": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "mountPath": {
+ "type": "string"
+ },
+ "applicationId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "postgresId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "mariadbId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "mongoId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "mysqlId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "redisId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "composeId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "mountId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mounts.allNamedByApplicationId": {
+ "get": {
+ "operationId": "mounts-allNamedByApplicationId",
+ "tags": [
+ "mounts"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "applicationId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/mounts.listByServiceId": {
+ "get": {
+ "operationId": "mounts-listByServiceId",
+ "tags": [
+ "mounts"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serviceId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "serviceType",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/certificates.create": {
+ "post": {
+ "operationId": "certificates-create",
+ "tags": [
+ "certificates"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "certificateId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "certificateData": {
+ "type": "string"
+ },
+ "privateKey": {
+ "type": "string"
+ },
+ "certificatePath": {
+ "type": "string"
+ },
+ "autoRenew": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "organizationId": {
+ "type": "string"
+ },
+ "serverId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "name",
+ "certificateData",
+ "privateKey",
+ "organizationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/certificates.one": {
+ "get": {
+ "operationId": "certificates-one",
+ "tags": [
+ "certificates"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "certificateId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/certificates.remove": {
+ "post": {
+ "operationId": "certificates-remove",
+ "tags": [
+ "certificates"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "certificateId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "certificateId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/certificates.all": {
+ "get": {
+ "operationId": "certificates-all",
+ "tags": [
+ "certificates"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.getWebServerSettings": {
+ "get": {
+ "operationId": "settings-getWebServerSettings",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.reloadServer": {
+ "post": {
+ "operationId": "settings-reloadServer",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.cleanRedis": {
+ "post": {
+ "operationId": "settings-cleanRedis",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.reloadRedis": {
+ "post": {
+ "operationId": "settings-reloadRedis",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.cleanAllDeploymentQueue": {
+ "post": {
+ "operationId": "settings-cleanAllDeploymentQueue",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.reloadTraefik": {
+ "post": {
+ "operationId": "settings-reloadTraefik",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": false,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.toggleDashboard": {
+ "post": {
+ "operationId": "settings-toggleDashboard",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "enableDashboard": {
+ "type": "boolean"
+ },
+ "serverId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.cleanUnusedImages": {
+ "post": {
+ "operationId": "settings-cleanUnusedImages",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": false,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.cleanUnusedVolumes": {
+ "post": {
+ "operationId": "settings-cleanUnusedVolumes",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": false,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.cleanStoppedContainers": {
+ "post": {
+ "operationId": "settings-cleanStoppedContainers",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": false,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.cleanDockerBuilder": {
+ "post": {
+ "operationId": "settings-cleanDockerBuilder",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": false,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.cleanDockerPrune": {
+ "post": {
+ "operationId": "settings-cleanDockerPrune",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": false,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.cleanAll": {
+ "post": {
+ "operationId": "settings-cleanAll",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": false,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.cleanMonitoring": {
+ "post": {
+ "operationId": "settings-cleanMonitoring",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.saveSSHPrivateKey": {
+ "post": {
+ "operationId": "settings-saveSSHPrivateKey",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "sshPrivateKey": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "sshPrivateKey"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.assignDomainServer": {
+ "post": {
+ "operationId": "settings-assignDomainServer",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string"
+ },
+ "certificateType": {
+ "type": "string",
+ "enum": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "letsEncryptEmail": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "string",
+ "const": ""
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "https": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "host",
+ "certificateType"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.cleanSSHPrivateKey": {
+ "post": {
+ "operationId": "settings-cleanSSHPrivateKey",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.updateDockerCleanup": {
+ "post": {
+ "operationId": "settings-updateDockerCleanup",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "enableDockerCleanup": {
+ "type": "boolean"
+ },
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "enableDockerCleanup"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.readTraefikConfig": {
+ "get": {
+ "operationId": "settings-readTraefikConfig",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.updateTraefikConfig": {
+ "post": {
+ "operationId": "settings-updateTraefikConfig",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "traefikConfig": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "traefikConfig"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.readWebServerTraefikConfig": {
+ "get": {
+ "operationId": "settings-readWebServerTraefikConfig",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.updateWebServerTraefikConfig": {
+ "post": {
+ "operationId": "settings-updateWebServerTraefikConfig",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "traefikConfig": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "traefikConfig"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.readMiddlewareTraefikConfig": {
+ "get": {
+ "operationId": "settings-readMiddlewareTraefikConfig",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.updateMiddlewareTraefikConfig": {
+ "post": {
+ "operationId": "settings-updateMiddlewareTraefikConfig",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "traefikConfig": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "traefikConfig"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.getUpdateData": {
+ "post": {
+ "operationId": "settings-getUpdateData",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.updateServer": {
+ "post": {
+ "operationId": "settings-updateServer",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.getDokployVersion": {
+ "get": {
+ "operationId": "settings-getDokployVersion",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.getReleaseTag": {
+ "get": {
+ "operationId": "settings-getReleaseTag",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.readDirectories": {
+ "get": {
+ "operationId": "settings-readDirectories",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.updateTraefikFile": {
+ "post": {
+ "operationId": "settings-updateTraefikFile",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "type": "string"
+ },
+ "traefikConfig": {
+ "type": "string"
+ },
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "path",
+ "traefikConfig"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.readTraefikFile": {
+ "get": {
+ "operationId": "settings-readTraefikFile",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "path",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.getIp": {
+ "get": {
+ "operationId": "settings-getIp",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.updateServerIp": {
+ "post": {
+ "operationId": "settings-updateServerIp",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverIp": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "serverIp"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.getOpenApiDocument": {
+ "get": {
+ "operationId": "settings-getOpenApiDocument",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.readTraefikEnv": {
+ "get": {
+ "operationId": "settings-readTraefikEnv",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.writeTraefikEnv": {
+ "post": {
+ "operationId": "settings-writeTraefikEnv",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "env": {
+ "type": "string"
+ },
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "env"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.haveTraefikDashboardPortEnabled": {
+ "get": {
+ "operationId": "settings-haveTraefikDashboardPortEnabled",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.haveActivateRequests": {
+ "get": {
+ "operationId": "settings-haveActivateRequests",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.toggleRequests": {
+ "post": {
+ "operationId": "settings-toggleRequests",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "enable"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.isCloud": {
+ "get": {
+ "operationId": "settings-isCloud",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.isUserSubscribed": {
+ "get": {
+ "operationId": "settings-isUserSubscribed",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.health": {
+ "get": {
+ "operationId": "settings-health",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.setupGPU": {
+ "post": {
+ "operationId": "settings-setupGPU",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.checkGPUStatus": {
+ "get": {
+ "operationId": "settings-checkGPUStatus",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.updateTraefikPorts": {
+ "post": {
+ "operationId": "settings-updateTraefikPorts",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ },
+ "additionalPorts": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "targetPort": {
+ "type": "number"
+ },
+ "publishedPort": {
+ "type": "number"
+ },
+ "protocol": {
+ "type": "string",
+ "enum": [
+ "tcp",
+ "udp",
+ "sctp"
+ ]
+ }
+ },
+ "required": [
+ "targetPort",
+ "publishedPort",
+ "protocol"
+ ]
+ }
+ }
+ },
+ "required": [
+ "additionalPorts"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.getTraefikPorts": {
+ "get": {
+ "operationId": "settings-getTraefikPorts",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.updateLogCleanup": {
+ "post": {
+ "operationId": "settings-updateLogCleanup",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "cronExpression": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "cronExpression"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.getLogCleanupStatus": {
+ "get": {
+ "operationId": "settings-getLogCleanupStatus",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/settings.getDokployCloudIps": {
+ "get": {
+ "operationId": "settings-getDokployCloudIps",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/security.create": {
+ "post": {
+ "operationId": "security-create",
+ "tags": [
+ "security"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "applicationId",
+ "username",
+ "password"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/security.one": {
+ "get": {
+ "operationId": "security-one",
+ "tags": [
+ "security"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "securityId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/security.delete": {
+ "post": {
+ "operationId": "security-delete",
+ "tags": [
+ "security"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "securityId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "securityId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/security.update": {
+ "post": {
+ "operationId": "security-update",
+ "tags": [
+ "security"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "securityId": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "securityId",
+ "username",
+ "password"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redirects.create": {
+ "post": {
+ "operationId": "redirects-create",
+ "tags": [
+ "redirects"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "regex": {
+ "type": "string"
+ },
+ "replacement": {
+ "type": "string"
+ },
+ "permanent": {
+ "type": "boolean"
+ },
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "regex",
+ "replacement",
+ "permanent",
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redirects.one": {
+ "get": {
+ "operationId": "redirects-one",
+ "tags": [
+ "redirects"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "redirectId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redirects.delete": {
+ "post": {
+ "operationId": "redirects-delete",
+ "tags": [
+ "redirects"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redirectId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "redirectId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/redirects.update": {
+ "post": {
+ "operationId": "redirects-update",
+ "tags": [
+ "redirects"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redirectId": {
+ "type": "string"
+ },
+ "regex": {
+ "type": "string"
+ },
+ "replacement": {
+ "type": "string"
+ },
+ "permanent": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "redirectId",
+ "regex",
+ "replacement",
+ "permanent"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/port.create": {
+ "post": {
+ "operationId": "port-create",
+ "tags": [
+ "port"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "publishedPort": {
+ "type": "number"
+ },
+ "publishMode": {
+ "default": "ingress",
+ "type": "string",
+ "enum": [
+ "ingress",
+ "host"
+ ]
+ },
+ "targetPort": {
+ "type": "number"
+ },
+ "protocol": {
+ "default": "tcp",
+ "type": "string",
+ "enum": [
+ "tcp",
+ "udp"
+ ]
+ },
+ "applicationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "publishedPort",
+ "publishMode",
+ "targetPort",
+ "protocol",
+ "applicationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/port.one": {
+ "get": {
+ "operationId": "port-one",
+ "tags": [
+ "port"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "portId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/port.delete": {
+ "post": {
+ "operationId": "port-delete",
+ "tags": [
+ "port"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "portId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "portId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/port.update": {
+ "post": {
+ "operationId": "port-update",
+ "tags": [
+ "port"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "portId": {
+ "type": "string"
+ },
+ "publishedPort": {
+ "type": "number"
+ },
+ "publishMode": {
+ "default": "ingress",
+ "type": "string",
+ "enum": [
+ "ingress",
+ "host"
+ ]
+ },
+ "targetPort": {
+ "type": "number"
+ },
+ "protocol": {
+ "default": "tcp",
+ "type": "string",
+ "enum": [
+ "tcp",
+ "udp"
+ ]
+ }
+ },
+ "required": [
+ "portId",
+ "publishedPort",
+ "publishMode",
+ "targetPort",
+ "protocol"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/registry.create": {
+ "post": {
+ "operationId": "registry-create",
+ "tags": [
+ "registry"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "registryName": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ },
+ "registryUrl": {
+ "type": "string"
+ },
+ "registryType": {
+ "type": "string",
+ "enum": [
+ "cloud"
+ ]
+ },
+ "imagePrefix": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "registryName",
+ "username",
+ "password",
+ "registryUrl",
+ "registryType",
+ "imagePrefix"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/registry.remove": {
+ "post": {
+ "operationId": "registry-remove",
+ "tags": [
+ "registry"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "registryId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "registryId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/registry.update": {
+ "post": {
+ "operationId": "registry-update",
+ "tags": [
+ "registry"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "registryId": {
+ "type": "string"
+ },
+ "registryName": {
+ "type": "string"
+ },
+ "imagePrefix": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "username": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ },
+ "registryUrl": {
+ "type": "string"
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "registryType": {
+ "type": "string",
+ "enum": [
+ "cloud"
+ ]
+ },
+ "organizationId": {
+ "type": "string"
+ },
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "registryId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/registry.all": {
+ "get": {
+ "operationId": "registry-all",
+ "tags": [
+ "registry"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/registry.one": {
+ "get": {
+ "operationId": "registry-one",
+ "tags": [
+ "registry"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "registryId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/registry.testRegistry": {
+ "post": {
+ "operationId": "registry-testRegistry",
+ "tags": [
+ "registry"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "registryName": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ },
+ "registryUrl": {
+ "type": "string"
+ },
+ "registryType": {
+ "type": "string",
+ "enum": [
+ "cloud"
+ ]
+ },
+ "imagePrefix": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "username",
+ "password",
+ "registryUrl",
+ "registryType"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/registry.testRegistryById": {
+ "post": {
+ "operationId": "registry-testRegistryById",
+ "tags": [
+ "registry"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "registryId": {
+ "type": "string"
+ },
+ "serverId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/cluster.getNodes": {
+ "get": {
+ "operationId": "cluster-getNodes",
+ "tags": [
+ "cluster"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/cluster.removeWorker": {
+ "post": {
+ "operationId": "cluster-removeWorker",
+ "tags": [
+ "cluster"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "nodeId": {
+ "type": "string"
+ },
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "nodeId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/cluster.addWorker": {
+ "get": {
+ "operationId": "cluster-addWorker",
+ "tags": [
+ "cluster"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/cluster.addManager": {
+ "get": {
+ "operationId": "cluster-addManager",
+ "tags": [
+ "cluster"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.createSlack": {
+ "post": {
+ "operationId": "notification-createSlack",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "webhookUrl": {
+ "type": "string"
+ },
+ "channel": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "appBuildError",
+ "databaseBackup",
+ "volumeBackup",
+ "dokployRestart",
+ "name",
+ "appDeploy",
+ "dockerCleanup",
+ "serverThreshold",
+ "webhookUrl",
+ "channel"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.updateSlack": {
+ "post": {
+ "operationId": "notification-updateSlack",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "webhookUrl": {
+ "type": "string"
+ },
+ "channel": {
+ "type": "string"
+ },
+ "notificationId": {
+ "type": "string"
+ },
+ "slackId": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "notificationId",
+ "slackId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.testSlackConnection": {
+ "post": {
+ "operationId": "notification-testSlackConnection",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "webhookUrl": {
+ "type": "string"
+ },
+ "channel": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "webhookUrl",
+ "channel"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.createTelegram": {
+ "post": {
+ "operationId": "notification-createTelegram",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "botToken": {
+ "type": "string"
+ },
+ "chatId": {
+ "type": "string"
+ },
+ "messageThreadId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "appBuildError",
+ "databaseBackup",
+ "volumeBackup",
+ "dokployRestart",
+ "name",
+ "appDeploy",
+ "dockerCleanup",
+ "serverThreshold",
+ "botToken",
+ "chatId",
+ "messageThreadId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.updateTelegram": {
+ "post": {
+ "operationId": "notification-updateTelegram",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "botToken": {
+ "type": "string"
+ },
+ "chatId": {
+ "type": "string"
+ },
+ "messageThreadId": {
+ "type": "string"
+ },
+ "notificationId": {
+ "type": "string"
+ },
+ "telegramId": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "notificationId",
+ "telegramId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.testTelegramConnection": {
+ "post": {
+ "operationId": "notification-testTelegramConnection",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "botToken": {
+ "type": "string"
+ },
+ "chatId": {
+ "type": "string"
+ },
+ "messageThreadId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "botToken",
+ "chatId",
+ "messageThreadId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.createDiscord": {
+ "post": {
+ "operationId": "notification-createDiscord",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "webhookUrl": {
+ "type": "string"
+ },
+ "decoration": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "appBuildError",
+ "databaseBackup",
+ "volumeBackup",
+ "dokployRestart",
+ "name",
+ "appDeploy",
+ "dockerCleanup",
+ "serverThreshold",
+ "webhookUrl",
+ "decoration"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.updateDiscord": {
+ "post": {
+ "operationId": "notification-updateDiscord",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "webhookUrl": {
+ "type": "string"
+ },
+ "decoration": {
+ "type": "boolean"
+ },
+ "notificationId": {
+ "type": "string"
+ },
+ "discordId": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "notificationId",
+ "discordId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.testDiscordConnection": {
+ "post": {
+ "operationId": "notification-testDiscordConnection",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "webhookUrl": {
+ "type": "string"
+ },
+ "decoration": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "webhookUrl"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.createEmail": {
+ "post": {
+ "operationId": "notification-createEmail",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "smtpServer": {
+ "type": "string"
+ },
+ "smtpPort": {
+ "type": "number"
+ },
+ "username": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ },
+ "fromAddress": {
+ "type": "string"
+ },
+ "toAddresses": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "appBuildError",
+ "databaseBackup",
+ "volumeBackup",
+ "dokployRestart",
+ "name",
+ "appDeploy",
+ "dockerCleanup",
+ "serverThreshold",
+ "smtpServer",
+ "smtpPort",
+ "username",
+ "password",
+ "fromAddress",
+ "toAddresses"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.updateEmail": {
+ "post": {
+ "operationId": "notification-updateEmail",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "smtpServer": {
+ "type": "string"
+ },
+ "smtpPort": {
+ "type": "number"
+ },
+ "username": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ },
+ "fromAddress": {
+ "type": "string"
+ },
+ "toAddresses": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "notificationId": {
+ "type": "string"
+ },
+ "emailId": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "notificationId",
+ "emailId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.testEmailConnection": {
+ "post": {
+ "operationId": "notification-testEmailConnection",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "smtpServer": {
+ "type": "string"
+ },
+ "smtpPort": {
+ "type": "number"
+ },
+ "username": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ },
+ "toAddresses": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "fromAddress": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "smtpServer",
+ "smtpPort",
+ "username",
+ "password",
+ "toAddresses",
+ "fromAddress"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.createResend": {
+ "post": {
+ "operationId": "notification-createResend",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "apiKey": {
+ "type": "string"
+ },
+ "fromAddress": {
+ "type": "string"
+ },
+ "toAddresses": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "appBuildError",
+ "databaseBackup",
+ "volumeBackup",
+ "dokployRestart",
+ "name",
+ "appDeploy",
+ "dockerCleanup",
+ "serverThreshold",
+ "apiKey",
+ "fromAddress",
+ "toAddresses"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.updateResend": {
+ "post": {
+ "operationId": "notification-updateResend",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "apiKey": {
+ "type": "string"
+ },
+ "fromAddress": {
+ "type": "string"
+ },
+ "toAddresses": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "notificationId": {
+ "type": "string"
+ },
+ "resendId": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "notificationId",
+ "resendId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.testResendConnection": {
+ "post": {
+ "operationId": "notification-testResendConnection",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "apiKey": {
+ "type": "string"
+ },
+ "fromAddress": {
+ "type": "string"
+ },
+ "toAddresses": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "apiKey",
+ "fromAddress",
+ "toAddresses"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.remove": {
+ "post": {
+ "operationId": "notification-remove",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "notificationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "notificationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.one": {
+ "get": {
+ "operationId": "notification-one",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "notificationId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.all": {
+ "get": {
+ "operationId": "notification-all",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.receiveNotification": {
+ "post": {
+ "operationId": "notification-receiveNotification",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ServerType": {
+ "default": "Dokploy",
+ "type": "string",
+ "enum": [
+ "Dokploy",
+ "Remote"
+ ]
+ },
+ "Type": {
+ "type": "string",
+ "enum": [
+ "Memory",
+ "CPU"
+ ]
+ },
+ "Value": {
+ "type": "number"
+ },
+ "Threshold": {
+ "type": "number"
+ },
+ "Message": {
+ "type": "string"
+ },
+ "Timestamp": {
+ "type": "string"
+ },
+ "Token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Type",
+ "Value",
+ "Threshold",
+ "Message",
+ "Timestamp",
+ "Token"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.createGotify": {
+ "post": {
+ "operationId": "notification-createGotify",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverUrl": {
+ "type": "string"
+ },
+ "appToken": {
+ "type": "string"
+ },
+ "priority": {
+ "type": "number"
+ },
+ "decoration": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "appBuildError",
+ "databaseBackup",
+ "volumeBackup",
+ "dokployRestart",
+ "name",
+ "appDeploy",
+ "dockerCleanup",
+ "serverUrl",
+ "appToken",
+ "priority",
+ "decoration"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.updateGotify": {
+ "post": {
+ "operationId": "notification-updateGotify",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverUrl": {
+ "type": "string"
+ },
+ "appToken": {
+ "type": "string"
+ },
+ "priority": {
+ "type": "number"
+ },
+ "decoration": {
+ "type": "boolean"
+ },
+ "notificationId": {
+ "type": "string"
+ },
+ "gotifyId": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "notificationId",
+ "gotifyId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.testGotifyConnection": {
+ "post": {
+ "operationId": "notification-testGotifyConnection",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverUrl": {
+ "type": "string"
+ },
+ "appToken": {
+ "type": "string"
+ },
+ "priority": {
+ "type": "number"
+ },
+ "decoration": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "serverUrl",
+ "appToken",
+ "priority"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.createNtfy": {
+ "post": {
+ "operationId": "notification-createNtfy",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverUrl": {
+ "type": "string"
+ },
+ "topic": {
+ "type": "string"
+ },
+ "accessToken": {
+ "type": "string"
+ },
+ "priority": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "appBuildError",
+ "databaseBackup",
+ "volumeBackup",
+ "dokployRestart",
+ "name",
+ "appDeploy",
+ "dockerCleanup",
+ "serverUrl",
+ "topic",
+ "accessToken",
+ "priority"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.updateNtfy": {
+ "post": {
+ "operationId": "notification-updateNtfy",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverUrl": {
+ "type": "string"
+ },
+ "topic": {
+ "type": "string"
+ },
+ "accessToken": {
+ "type": "string"
+ },
+ "priority": {
+ "type": "number"
+ },
+ "notificationId": {
+ "type": "string"
+ },
+ "ntfyId": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "notificationId",
+ "ntfyId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.testNtfyConnection": {
+ "post": {
+ "operationId": "notification-testNtfyConnection",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverUrl": {
+ "type": "string"
+ },
+ "topic": {
+ "type": "string"
+ },
+ "accessToken": {
+ "type": "string"
+ },
+ "priority": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "serverUrl",
+ "topic",
+ "accessToken",
+ "priority"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.createCustom": {
+ "post": {
+ "operationId": "notification-createCustom",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "endpoint": {
+ "type": "string"
+ },
+ "headers": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "name",
+ "endpoint"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.updateCustom": {
+ "post": {
+ "operationId": "notification-updateCustom",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "endpoint": {
+ "type": "string"
+ },
+ "headers": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "notificationId": {
+ "type": "string"
+ },
+ "customId": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "notificationId",
+ "customId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.testCustomConnection": {
+ "post": {
+ "operationId": "notification-testCustomConnection",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "endpoint": {
+ "type": "string"
+ },
+ "headers": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "endpoint"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.createLark": {
+ "post": {
+ "operationId": "notification-createLark",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "webhookUrl": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "appBuildError",
+ "databaseBackup",
+ "volumeBackup",
+ "dokployRestart",
+ "name",
+ "appDeploy",
+ "dockerCleanup",
+ "serverThreshold",
+ "webhookUrl"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.updateLark": {
+ "post": {
+ "operationId": "notification-updateLark",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "webhookUrl": {
+ "type": "string"
+ },
+ "notificationId": {
+ "type": "string"
+ },
+ "larkId": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "notificationId",
+ "larkId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.testLarkConnection": {
+ "post": {
+ "operationId": "notification-testLarkConnection",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "webhookUrl": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "webhookUrl"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.createTeams": {
+ "post": {
+ "operationId": "notification-createTeams",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "webhookUrl": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "appBuildError",
+ "databaseBackup",
+ "volumeBackup",
+ "dokployRestart",
+ "name",
+ "appDeploy",
+ "dockerCleanup",
+ "serverThreshold",
+ "webhookUrl"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.updateTeams": {
+ "post": {
+ "operationId": "notification-updateTeams",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "webhookUrl": {
+ "type": "string"
+ },
+ "notificationId": {
+ "type": "string"
+ },
+ "teamsId": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "notificationId",
+ "teamsId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.testTeamsConnection": {
+ "post": {
+ "operationId": "notification-testTeamsConnection",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "webhookUrl": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "webhookUrl"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.createPushover": {
+ "post": {
+ "operationId": "notification-createPushover",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ },
+ "userKey": {
+ "type": "string"
+ },
+ "apiToken": {
+ "type": "string"
+ },
+ "priority": {
+ "default": 0,
+ "type": "number"
+ },
+ "retry": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "expire": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "name",
+ "userKey",
+ "apiToken"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.updatePushover": {
+ "post": {
+ "operationId": "notification-updatePushover",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "notificationId": {
+ "type": "string"
+ },
+ "pushoverId": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ },
+ "userKey": {
+ "type": "string"
+ },
+ "apiToken": {
+ "type": "string"
+ },
+ "priority": {
+ "type": "number"
+ },
+ "retry": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "expire": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "appBuildError": {
+ "type": "boolean"
+ },
+ "databaseBackup": {
+ "type": "boolean"
+ },
+ "volumeBackup": {
+ "type": "boolean"
+ },
+ "dokployRestart": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "appDeploy": {
+ "type": "boolean"
+ },
+ "dockerCleanup": {
+ "type": "boolean"
+ },
+ "serverThreshold": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "notificationId",
+ "pushoverId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.testPushoverConnection": {
+ "post": {
+ "operationId": "notification-testPushoverConnection",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userKey": {
+ "type": "string"
+ },
+ "apiToken": {
+ "type": "string"
+ },
+ "priority": {
+ "type": "number"
+ },
+ "retry": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "expire": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "userKey",
+ "apiToken",
+ "priority"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/notification.getEmailProviders": {
+ "get": {
+ "operationId": "notification-getEmailProviders",
+ "tags": [
+ "notification"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sshKey.create": {
+ "post": {
+ "operationId": "sshKey-create",
+ "tags": [
+ "sshKey"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "privateKey": {
+ "type": "string"
+ },
+ "publicKey": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "privateKey",
+ "publicKey",
+ "organizationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sshKey.remove": {
+ "post": {
+ "operationId": "sshKey-remove",
+ "tags": [
+ "sshKey"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "sshKeyId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "sshKeyId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sshKey.one": {
+ "get": {
+ "operationId": "sshKey-one",
+ "tags": [
+ "sshKey"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "sshKeyId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sshKey.all": {
+ "get": {
+ "operationId": "sshKey-all",
+ "tags": [
+ "sshKey"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sshKey.generate": {
+ "post": {
+ "operationId": "sshKey-generate",
+ "tags": [
+ "sshKey"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "rsa",
+ "ed25519"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sshKey.update": {
+ "post": {
+ "operationId": "sshKey-update",
+ "tags": [
+ "sshKey"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "lastUsedAt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "sshKeyId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "sshKeyId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitProvider.getAll": {
+ "get": {
+ "operationId": "gitProvider-getAll",
+ "tags": [
+ "gitProvider"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitProvider.remove": {
+ "post": {
+ "operationId": "gitProvider-remove",
+ "tags": [
+ "gitProvider"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "gitProviderId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "gitProviderId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitea.create": {
+ "post": {
+ "operationId": "gitea-create",
+ "tags": [
+ "gitea"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "giteaId": {
+ "type": "string"
+ },
+ "giteaUrl": {
+ "type": "string"
+ },
+ "giteaInternalUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "redirectUri": {
+ "type": "string"
+ },
+ "clientId": {
+ "type": "string"
+ },
+ "clientSecret": {
+ "type": "string"
+ },
+ "gitProviderId": {
+ "type": "string"
+ },
+ "accessToken": {
+ "type": "string"
+ },
+ "refreshToken": {
+ "type": "string"
+ },
+ "expiresAt": {
+ "type": "number"
+ },
+ "scopes": {
+ "type": "string"
+ },
+ "lastAuthenticatedAt": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ },
+ "giteaUsername": {
+ "type": "string"
+ },
+ "organizationName": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "giteaUrl",
+ "name"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitea.one": {
+ "get": {
+ "operationId": "gitea-one",
+ "tags": [
+ "gitea"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "giteaId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitea.giteaProviders": {
+ "get": {
+ "operationId": "gitea-giteaProviders",
+ "tags": [
+ "gitea"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitea.getGiteaRepositories": {
+ "get": {
+ "operationId": "gitea-getGiteaRepositories",
+ "tags": [
+ "gitea"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "giteaId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitea.getGiteaBranches": {
+ "get": {
+ "operationId": "gitea-getGiteaBranches",
+ "tags": [
+ "gitea"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "owner",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "repositoryName",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "giteaId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitea.testConnection": {
+ "post": {
+ "operationId": "gitea-testConnection",
+ "tags": [
+ "gitea"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "giteaId": {
+ "type": "string"
+ },
+ "organizationName": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitea.update": {
+ "post": {
+ "operationId": "gitea-update",
+ "tags": [
+ "gitea"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "giteaId": {
+ "type": "string"
+ },
+ "giteaUrl": {
+ "type": "string"
+ },
+ "giteaInternalUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "redirectUri": {
+ "type": "string"
+ },
+ "clientId": {
+ "type": "string"
+ },
+ "clientSecret": {
+ "type": "string"
+ },
+ "gitProviderId": {
+ "type": "string"
+ },
+ "accessToken": {
+ "type": "string"
+ },
+ "refreshToken": {
+ "type": "string"
+ },
+ "expiresAt": {
+ "type": "number"
+ },
+ "scopes": {
+ "type": "string"
+ },
+ "lastAuthenticatedAt": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ },
+ "giteaUsername": {
+ "type": "string"
+ },
+ "organizationName": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "giteaId",
+ "giteaUrl",
+ "gitProviderId",
+ "name"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitea.getGiteaUrl": {
+ "get": {
+ "operationId": "gitea-getGiteaUrl",
+ "tags": [
+ "gitea"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "giteaId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/bitbucket.create": {
+ "post": {
+ "operationId": "bitbucket-create",
+ "tags": [
+ "bitbucket"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "bitbucketId": {
+ "type": "string"
+ },
+ "bitbucketUsername": {
+ "type": "string"
+ },
+ "bitbucketEmail": {
+ "type": "string"
+ },
+ "appPassword": {
+ "type": "string"
+ },
+ "apiToken": {
+ "type": "string"
+ },
+ "bitbucketWorkspaceName": {
+ "type": "string"
+ },
+ "gitProviderId": {
+ "type": "string"
+ },
+ "authId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "authId",
+ "name"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/bitbucket.one": {
+ "get": {
+ "operationId": "bitbucket-one",
+ "tags": [
+ "bitbucket"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "bitbucketId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/bitbucket.bitbucketProviders": {
+ "get": {
+ "operationId": "bitbucket-bitbucketProviders",
+ "tags": [
+ "bitbucket"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/bitbucket.getBitbucketRepositories": {
+ "get": {
+ "operationId": "bitbucket-getBitbucketRepositories",
+ "tags": [
+ "bitbucket"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "bitbucketId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/bitbucket.getBitbucketBranches": {
+ "get": {
+ "operationId": "bitbucket-getBitbucketBranches",
+ "tags": [
+ "bitbucket"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "owner",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "repo",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "bitbucketId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/bitbucket.testConnection": {
+ "post": {
+ "operationId": "bitbucket-testConnection",
+ "tags": [
+ "bitbucket"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "bitbucketId": {
+ "type": "string"
+ },
+ "bitbucketUsername": {
+ "type": "string"
+ },
+ "bitbucketEmail": {
+ "type": "string"
+ },
+ "workspaceName": {
+ "type": "string"
+ },
+ "apiToken": {
+ "type": "string"
+ },
+ "appPassword": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "bitbucketId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/bitbucket.update": {
+ "post": {
+ "operationId": "bitbucket-update",
+ "tags": [
+ "bitbucket"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "bitbucketId": {
+ "type": "string"
+ },
+ "bitbucketUsername": {
+ "type": "string"
+ },
+ "bitbucketEmail": {
+ "type": "string"
+ },
+ "appPassword": {
+ "type": "string"
+ },
+ "apiToken": {
+ "type": "string"
+ },
+ "bitbucketWorkspaceName": {
+ "type": "string"
+ },
+ "gitProviderId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "bitbucketId",
+ "gitProviderId",
+ "name"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitlab.create": {
+ "post": {
+ "operationId": "gitlab-create",
+ "tags": [
+ "gitlab"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "secret": {
+ "type": "string"
+ },
+ "groupName": {
+ "type": "string"
+ },
+ "gitProviderId": {
+ "type": "string"
+ },
+ "redirectUri": {
+ "type": "string"
+ },
+ "authId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "gitlabUrl": {
+ "type": "string"
+ },
+ "gitlabInternalUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "authId",
+ "name",
+ "gitlabUrl"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitlab.one": {
+ "get": {
+ "operationId": "gitlab-one",
+ "tags": [
+ "gitlab"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "gitlabId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitlab.gitlabProviders": {
+ "get": {
+ "operationId": "gitlab-gitlabProviders",
+ "tags": [
+ "gitlab"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitlab.getGitlabRepositories": {
+ "get": {
+ "operationId": "gitlab-getGitlabRepositories",
+ "tags": [
+ "gitlab"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "gitlabId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitlab.getGitlabBranches": {
+ "get": {
+ "operationId": "gitlab-getGitlabBranches",
+ "tags": [
+ "gitlab"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "id",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "in": "query",
+ "name": "owner",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "repo",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "gitlabId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitlab.testConnection": {
+ "post": {
+ "operationId": "gitlab-testConnection",
+ "tags": [
+ "gitlab"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "gitlabId": {
+ "type": "string"
+ },
+ "groupName": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "gitlabId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/gitlab.update": {
+ "post": {
+ "operationId": "gitlab-update",
+ "tags": [
+ "gitlab"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "applicationId": {
+ "type": "string"
+ },
+ "secret": {
+ "type": "string"
+ },
+ "groupName": {
+ "type": "string"
+ },
+ "redirectUri": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "gitlabId": {
+ "type": "string"
+ },
+ "gitlabUrl": {
+ "type": "string"
+ },
+ "gitProviderId": {
+ "type": "string"
+ },
+ "gitlabInternalUrl": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "name",
+ "gitlabId",
+ "gitlabUrl",
+ "gitProviderId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/github.one": {
+ "get": {
+ "operationId": "github-one",
+ "tags": [
+ "github"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "githubId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/github.getGithubRepositories": {
+ "get": {
+ "operationId": "github-getGithubRepositories",
+ "tags": [
+ "github"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "githubId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/github.getGithubBranches": {
+ "get": {
+ "operationId": "github-getGithubBranches",
+ "tags": [
+ "github"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "repo",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "owner",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "githubId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/github.githubProviders": {
+ "get": {
+ "operationId": "github-githubProviders",
+ "tags": [
+ "github"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/github.testConnection": {
+ "post": {
+ "operationId": "github-testConnection",
+ "tags": [
+ "github"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "githubId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "githubId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/github.update": {
+ "post": {
+ "operationId": "github-update",
+ "tags": [
+ "github"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "githubId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "gitProviderId": {
+ "type": "string"
+ },
+ "githubAppName": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "githubId",
+ "name",
+ "gitProviderId",
+ "githubAppName"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.create": {
+ "post": {
+ "operationId": "server-create",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ipAddress": {
+ "type": "string"
+ },
+ "port": {
+ "type": "number"
+ },
+ "username": {
+ "type": "string"
+ },
+ "sshKeyId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serverType": {
+ "type": "string",
+ "enum": [
+ "deploy",
+ "build"
+ ]
+ }
+ },
+ "required": [
+ "name",
+ "description",
+ "ipAddress",
+ "port",
+ "username",
+ "sshKeyId",
+ "serverType"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.one": {
+ "get": {
+ "operationId": "server-one",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.getDefaultCommand": {
+ "get": {
+ "operationId": "server-getDefaultCommand",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.all": {
+ "get": {
+ "operationId": "server-all",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.count": {
+ "get": {
+ "operationId": "server-count",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.withSSHKey": {
+ "get": {
+ "operationId": "server-withSSHKey",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.buildServers": {
+ "get": {
+ "operationId": "server-buildServers",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.setup": {
+ "post": {
+ "operationId": "server-setup",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "serverId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.validate": {
+ "get": {
+ "operationId": "server-validate",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.security": {
+ "get": {
+ "operationId": "server-security",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.setupMonitoring": {
+ "post": {
+ "operationId": "server-setupMonitoring",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ },
+ "metricsConfig": {
+ "type": "object",
+ "properties": {
+ "server": {
+ "type": "object",
+ "properties": {
+ "refreshRate": {
+ "type": "number"
+ },
+ "port": {
+ "type": "number"
+ },
+ "token": {
+ "type": "string"
+ },
+ "urlCallback": {
+ "type": "string"
+ },
+ "retentionDays": {
+ "type": "number"
+ },
+ "cronJob": {
+ "type": "string"
+ },
+ "thresholds": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "number"
+ },
+ "memory": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "cpu",
+ "memory"
+ ]
+ }
+ },
+ "required": [
+ "refreshRate",
+ "port",
+ "token",
+ "urlCallback",
+ "retentionDays",
+ "cronJob",
+ "thresholds"
+ ]
+ },
+ "containers": {
+ "type": "object",
+ "properties": {
+ "refreshRate": {
+ "type": "number"
+ },
+ "services": {
+ "type": "object",
+ "properties": {
+ "include": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "exclude": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "required": [
+ "refreshRate",
+ "services"
+ ]
+ }
+ },
+ "required": [
+ "server",
+ "containers"
+ ]
+ }
+ },
+ "required": [
+ "serverId",
+ "metricsConfig"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.remove": {
+ "post": {
+ "operationId": "server-remove",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "serverId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.update": {
+ "post": {
+ "operationId": "server-update",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serverId": {
+ "type": "string"
+ },
+ "ipAddress": {
+ "type": "string"
+ },
+ "port": {
+ "type": "number"
+ },
+ "username": {
+ "type": "string"
+ },
+ "sshKeyId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serverType": {
+ "type": "string",
+ "enum": [
+ "deploy",
+ "build"
+ ]
+ },
+ "command": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "description",
+ "serverId",
+ "ipAddress",
+ "port",
+ "username",
+ "sshKeyId",
+ "serverType"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.publicIp": {
+ "get": {
+ "operationId": "server-publicIp",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.getServerTime": {
+ "get": {
+ "operationId": "server-getServerTime",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/server.getServerMetrics": {
+ "get": {
+ "operationId": "server-getServerMetrics",
+ "tags": [
+ "server"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "url",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "token",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "dataPoints",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/stripe.getCurrentPlan": {
+ "get": {
+ "operationId": "stripe-getCurrentPlan",
+ "tags": [
+ "stripe"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/stripe.getProducts": {
+ "get": {
+ "operationId": "stripe-getProducts",
+ "tags": [
+ "stripe"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/stripe.createCheckoutSession": {
+ "post": {
+ "operationId": "stripe-createCheckoutSession",
+ "tags": [
+ "stripe"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "tier": {
+ "type": "string",
+ "enum": [
+ "legacy",
+ "hobby",
+ "startup"
+ ]
+ },
+ "productId": {
+ "type": "string"
+ },
+ "serverQuantity": {
+ "type": "number"
+ },
+ "isAnnual": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "tier",
+ "productId",
+ "serverQuantity",
+ "isAnnual"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/stripe.createCustomerPortalSession": {
+ "post": {
+ "operationId": "stripe-createCustomerPortalSession",
+ "tags": [
+ "stripe"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/stripe.upgradeSubscription": {
+ "post": {
+ "operationId": "stripe-upgradeSubscription",
+ "tags": [
+ "stripe"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "tier": {
+ "type": "string",
+ "enum": [
+ "hobby",
+ "startup"
+ ]
+ },
+ "serverQuantity": {
+ "type": "number"
+ },
+ "isAnnual": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "tier",
+ "serverQuantity",
+ "isAnnual"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/stripe.canCreateMoreServers": {
+ "get": {
+ "operationId": "stripe-canCreateMoreServers",
+ "tags": [
+ "stripe"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/stripe.getInvoices": {
+ "get": {
+ "operationId": "stripe-getInvoices",
+ "tags": [
+ "stripe"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/swarm.getNodes": {
+ "get": {
+ "operationId": "swarm-getNodes",
+ "tags": [
+ "swarm"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/swarm.getNodeInfo": {
+ "get": {
+ "operationId": "swarm-getNodeInfo",
+ "tags": [
+ "swarm"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "nodeId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/swarm.getNodeApps": {
+ "get": {
+ "operationId": "swarm-getNodeApps",
+ "tags": [
+ "swarm"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "serverId",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ai.one": {
+ "get": {
+ "operationId": "ai-one",
+ "tags": [
+ "ai"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "aiId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ai.getModels": {
+ "get": {
+ "operationId": "ai-getModels",
+ "tags": [
+ "ai"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "apiUrl",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "apiKey",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ai.create": {
+ "post": {
+ "operationId": "ai-create",
+ "tags": [
+ "ai"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "apiUrl": {
+ "type": "string"
+ },
+ "apiKey": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "isEnabled": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name",
+ "apiUrl",
+ "apiKey",
+ "model",
+ "isEnabled"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ai.update": {
+ "post": {
+ "operationId": "ai-update",
+ "tags": [
+ "ai"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "aiId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "apiUrl": {
+ "type": "string"
+ },
+ "apiKey": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "isEnabled": {
+ "type": "boolean"
+ },
+ "createdAt": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "aiId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ai.getAll": {
+ "get": {
+ "operationId": "ai-getAll",
+ "tags": [
+ "ai"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ai.get": {
+ "get": {
+ "operationId": "ai-get",
+ "tags": [
+ "ai"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "aiId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ai.delete": {
+ "post": {
+ "operationId": "ai-delete",
+ "tags": [
+ "ai"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "aiId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "aiId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ai.suggest": {
+ "post": {
+ "operationId": "ai-suggest",
+ "tags": [
+ "ai"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "aiId": {
+ "type": "string"
+ },
+ "input": {
+ "type": "string"
+ },
+ "serverId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "aiId",
+ "input"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ai.deploy": {
+ "post": {
+ "operationId": "ai-deploy",
+ "tags": [
+ "ai"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "environmentId": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "dockerCompose": {
+ "type": "string"
+ },
+ "envVariables": {
+ "type": "string"
+ },
+ "serverId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string"
+ },
+ "port": {
+ "type": "number"
+ },
+ "serviceName": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "host",
+ "port",
+ "serviceName"
+ ]
+ }
+ },
+ "configFiles": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "filePath": {
+ "type": "string"
+ },
+ "content": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "filePath",
+ "content"
+ ]
+ }
+ }
+ },
+ "required": [
+ "environmentId",
+ "id",
+ "dockerCompose",
+ "envVariables",
+ "name",
+ "description"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/organization.create": {
+ "post": {
+ "operationId": "organization-create",
+ "tags": [
+ "organization"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "logo": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/organization.all": {
+ "get": {
+ "operationId": "organization-all",
+ "tags": [
+ "organization"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/organization.one": {
+ "get": {
+ "operationId": "organization-one",
+ "tags": [
+ "organization"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "organizationId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/organization.update": {
+ "post": {
+ "operationId": "organization-update",
+ "tags": [
+ "organization"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "organizationId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "logo": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "organizationId",
+ "name"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/organization.delete": {
+ "post": {
+ "operationId": "organization-delete",
+ "tags": [
+ "organization"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "organizationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/organization.allInvitations": {
+ "get": {
+ "operationId": "organization-allInvitations",
+ "tags": [
+ "organization"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/organization.removeInvitation": {
+ "post": {
+ "operationId": "organization-removeInvitation",
+ "tags": [
+ "organization"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "invitationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "invitationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/organization.updateMemberRole": {
+ "post": {
+ "operationId": "organization-updateMemberRole",
+ "tags": [
+ "organization"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "memberId": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string",
+ "enum": [
+ "admin",
+ "member"
+ ]
+ }
+ },
+ "required": [
+ "memberId",
+ "role"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/organization.setDefault": {
+ "post": {
+ "operationId": "organization-setDefault",
+ "tags": [
+ "organization"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "organizationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "organizationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/organization.active": {
+ "get": {
+ "operationId": "organization-active",
+ "tags": [
+ "organization"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/licenseKey.activate": {
+ "post": {
+ "operationId": "licenseKey-activate",
+ "tags": [
+ "licenseKey"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "licenseKey": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "licenseKey"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/licenseKey.validate": {
+ "post": {
+ "operationId": "licenseKey-validate",
+ "tags": [
+ "licenseKey"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/licenseKey.deactivate": {
+ "post": {
+ "operationId": "licenseKey-deactivate",
+ "tags": [
+ "licenseKey"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/licenseKey.getEnterpriseSettings": {
+ "get": {
+ "operationId": "licenseKey-getEnterpriseSettings",
+ "tags": [
+ "licenseKey"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/licenseKey.haveValidLicenseKey": {
+ "get": {
+ "operationId": "licenseKey-haveValidLicenseKey",
+ "tags": [
+ "licenseKey"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/licenseKey.updateEnterpriseSettings": {
+ "post": {
+ "operationId": "licenseKey-updateEnterpriseSettings",
+ "tags": [
+ "licenseKey"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "enableEnterpriseFeatures": {
+ "type": "boolean"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sso.showSignInWithSSO": {
+ "get": {
+ "operationId": "sso-showSignInWithSSO",
+ "tags": [
+ "sso"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sso.listProviders": {
+ "get": {
+ "operationId": "sso-listProviders",
+ "tags": [
+ "sso"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sso.getTrustedOrigins": {
+ "get": {
+ "operationId": "sso-getTrustedOrigins",
+ "tags": [
+ "sso"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sso.one": {
+ "get": {
+ "operationId": "sso-one",
+ "tags": [
+ "sso"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "providerId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sso.update": {
+ "post": {
+ "operationId": "sso-update",
+ "tags": [
+ "sso"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "providerId": {
+ "type": "string"
+ },
+ "issuer": {
+ "type": "string"
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "oidcConfig": {
+ "type": "object",
+ "properties": {
+ "clientId": {
+ "type": "string"
+ },
+ "clientSecret": {
+ "type": "string"
+ },
+ "authorizationEndpoint": {
+ "type": "string"
+ },
+ "tokenEndpoint": {
+ "type": "string"
+ },
+ "userInfoEndpoint": {
+ "type": "string"
+ },
+ "tokenEndpointAuthentication": {
+ "type": "string",
+ "enum": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ },
+ "jwksEndpoint": {
+ "type": "string"
+ },
+ "discoveryEndpoint": {
+ "type": "string"
+ },
+ "skipDiscovery": {
+ "type": "boolean"
+ },
+ "scopes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "pkce": {
+ "default": true,
+ "type": "boolean"
+ },
+ "mapping": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "emailVerified": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "extraFields": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": [
+ "id",
+ "email",
+ "name"
+ ]
+ }
+ },
+ "required": [
+ "clientId",
+ "clientSecret"
+ ]
+ },
+ "samlConfig": {
+ "type": "object",
+ "properties": {
+ "entryPoint": {
+ "type": "string"
+ },
+ "cert": {
+ "type": "string"
+ },
+ "callbackUrl": {
+ "type": "string"
+ },
+ "audience": {
+ "type": "string"
+ },
+ "idpMetadata": {
+ "type": "object",
+ "properties": {
+ "metadata": {
+ "type": "string"
+ },
+ "entityID": {
+ "type": "string"
+ },
+ "cert": {
+ "type": "string"
+ },
+ "privateKey": {
+ "type": "string"
+ },
+ "privateKeyPass": {
+ "type": "string"
+ },
+ "isAssertionEncrypted": {
+ "type": "boolean"
+ },
+ "encPrivateKey": {
+ "type": "string"
+ },
+ "encPrivateKeyPass": {
+ "type": "string"
+ },
+ "singleSignOnService": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Binding": {
+ "type": "string"
+ },
+ "Location": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Binding",
+ "Location"
+ ]
+ }
+ }
+ }
+ },
+ "spMetadata": {
+ "type": "object",
+ "properties": {
+ "metadata": {
+ "type": "string"
+ },
+ "entityID": {
+ "type": "string"
+ },
+ "binding": {
+ "type": "string"
+ },
+ "privateKey": {
+ "type": "string"
+ },
+ "privateKeyPass": {
+ "type": "string"
+ },
+ "isAssertionEncrypted": {
+ "type": "boolean"
+ },
+ "encPrivateKey": {
+ "type": "string"
+ },
+ "encPrivateKeyPass": {
+ "type": "string"
+ }
+ }
+ },
+ "wantAssertionsSigned": {
+ "type": "boolean"
+ },
+ "authnRequestsSigned": {
+ "type": "boolean"
+ },
+ "signatureAlgorithm": {
+ "type": "string"
+ },
+ "digestAlgorithm": {
+ "type": "string"
+ },
+ "identifierFormat": {
+ "type": "string"
+ },
+ "privateKey": {
+ "type": "string"
+ },
+ "decryptionPvk": {
+ "type": "string"
+ },
+ "additionalParams": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "mapping": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "emailVerified": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "firstName": {
+ "type": "string"
+ },
+ "lastName": {
+ "type": "string"
+ },
+ "extraFields": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": [
+ "id",
+ "email",
+ "name"
+ ]
+ }
+ },
+ "required": [
+ "entryPoint",
+ "cert",
+ "callbackUrl",
+ "spMetadata"
+ ]
+ },
+ "organizationId": {
+ "type": "string"
+ },
+ "overrideUserInfo": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "providerId",
+ "issuer",
+ "domains"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sso.deleteProvider": {
+ "post": {
+ "operationId": "sso-deleteProvider",
+ "tags": [
+ "sso"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "providerId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "providerId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sso.register": {
+ "post": {
+ "operationId": "sso-register",
+ "tags": [
+ "sso"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "providerId": {
+ "type": "string"
+ },
+ "issuer": {
+ "type": "string"
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "oidcConfig": {
+ "type": "object",
+ "properties": {
+ "clientId": {
+ "type": "string"
+ },
+ "clientSecret": {
+ "type": "string"
+ },
+ "authorizationEndpoint": {
+ "type": "string"
+ },
+ "tokenEndpoint": {
+ "type": "string"
+ },
+ "userInfoEndpoint": {
+ "type": "string"
+ },
+ "tokenEndpointAuthentication": {
+ "type": "string",
+ "enum": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ },
+ "jwksEndpoint": {
+ "type": "string"
+ },
+ "discoveryEndpoint": {
+ "type": "string"
+ },
+ "skipDiscovery": {
+ "type": "boolean"
+ },
+ "scopes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "pkce": {
+ "default": true,
+ "type": "boolean"
+ },
+ "mapping": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "emailVerified": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "extraFields": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": [
+ "id",
+ "email",
+ "name"
+ ]
+ }
+ },
+ "required": [
+ "clientId",
+ "clientSecret"
+ ]
+ },
+ "samlConfig": {
+ "type": "object",
+ "properties": {
+ "entryPoint": {
+ "type": "string"
+ },
+ "cert": {
+ "type": "string"
+ },
+ "callbackUrl": {
+ "type": "string"
+ },
+ "audience": {
+ "type": "string"
+ },
+ "idpMetadata": {
+ "type": "object",
+ "properties": {
+ "metadata": {
+ "type": "string"
+ },
+ "entityID": {
+ "type": "string"
+ },
+ "cert": {
+ "type": "string"
+ },
+ "privateKey": {
+ "type": "string"
+ },
+ "privateKeyPass": {
+ "type": "string"
+ },
+ "isAssertionEncrypted": {
+ "type": "boolean"
+ },
+ "encPrivateKey": {
+ "type": "string"
+ },
+ "encPrivateKeyPass": {
+ "type": "string"
+ },
+ "singleSignOnService": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "Binding": {
+ "type": "string"
+ },
+ "Location": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "Binding",
+ "Location"
+ ]
+ }
+ }
+ }
+ },
+ "spMetadata": {
+ "type": "object",
+ "properties": {
+ "metadata": {
+ "type": "string"
+ },
+ "entityID": {
+ "type": "string"
+ },
+ "binding": {
+ "type": "string"
+ },
+ "privateKey": {
+ "type": "string"
+ },
+ "privateKeyPass": {
+ "type": "string"
+ },
+ "isAssertionEncrypted": {
+ "type": "boolean"
+ },
+ "encPrivateKey": {
+ "type": "string"
+ },
+ "encPrivateKeyPass": {
+ "type": "string"
+ }
+ }
+ },
+ "wantAssertionsSigned": {
+ "type": "boolean"
+ },
+ "authnRequestsSigned": {
+ "type": "boolean"
+ },
+ "signatureAlgorithm": {
+ "type": "string"
+ },
+ "digestAlgorithm": {
+ "type": "string"
+ },
+ "identifierFormat": {
+ "type": "string"
+ },
+ "privateKey": {
+ "type": "string"
+ },
+ "decryptionPvk": {
+ "type": "string"
+ },
+ "additionalParams": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "mapping": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "emailVerified": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "firstName": {
+ "type": "string"
+ },
+ "lastName": {
+ "type": "string"
+ },
+ "extraFields": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": [
+ "id",
+ "email",
+ "name"
+ ]
+ }
+ },
+ "required": [
+ "entryPoint",
+ "cert",
+ "callbackUrl",
+ "spMetadata"
+ ]
+ },
+ "organizationId": {
+ "type": "string"
+ },
+ "overrideUserInfo": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "providerId",
+ "issuer",
+ "domains"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sso.addTrustedOrigin": {
+ "post": {
+ "operationId": "sso-addTrustedOrigin",
+ "tags": [
+ "sso"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "origin": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "origin"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sso.removeTrustedOrigin": {
+ "post": {
+ "operationId": "sso-removeTrustedOrigin",
+ "tags": [
+ "sso"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "origin": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "origin"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sso.updateTrustedOrigin": {
+ "post": {
+ "operationId": "sso-updateTrustedOrigin",
+ "tags": [
+ "sso"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "oldOrigin": {
+ "type": "string"
+ },
+ "newOrigin": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "oldOrigin",
+ "newOrigin"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/schedule.create": {
+ "post": {
+ "operationId": "schedule-create",
+ "tags": [
+ "schedule"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "scheduleId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "cronExpression": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "serviceName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "shellType": {
+ "type": "string",
+ "enum": [
+ "bash",
+ "sh"
+ ]
+ },
+ "scheduleType": {
+ "type": "string",
+ "enum": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "command": {
+ "type": "string"
+ },
+ "script": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "applicationId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "composeId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serverId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "userId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "timezone": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "createdAt": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "cronExpression",
+ "command"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/schedule.update": {
+ "post": {
+ "operationId": "schedule-update",
+ "tags": [
+ "schedule"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "scheduleId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "cronExpression": {
+ "type": "string"
+ },
+ "appName": {
+ "type": "string"
+ },
+ "serviceName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "shellType": {
+ "type": "string",
+ "enum": [
+ "bash",
+ "sh"
+ ]
+ },
+ "scheduleType": {
+ "type": "string",
+ "enum": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "command": {
+ "type": "string"
+ },
+ "script": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "applicationId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "composeId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "serverId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "userId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "timezone": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "createdAt": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "scheduleId",
+ "name",
+ "cronExpression",
+ "command"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/schedule.delete": {
+ "post": {
+ "operationId": "schedule-delete",
+ "tags": [
+ "schedule"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "scheduleId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "scheduleId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/schedule.list": {
+ "get": {
+ "operationId": "schedule-list",
+ "tags": [
+ "schedule"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "id",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "scheduleType",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/schedule.one": {
+ "get": {
+ "operationId": "schedule-one",
+ "tags": [
+ "schedule"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "scheduleId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/schedule.runManually": {
+ "post": {
+ "operationId": "schedule-runManually",
+ "tags": [
+ "schedule"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "scheduleId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "scheduleId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/rollback.delete": {
+ "post": {
+ "operationId": "rollback-delete",
+ "tags": [
+ "rollback"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "rollbackId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "rollbackId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/rollback.rollback": {
+ "post": {
+ "operationId": "rollback-rollback",
+ "tags": [
+ "rollback"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "rollbackId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "rollbackId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/volumeBackups.list": {
+ "get": {
+ "operationId": "volumeBackups-list",
+ "tags": [
+ "volumeBackups"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "id",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "volumeBackupType",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/volumeBackups.create": {
+ "post": {
+ "operationId": "volumeBackups-create",
+ "tags": [
+ "volumeBackups"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "volumeName": {
+ "type": "string"
+ },
+ "prefix": {
+ "type": "string"
+ },
+ "serviceType": {
+ "type": "string",
+ "enum": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "appName": {
+ "type": "string"
+ },
+ "serviceName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "turnOff": {
+ "type": "boolean"
+ },
+ "cronExpression": {
+ "type": "string"
+ },
+ "keepLatestCount": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "enabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "applicationId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "postgresId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "mariadbId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "mongoId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "mysqlId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "redisId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "composeId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "destinationId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "volumeName",
+ "prefix",
+ "cronExpression",
+ "destinationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/volumeBackups.one": {
+ "get": {
+ "operationId": "volumeBackups-one",
+ "tags": [
+ "volumeBackups"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "volumeBackupId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/volumeBackups.delete": {
+ "post": {
+ "operationId": "volumeBackups-delete",
+ "tags": [
+ "volumeBackups"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "volumeBackupId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "volumeBackupId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/volumeBackups.update": {
+ "post": {
+ "operationId": "volumeBackups-update",
+ "tags": [
+ "volumeBackups"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "volumeName": {
+ "type": "string"
+ },
+ "prefix": {
+ "type": "string"
+ },
+ "serviceType": {
+ "type": "string",
+ "enum": [
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose"
+ ]
+ },
+ "appName": {
+ "type": "string"
+ },
+ "serviceName": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "turnOff": {
+ "type": "boolean"
+ },
+ "cronExpression": {
+ "type": "string"
+ },
+ "keepLatestCount": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "enabled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "applicationId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "postgresId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "mariadbId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "mongoId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "mysqlId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "redisId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "composeId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "destinationId": {
+ "type": "string"
+ },
+ "volumeBackupId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "volumeName",
+ "prefix",
+ "cronExpression",
+ "destinationId",
+ "volumeBackupId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/volumeBackups.runManually": {
+ "post": {
+ "operationId": "volumeBackups-runManually",
+ "tags": [
+ "volumeBackups"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "volumeBackupId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "volumeBackupId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/environment.create": {
+ "post": {
+ "operationId": "environment-create",
+ "tags": [
+ "environment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "projectId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "projectId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/environment.one": {
+ "get": {
+ "operationId": "environment-one",
+ "tags": [
+ "environment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "environmentId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/environment.byProjectId": {
+ "get": {
+ "operationId": "environment-byProjectId",
+ "tags": [
+ "environment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "projectId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/environment.remove": {
+ "post": {
+ "operationId": "environment-remove",
+ "tags": [
+ "environment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "environmentId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "environmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/environment.update": {
+ "post": {
+ "operationId": "environment-update",
+ "tags": [
+ "environment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "environmentId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "projectId": {
+ "type": "string"
+ },
+ "env": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "environmentId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/environment.duplicate": {
+ "post": {
+ "operationId": "environment-duplicate",
+ "tags": [
+ "environment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "environmentId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "environmentId",
+ "name"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/environment.search": {
+ "get": {
+ "operationId": "environment-search",
+ "tags": [
+ "environment"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "q",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "name",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "description",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "projectId",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 20,
+ "type": "number"
+ }
+ },
+ {
+ "in": "query",
+ "name": "offset",
+ "schema": {
+ "default": 0,
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/patch.create": {
+ "post": {
+ "operationId": "patch-create",
+ "tags": [
+ "patch"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "filePath": {
+ "type": "string"
+ },
+ "content": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "create",
+ "update",
+ "delete"
+ ]
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "applicationId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "composeId": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "filePath",
+ "content"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/patch.one": {
+ "get": {
+ "operationId": "patch-one",
+ "tags": [
+ "patch"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "patchId",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/patch.byEntityId": {
+ "get": {
+ "operationId": "patch-byEntityId",
+ "tags": [
+ "patch"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "id",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "application",
+ "compose"
+ ]
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/patch.update": {
+ "post": {
+ "operationId": "patch-update",
+ "tags": [
+ "patch"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "patchId": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "create",
+ "update",
+ "delete"
+ ]
+ },
+ "filePath": {
+ "type": "string"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "content": {
+ "type": "string"
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "updatedAt": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "patchId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/patch.delete": {
+ "post": {
+ "operationId": "patch-delete",
+ "tags": [
+ "patch"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "patchId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "patchId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/patch.toggleEnabled": {
+ "post": {
+ "operationId": "patch-toggleEnabled",
+ "tags": [
+ "patch"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "patchId": {
+ "type": "string"
+ },
+ "enabled": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "patchId",
+ "enabled"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/patch.ensureRepo": {
+ "post": {
+ "operationId": "patch-ensureRepo",
+ "tags": [
+ "patch"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "application",
+ "compose"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "type"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/patch.readRepoDirectories": {
+ "get": {
+ "operationId": "patch-readRepoDirectories",
+ "tags": [
+ "patch"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "id",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "application",
+ "compose"
+ ]
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "repoPath",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/patch.readRepoFile": {
+ "get": {
+ "operationId": "patch-readRepoFile",
+ "tags": [
+ "patch"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "id",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "application",
+ "compose"
+ ]
+ },
+ "required": true
+ },
+ {
+ "in": "query",
+ "name": "filePath",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.NOT_FOUND"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/patch.saveFileAsPatch": {
+ "post": {
+ "operationId": "patch-saveFileAsPatch",
+ "tags": [
+ "patch"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "application",
+ "compose"
+ ]
+ },
+ "filePath": {
+ "type": "string"
+ },
+ "content": {
+ "type": "string"
+ },
+ "patchType": {
+ "default": "update",
+ "type": "string",
+ "enum": [
+ "create",
+ "update"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "filePath",
+ "content"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/patch.markFileForDeletion": {
+ "post": {
+ "operationId": "patch-markFileForDeletion",
+ "tags": [
+ "patch"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "application",
+ "compose"
+ ]
+ },
+ "filePath": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "filePath"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/patch.cleanPatchRepos": {
+ "post": {
+ "operationId": "patch-cleanPatchRepos",
+ "tags": [
+ "patch"
+ ],
+ "security": [
+ {
+ "Authorization": []
+ }
+ ],
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "serverId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {},
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid input data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.BAD_REQUEST"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authorization not provided",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.UNAUTHORIZED"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Insufficient access",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.FORBIDDEN"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "error.BAD_REQUEST": {
+ "title": "Invalid input data error (400)",
+ "description": "The error information",
+ "example": {
+ "code": "BAD_REQUEST",
+ "message": "Invalid input data",
+ "issues": []
+ },
+ "type": "object",
+ "properties": {
+ "message": {
+ "description": "The error message",
+ "example": "Invalid input data",
+ "type": "string"
+ },
+ "code": {
+ "description": "The error code",
+ "example": "BAD_REQUEST",
+ "type": "string"
+ },
+ "issues": {
+ "description": "An array of issues that were responsible for the error",
+ "example": [],
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "required": [
+ "message",
+ "code"
+ ],
+ "additionalProperties": false
+ },
+ "error.UNAUTHORIZED": {
+ "title": "Authorization not provided error (401)",
+ "description": "The error information",
+ "example": {
+ "code": "UNAUTHORIZED",
+ "message": "Authorization not provided",
+ "issues": []
+ },
+ "type": "object",
+ "properties": {
+ "message": {
+ "description": "The error message",
+ "example": "Authorization not provided",
+ "type": "string"
+ },
+ "code": {
+ "description": "The error code",
+ "example": "UNAUTHORIZED",
+ "type": "string"
+ },
+ "issues": {
+ "description": "An array of issues that were responsible for the error",
+ "example": [],
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "required": [
+ "message",
+ "code"
+ ],
+ "additionalProperties": false
+ },
+ "error.FORBIDDEN": {
+ "title": "Insufficient access error (403)",
+ "description": "The error information",
+ "example": {
+ "code": "FORBIDDEN",
+ "message": "Insufficient access",
+ "issues": []
+ },
+ "type": "object",
+ "properties": {
+ "message": {
+ "description": "The error message",
+ "example": "Insufficient access",
+ "type": "string"
+ },
+ "code": {
+ "description": "The error code",
+ "example": "FORBIDDEN",
+ "type": "string"
+ },
+ "issues": {
+ "description": "An array of issues that were responsible for the error",
+ "example": [],
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "required": [
+ "message",
+ "code"
+ ],
+ "additionalProperties": false
+ },
+ "error.INTERNAL_SERVER_ERROR": {
+ "title": "Internal server error error (500)",
+ "description": "The error information",
+ "example": {
+ "code": "INTERNAL_SERVER_ERROR",
+ "message": "Internal server error",
+ "issues": []
+ },
+ "type": "object",
+ "properties": {
+ "message": {
+ "description": "The error message",
+ "example": "Internal server error",
+ "type": "string"
+ },
+ "code": {
+ "description": "The error code",
+ "example": "INTERNAL_SERVER_ERROR",
+ "type": "string"
+ },
+ "issues": {
+ "description": "An array of issues that were responsible for the error",
+ "example": [],
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "required": [
+ "message",
+ "code"
+ ],
+ "additionalProperties": false
+ },
+ "error.NOT_FOUND": {
+ "title": "Not found error (404)",
+ "description": "The error information",
+ "example": {
+ "code": "NOT_FOUND",
+ "message": "Not found",
+ "issues": []
+ },
+ "type": "object",
+ "properties": {
+ "message": {
+ "description": "The error message",
+ "example": "Not found",
+ "type": "string"
+ },
+ "code": {
+ "description": "The error code",
+ "example": "NOT_FOUND",
+ "type": "string"
+ },
+ "issues": {
+ "description": "An array of issues that were responsible for the error",
+ "example": [],
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
+ "required": [
+ "message",
+ "code"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "securitySchemes": {
+ "apiKey": {
+ "type": "apiKey",
+ "in": "header",
+ "name": "x-api-key",
+ "description": "API key authentication. Generate an API key from your Dokploy dashboard under Settings > API Keys."
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKey": []
+ }
+ ]
}
diff --git a/package.json b/package.json
index c1db8893b..8e0141a7b 100644
--- a/package.json
+++ b/package.json
@@ -24,15 +24,15 @@
},
"devDependencies": {
"@biomejs/biome": "2.1.1",
- "@types/node": "^20.16.0",
+ "@types/node": "^24.4.0",
"dotenv": "16.4.5",
"esbuild": "0.20.2",
"lint-staged": "^15.5.2",
"tsx": "4.16.2"
},
- "packageManager": "pnpm@9.12.0",
+ "packageManager": "pnpm@10.22.0",
"engines": {
- "node": "^20.16.0",
+ "node": "^24.4.0",
"pnpm": ">=9.12.0"
},
"lint-staged": {
@@ -43,5 +43,28 @@
"resolutions": {
"@types/react": "18.3.5",
"@types/react-dom": "18.3.0"
+ },
+ "pnpm": {
+ "overrides": {
+ "esbuild": "0.20.2"
+ },
+ "onlyBuiltDependencies": [
+ "@scarf/scarf",
+ "@tree-sitter-grammars/tree-sitter-yaml",
+ "bcrypt",
+ "better-sqlite3",
+ "core-js-pure",
+ "cpu-features",
+ "esbuild",
+ "msgpackr-extract",
+ "node-pty",
+ "protobufjs",
+ "sharp",
+ "ssh2",
+ "tree-sitter",
+ "tree-sitter-json",
+ "@prisma/engines",
+ "prisma"
+ ]
}
}
diff --git a/packages/server/auth-schema2.ts b/packages/server/auth-schema2.ts
index 671c4ab7a..9c163c820 100644
--- a/packages/server/auth-schema2.ts
+++ b/packages/server/auth-schema2.ts
@@ -1,274 +1,299 @@
-// import { relations } from "drizzle-orm";
-// import {
-// pgTable,
-// text,
-// timestamp,
-// boolean,
-// integer,
-// index,
-// uniqueIndex,
-// } from "drizzle-orm/pg-core";
+import { relations } from "drizzle-orm";
+import {
+ pgTable,
+ text,
+ timestamp,
+ boolean,
+ integer,
+ index,
+ uniqueIndex,
+} from "drizzle-orm/pg-core";
-// export const user = pgTable("user", {
-// id: text("id").primaryKey(),
-// firstName: text("first_name").notNull(),
-// email: text("email").notNull().unique(),
-// emailVerified: boolean("email_verified").default(false).notNull(),
-// image: text("image"),
-// createdAt: timestamp("created_at").defaultNow().notNull(),
-// updatedAt: timestamp("updated_at")
-// .defaultNow()
-// .$onUpdate(() => /* @__PURE__ */ new Date())
-// .notNull(),
-// twoFactorEnabled: boolean("two_factor_enabled").default(false),
-// role: text("role"),
-// ownerId: text("owner_id"),
-// allowImpersonation: boolean("allow_impersonation").default(false),
-// lastName: text("last_name").default(""),
-// });
+export const user = pgTable("user", {
+ id: text("id").primaryKey(),
+ firstName: text("first_name").notNull(),
+ email: text("email").notNull().unique(),
+ emailVerified: boolean("email_verified").default(false).notNull(),
+ image: text("image"),
+ createdAt: timestamp("created_at").defaultNow().notNull(),
+ updatedAt: timestamp("updated_at")
+ .defaultNow()
+ .$onUpdate(() => /* @__PURE__ */ new Date())
+ .notNull(),
+ twoFactorEnabled: boolean("two_factor_enabled").default(false),
+ role: text("role"),
+ ownerId: text("owner_id"),
+ allowImpersonation: boolean("allow_impersonation").default(false),
+ lastName: text("last_name").default(""),
+ enableEnterpriseFeatures: boolean("enable_enterprise_features"),
+ isValidEnterpriseLicense: boolean("is_valid_enterprise_license"),
+});
-// export const session = pgTable(
-// "session",
-// {
-// id: text("id").primaryKey(),
-// expiresAt: timestamp("expires_at").notNull(),
-// token: text("token").notNull().unique(),
-// createdAt: timestamp("created_at").defaultNow().notNull(),
-// updatedAt: timestamp("updated_at")
-// .$onUpdate(() => /* @__PURE__ */ new Date())
-// .notNull(),
-// ipAddress: text("ip_address"),
-// userAgent: text("user_agent"),
-// userId: text("user_id")
-// .notNull()
-// .references(() => user.id, { onDelete: "cascade" }),
-// activeOrganizationId: text("active_organization_id"),
-// },
-// (table) => [index("session_userId_idx").on(table.userId)],
-// );
+export const session = pgTable(
+ "session",
+ {
+ id: text("id").primaryKey(),
+ expiresAt: timestamp("expires_at").notNull(),
+ token: text("token").notNull().unique(),
+ createdAt: timestamp("created_at").defaultNow().notNull(),
+ updatedAt: timestamp("updated_at")
+ .$onUpdate(() => /* @__PURE__ */ new Date())
+ .notNull(),
+ ipAddress: text("ip_address"),
+ userAgent: text("user_agent"),
+ userId: text("user_id")
+ .notNull()
+ .references(() => user.id, { onDelete: "cascade" }),
+ activeOrganizationId: text("active_organization_id"),
+ },
+ (table) => [index("session_userId_idx").on(table.userId)],
+);
-// export const account = pgTable(
-// "account",
-// {
-// id: text("id").primaryKey(),
-// accountId: text("account_id").notNull(),
-// providerId: text("provider_id").notNull(),
-// userId: text("user_id")
-// .notNull()
-// .references(() => user.id, { onDelete: "cascade" }),
-// accessToken: text("access_token"),
-// refreshToken: text("refresh_token"),
-// idToken: text("id_token"),
-// accessTokenExpiresAt: timestamp("access_token_expires_at"),
-// refreshTokenExpiresAt: timestamp("refresh_token_expires_at"),
-// scope: text("scope"),
-// password: text("password"),
-// createdAt: timestamp("created_at").defaultNow().notNull(),
-// updatedAt: timestamp("updated_at")
-// .$onUpdate(() => /* @__PURE__ */ new Date())
-// .notNull(),
-// },
-// (table) => [index("account_userId_idx").on(table.userId)],
-// );
+export const account = pgTable(
+ "account",
+ {
+ id: text("id").primaryKey(),
+ accountId: text("account_id").notNull(),
+ providerId: text("provider_id").notNull(),
+ userId: text("user_id")
+ .notNull()
+ .references(() => user.id, { onDelete: "cascade" }),
+ accessToken: text("access_token"),
+ refreshToken: text("refresh_token"),
+ idToken: text("id_token"),
+ accessTokenExpiresAt: timestamp("access_token_expires_at"),
+ refreshTokenExpiresAt: timestamp("refresh_token_expires_at"),
+ scope: text("scope"),
+ password: text("password"),
+ createdAt: timestamp("created_at").defaultNow().notNull(),
+ updatedAt: timestamp("updated_at")
+ .$onUpdate(() => /* @__PURE__ */ new Date())
+ .notNull(),
+ },
+ (table) => [index("account_userId_idx").on(table.userId)],
+);
-// export const verification = pgTable(
-// "verification",
-// {
-// id: text("id").primaryKey(),
-// identifier: text("identifier").notNull(),
-// value: text("value").notNull(),
-// expiresAt: timestamp("expires_at").notNull(),
-// createdAt: timestamp("created_at").defaultNow().notNull(),
-// updatedAt: timestamp("updated_at")
-// .defaultNow()
-// .$onUpdate(() => /* @__PURE__ */ new Date())
-// .notNull(),
-// },
-// (table) => [index("verification_identifier_idx").on(table.identifier)],
-// );
+export const verification = pgTable(
+ "verification",
+ {
+ id: text("id").primaryKey(),
+ identifier: text("identifier").notNull(),
+ value: text("value").notNull(),
+ expiresAt: timestamp("expires_at").notNull(),
+ createdAt: timestamp("created_at").defaultNow().notNull(),
+ updatedAt: timestamp("updated_at")
+ .defaultNow()
+ .$onUpdate(() => /* @__PURE__ */ new Date())
+ .notNull(),
+ },
+ (table) => [index("verification_identifier_idx").on(table.identifier)],
+);
-// export const apikey = pgTable(
-// "apikey",
-// {
-// id: text("id").primaryKey(),
-// name: text("name"),
-// start: text("start"),
-// prefix: text("prefix"),
-// key: text("key").notNull(),
-// userId: text("user_id")
-// .notNull()
-// .references(() => user.id, { onDelete: "cascade" }),
-// refillInterval: integer("refill_interval"),
-// refillAmount: integer("refill_amount"),
-// lastRefillAt: timestamp("last_refill_at"),
-// enabled: boolean("enabled").default(true),
-// rateLimitEnabled: boolean("rate_limit_enabled").default(true),
-// rateLimitTimeWindow: integer("rate_limit_time_window").default(86400000),
-// rateLimitMax: integer("rate_limit_max").default(10),
-// requestCount: integer("request_count").default(0),
-// remaining: integer("remaining"),
-// lastRequest: timestamp("last_request"),
-// expiresAt: timestamp("expires_at"),
-// createdAt: timestamp("created_at").notNull(),
-// updatedAt: timestamp("updated_at").notNull(),
-// permissions: text("permissions"),
-// metadata: text("metadata"),
-// },
-// (table) => [
-// index("apikey_key_idx").on(table.key),
-// index("apikey_userId_idx").on(table.userId),
-// ],
-// );
+export const apikey = pgTable(
+ "apikey",
+ {
+ id: text("id").primaryKey(),
+ configId: text("config_id").default("default").notNull(),
+ name: text("name"),
+ start: text("start"),
+ referenceId: text("reference_id").notNull(),
+ prefix: text("prefix"),
+ key: text("key").notNull(),
+ refillInterval: integer("refill_interval"),
+ refillAmount: integer("refill_amount"),
+ lastRefillAt: timestamp("last_refill_at"),
+ enabled: boolean("enabled").default(true),
+ rateLimitEnabled: boolean("rate_limit_enabled").default(true),
+ rateLimitTimeWindow: integer("rate_limit_time_window").default(86400000),
+ rateLimitMax: integer("rate_limit_max").default(10),
+ requestCount: integer("request_count").default(0),
+ remaining: integer("remaining"),
+ lastRequest: timestamp("last_request"),
+ expiresAt: timestamp("expires_at"),
+ createdAt: timestamp("created_at").notNull(),
+ updatedAt: timestamp("updated_at").notNull(),
+ permissions: text("permissions"),
+ metadata: text("metadata"),
+ },
+ (table) => [
+ index("apikey_configId_idx").on(table.configId),
+ index("apikey_referenceId_idx").on(table.referenceId),
+ index("apikey_key_idx").on(table.key),
+ ],
+);
-// export const ssoProvider = pgTable("sso_provider", {
-// id: text("id").primaryKey(),
-// issuer: text("issuer").notNull(),
-// oidcConfig: text("oidc_config"),
-// samlConfig: text("saml_config"),
-// userId: text("user_id").references(() => user.id, { onDelete: "cascade" }),
-// providerId: text("provider_id").notNull().unique(),
-// organizationId: text("organization_id"),
-// domain: text("domain").notNull(),
-// });
+export const ssoProvider = pgTable("sso_provider", {
+ id: text("id").primaryKey(),
+ issuer: text("issuer").notNull(),
+ oidcConfig: text("oidc_config"),
+ samlConfig: text("saml_config"),
+ userId: text("user_id").references(() => user.id, { onDelete: "cascade" }),
+ providerId: text("provider_id").notNull().unique(),
+ organizationId: text("organization_id"),
+ domain: text("domain").notNull(),
+});
-// export const twoFactor = pgTable(
-// "two_factor",
-// {
-// id: text("id").primaryKey(),
-// secret: text("secret").notNull(),
-// backupCodes: text("backup_codes").notNull(),
-// userId: text("user_id")
-// .notNull()
-// .references(() => user.id, { onDelete: "cascade" }),
-// },
-// (table) => [
-// index("twoFactor_secret_idx").on(table.secret),
-// index("twoFactor_userId_idx").on(table.userId),
-// ],
-// );
+export const twoFactor = pgTable(
+ "two_factor",
+ {
+ id: text("id").primaryKey(),
+ secret: text("secret").notNull(),
+ backupCodes: text("backup_codes").notNull(),
+ userId: text("user_id")
+ .notNull()
+ .references(() => user.id, { onDelete: "cascade" }),
+ },
+ (table) => [
+ index("twoFactor_secret_idx").on(table.secret),
+ index("twoFactor_userId_idx").on(table.userId),
+ ],
+);
-// export const organization = pgTable(
-// "organization",
-// {
-// id: text("id").primaryKey(),
-// name: text("name").notNull(),
-// slug: text("slug").notNull().unique(),
-// logo: text("logo"),
-// createdAt: timestamp("created_at").notNull(),
-// metadata: text("metadata"),
-// },
-// (table) => [uniqueIndex("organization_slug_uidx").on(table.slug)],
-// );
+export const organization = pgTable(
+ "organization",
+ {
+ id: text("id").primaryKey(),
+ name: text("name").notNull(),
+ slug: text("slug").notNull().unique(),
+ logo: text("logo"),
+ createdAt: timestamp("created_at").notNull(),
+ metadata: text("metadata"),
+ },
+ (table) => [uniqueIndex("organization_slug_uidx").on(table.slug)],
+);
-// export const member = pgTable(
-// "member",
-// {
-// id: text("id").primaryKey(),
-// organizationId: text("organization_id")
-// .notNull()
-// .references(() => organization.id, { onDelete: "cascade" }),
-// userId: text("user_id")
-// .notNull()
-// .references(() => user.id, { onDelete: "cascade" }),
-// role: text("role").default("member").notNull(),
-// createdAt: timestamp("created_at").notNull(),
-// },
-// (table) => [
-// index("member_organizationId_idx").on(table.organizationId),
-// index("member_userId_idx").on(table.userId),
-// ],
-// );
+export const organizationRole = pgTable(
+ "organization_role",
+ {
+ id: text("id").primaryKey(),
+ organizationId: text("organization_id")
+ .notNull()
+ .references(() => organization.id, { onDelete: "cascade" }),
+ role: text("role").notNull(),
+ permission: text("permission").notNull(),
+ createdAt: timestamp("created_at").defaultNow().notNull(),
+ updatedAt: timestamp("updated_at").$onUpdate(
+ () => /* @__PURE__ */ new Date(),
+ ),
+ },
+ (table) => [
+ index("organizationRole_organizationId_idx").on(table.organizationId),
+ index("organizationRole_role_idx").on(table.role),
+ ],
+);
-// export const invitation = pgTable(
-// "invitation",
-// {
-// id: text("id").primaryKey(),
-// organizationId: text("organization_id")
-// .notNull()
-// .references(() => organization.id, { onDelete: "cascade" }),
-// email: text("email").notNull(),
-// role: text("role"),
-// status: text("status").default("pending").notNull(),
-// expiresAt: timestamp("expires_at").notNull(),
-// createdAt: timestamp("created_at").defaultNow().notNull(),
-// inviterId: text("inviter_id")
-// .notNull()
-// .references(() => user.id, { onDelete: "cascade" }),
-// },
-// (table) => [
-// index("invitation_organizationId_idx").on(table.organizationId),
-// index("invitation_email_idx").on(table.email),
-// ],
-// );
+export const member = pgTable(
+ "member",
+ {
+ id: text("id").primaryKey(),
+ organizationId: text("organization_id")
+ .notNull()
+ .references(() => organization.id, { onDelete: "cascade" }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => user.id, { onDelete: "cascade" }),
+ role: text("role").default("member").notNull(),
+ createdAt: timestamp("created_at").notNull(),
+ },
+ (table) => [
+ index("member_organizationId_idx").on(table.organizationId),
+ index("member_userId_idx").on(table.userId),
+ ],
+);
-// export const userRelations = relations(user, ({ many }) => ({
-// sessions: many(session),
-// accounts: many(account),
-// apikeys: many(apikey),
-// ssoProviders: many(ssoProvider),
-// twoFactors: many(twoFactor),
-// members: many(member),
-// invitations: many(invitation),
-// }));
+export const invitation = pgTable(
+ "invitation",
+ {
+ id: text("id").primaryKey(),
+ organizationId: text("organization_id")
+ .notNull()
+ .references(() => organization.id, { onDelete: "cascade" }),
+ email: text("email").notNull(),
+ role: text("role"),
+ status: text("status").default("pending").notNull(),
+ expiresAt: timestamp("expires_at").notNull(),
+ createdAt: timestamp("created_at").defaultNow().notNull(),
+ inviterId: text("inviter_id")
+ .notNull()
+ .references(() => user.id, { onDelete: "cascade" }),
+ },
+ (table) => [
+ index("invitation_organizationId_idx").on(table.organizationId),
+ index("invitation_email_idx").on(table.email),
+ ],
+);
-// export const sessionRelations = relations(session, ({ one }) => ({
-// user: one(user, {
-// fields: [session.userId],
-// references: [user.id],
-// }),
-// }));
+export const userRelations = relations(user, ({ many }) => ({
+ sessions: many(session),
+ accounts: many(account),
+ ssoProviders: many(ssoProvider),
+ twoFactors: many(twoFactor),
+ members: many(member),
+ invitations: many(invitation),
+}));
-// export const accountRelations = relations(account, ({ one }) => ({
-// user: one(user, {
-// fields: [account.userId],
-// references: [user.id],
-// }),
-// }));
+export const sessionRelations = relations(session, ({ one }) => ({
+ user: one(user, {
+ fields: [session.userId],
+ references: [user.id],
+ }),
+}));
-// export const apikeyRelations = relations(apikey, ({ one }) => ({
-// user: one(user, {
-// fields: [apikey.userId],
-// references: [user.id],
-// }),
-// }));
+export const accountRelations = relations(account, ({ one }) => ({
+ user: one(user, {
+ fields: [account.userId],
+ references: [user.id],
+ }),
+}));
-// export const ssoProviderRelations = relations(ssoProvider, ({ one }) => ({
-// user: one(user, {
-// fields: [ssoProvider.userId],
-// references: [user.id],
-// }),
-// }));
+export const ssoProviderRelations = relations(ssoProvider, ({ one }) => ({
+ user: one(user, {
+ fields: [ssoProvider.userId],
+ references: [user.id],
+ }),
+}));
-// export const twoFactorRelations = relations(twoFactor, ({ one }) => ({
-// user: one(user, {
-// fields: [twoFactor.userId],
-// references: [user.id],
-// }),
-// }));
+export const twoFactorRelations = relations(twoFactor, ({ one }) => ({
+ user: one(user, {
+ fields: [twoFactor.userId],
+ references: [user.id],
+ }),
+}));
-// export const organizationRelations = relations(organization, ({ many }) => ({
-// members: many(member),
-// invitations: many(invitation),
-// }));
+export const organizationRelations = relations(organization, ({ many }) => ({
+ organizationRoles: many(organizationRole),
+ members: many(member),
+ invitations: many(invitation),
+}));
-// export const memberRelations = relations(member, ({ one }) => ({
-// organization: one(organization, {
-// fields: [member.organizationId],
-// references: [organization.id],
-// }),
-// user: one(user, {
-// fields: [member.userId],
-// references: [user.id],
-// }),
-// }));
+export const organizationRoleRelations = relations(
+ organizationRole,
+ ({ one }) => ({
+ organization: one(organization, {
+ fields: [organizationRole.organizationId],
+ references: [organization.id],
+ }),
+ }),
+);
-// export const invitationRelations = relations(invitation, ({ one }) => ({
-// organization: one(organization, {
-// fields: [invitation.organizationId],
-// references: [organization.id],
-// }),
-// user: one(user, {
-// fields: [invitation.inviterId],
-// references: [user.id],
-// }),
-// }));
+export const memberRelations = relations(member, ({ one }) => ({
+ organization: one(organization, {
+ fields: [member.organizationId],
+ references: [organization.id],
+ }),
+ user: one(user, {
+ fields: [member.userId],
+ references: [user.id],
+ }),
+}));
+
+export const invitationRelations = relations(invitation, ({ one }) => ({
+ organization: one(organization, {
+ fields: [invitation.organizationId],
+ references: [organization.id],
+ }),
+ user: one(user, {
+ fields: [invitation.inviterId],
+ references: [user.id],
+ }),
+}));
diff --git a/packages/server/package.json b/packages/server/package.json
index bf7a43ab3..7fe2eaba0 100644
--- a/packages/server/package.json
+++ b/packages/server/package.json
@@ -19,47 +19,48 @@
}
},
"scripts": {
- "build": "npm run switch:prod && rm -rf ./dist && tsc --project tsconfig.server.json && tsc-alias -p tsconfig.server.json",
+ "build": "npm run switch:prod && rimraf dist && tsc --project tsconfig.server.json && tsc-alias -p tsconfig.server.json",
"build:types": "tsc --emitDeclarationOnly --experimenta-dts",
"switch:dev": "node scripts/switchToSrc.js",
"switch:prod": "node scripts/switchToDist.js",
- "dev": "rm -rf ./dist && pnpm esbuild && tsc --emitDeclarationOnly --outDir dist -p tsconfig.server.json",
+ "dev": "rimraf dist && pnpm esbuild && tsc --emitDeclarationOnly --outDir dist -p tsconfig.server.json",
"esbuild": "tsx ./esbuild.config.ts && tsc --project tsconfig.server.json --emitDeclarationOnly ",
"typecheck": "tsc --noEmit",
"dbml:generate": "npx tsx src/db/schema/dbml.ts",
- "generate:drizzle": "pnpm dlx @better-auth/cli generate --output auth-schema2.ts --config src/lib/auth.ts"
+ "generate:drizzle": "pnpm dlx @better-auth/cli generate --output auth-schema2.ts --config src/lib/auth-cli.ts"
},
"dependencies": {
- "@ai-sdk/anthropic": "^2.0.5",
- "@ai-sdk/azure": "^2.0.16",
- "@ai-sdk/cohere": "^2.0.4",
- "@ai-sdk/deepinfra": "^1.0.10",
- "@ai-sdk/mistral": "^2.0.7",
- "@ai-sdk/openai": "^2.0.16",
- "@ai-sdk/openai-compatible": "^1.0.10",
- "@better-auth/utils": "0.3.0",
+ "@ai-sdk/anthropic": "^3.0.44",
+ "@ai-sdk/azure": "^3.0.30",
+ "@ai-sdk/cohere": "^3.0.21",
+ "@ai-sdk/deepinfra": "^2.0.34",
+ "@ai-sdk/mistral": "^3.0.20",
+ "@ai-sdk/openai": "^3.0.29",
+ "@ai-sdk/openai-compatible": "^2.0.30",
+ "@better-auth/api-key": "1.5.4",
+ "@better-auth/sso": "1.5.4",
+ "@better-auth/utils": "0.3.1",
"@faker-js/faker": "^8.4.1",
"@octokit/auth-app": "^6.1.3",
"@octokit/rest": "^20.1.2",
"@oslojs/crypto": "1.0.1",
"@oslojs/encoding": "1.1.0",
"@react-email/components": "^0.0.21",
- "@better-auth/sso":"1.4.18",
- "@trpc/server": "^10.45.2",
+ "@trpc/server": "11.10.0",
"adm-zip": "^0.5.16",
- "ai": "^5.0.17",
- "ai-sdk-ollama": "^0.5.1",
+ "ai": "^6.0.86",
+ "ai-sdk-ollama": "^3.7.0",
"bcrypt": "5.1.1",
- "better-auth": "1.4.18",
+ "better-auth": "1.5.4",
+ "better-call": "2.0.2",
"bl": "6.0.11",
"boxen": "^7.1.1",
"date-fns": "3.6.0",
"dockerode": "4.0.2",
"dotenv": "16.4.5",
"drizzle-dbml-generator": "0.10.0",
- "drizzle-orm": "^0.41.0",
+ "drizzle-orm": "0.45.1",
"drizzle-zod": "0.5.1",
- "yaml": "2.8.1",
"lodash": "4.17.21",
"micromatch": "4.0.8",
"nanoid": "3.3.11",
@@ -76,28 +77,29 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"resend": "^6.0.2",
+ "semver": "7.7.3",
"shell-quote": "^1.8.1",
"slugify": "^1.6.6",
"ssh2": "1.15.0",
"toml": "3.0.0",
"ws": "8.16.0",
- "zod": "^3.25.32",
- "semver": "7.7.3"
+ "yaml": "2.8.1",
+ "zod": "^4.3.6"
},
"devDependencies": {
- "@better-auth/cli": "1.4.18",
- "@types/semver": "7.7.1",
+ "@better-auth/cli": "1.4.21",
"@types/adm-zip": "^0.5.7",
"@types/bcrypt": "5.0.2",
"@types/dockerode": "3.3.23",
"@types/lodash": "4.17.4",
"@types/micromatch": "4.0.9",
- "@types/node": "^20.16.0",
+ "@types/node": "^24.4.0",
"@types/node-schedule": "2.1.6",
"@types/nodemailer": "^6.4.17",
"@types/qrcode": "^1.5.5",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
+ "@types/semver": "7.7.1",
"@types/shell-quote": "^1.7.5",
"@types/ssh2": "1.15.1",
"@types/ws": "8.5.10",
@@ -105,14 +107,15 @@
"esbuild": "0.20.2",
"esbuild-plugin-alias": "0.2.1",
"postcss": "^8.5.3",
+ "rimraf": "6.1.3",
"tailwindcss": "^3.4.17",
"tsc-alias": "1.8.10",
"tsx": "^4.16.2",
"typescript": "^5.8.3"
},
- "packageManager": "pnpm@9.12.0",
+ "packageManager": "pnpm@10.22.0",
"engines": {
- "node": "^20.16.0",
- "pnpm": ">=9.12.0"
+ "node": "^24.4.0",
+ "pnpm": ">=10.22.0"
}
-}
+}
\ No newline at end of file
diff --git a/packages/server/src/constants/index.ts b/packages/server/src/constants/index.ts
index de0e48a2e..903e02ae1 100644
--- a/packages/server/src/constants/index.ts
+++ b/packages/server/src/constants/index.ts
@@ -2,8 +2,25 @@ import path from "node:path";
import Docker from "dockerode";
export const IS_CLOUD = process.env.IS_CLOUD === "true";
+export const DOKPLOY_DOCKER_API_VERSION =
+ process.env.DOKPLOY_DOCKER_API_VERSION;
+export const DOKPLOY_DOCKER_HOST = process.env.DOKPLOY_DOCKER_HOST;
+export const DOKPLOY_DOCKER_PORT = process.env.DOKPLOY_DOCKER_PORT
+ ? Number(process.env.DOKPLOY_DOCKER_PORT)
+ : undefined;
+
export const CLEANUP_CRON_JOB = "50 23 * * *";
-export const docker = new Docker();
+export const docker = new Docker({
+ ...(DOKPLOY_DOCKER_API_VERSION && {
+ version: DOKPLOY_DOCKER_API_VERSION,
+ }),
+ ...(DOKPLOY_DOCKER_HOST && {
+ host: DOKPLOY_DOCKER_HOST,
+ }),
+ ...(DOKPLOY_DOCKER_PORT && {
+ port: DOKPLOY_DOCKER_PORT,
+ }),
+});
// When not set, use the legacy default so 2FA remains working for users who
// enabled it before BETTER_AUTH_SECRET was introduced .
@@ -32,5 +49,6 @@ export const paths = (isServer = false) => {
SCHEDULES_PATH: `${BASE_PATH}/schedules`,
VOLUME_BACKUPS_PATH: `${BASE_PATH}/volume-backups`,
VOLUME_BACKUP_LOCK_PATH: `${BASE_PATH}/volume-backup-lock`,
+ PATCH_REPOS_PATH: `${BASE_PATH}/patch-repos`,
};
};
diff --git a/packages/server/src/db/index.ts b/packages/server/src/db/index.ts
index e17002de9..0dad31fd1 100644
--- a/packages/server/src/db/index.ts
+++ b/packages/server/src/db/index.ts
@@ -1,24 +1,40 @@
+import { and, eq } from "drizzle-orm";
import { drizzle, type PostgresJsDatabase } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import { dbUrl } from "./constants";
import * as schema from "./schema";
-declare global {
- var db: PostgresJsDatabase | undefined;
-}
+export { and, eq };
+export * from "./schema";
+
+type Database = PostgresJsDatabase;
+
+/**
+ * Evita problemas de redeclaración global en monorepos.
+ * No usamos `declare global`.
+ */
+const globalForDb = globalThis as unknown as {
+ db?: Database;
+};
+
+let dbConnection: Database;
-export let db: PostgresJsDatabase;
if (process.env.NODE_ENV === "production") {
- db = drizzle(postgres(dbUrl), {
+ // En producción no usamos global cache
+ dbConnection = drizzle(postgres(dbUrl), {
schema,
});
} else {
- if (!global.db)
- global.db = drizzle(postgres(dbUrl), {
+ // En desarrollo reutilizamos conexión para evitar múltiples conexiones
+ if (!globalForDb.db) {
+ globalForDb.db = drizzle(postgres(dbUrl), {
schema,
});
+ }
- db = global.db;
+ dbConnection = globalForDb.db;
}
+export const db: Database = dbConnection;
+
export { dbUrl };
diff --git a/packages/server/src/db/schema/account.ts b/packages/server/src/db/schema/account.ts
index 6814613e5..db31b9964 100644
--- a/packages/server/src/db/schema/account.ts
+++ b/packages/server/src/db/schema/account.ts
@@ -1,6 +1,7 @@
import { relations, sql } from "drizzle-orm";
import {
boolean,
+ index,
integer,
pgTable,
text,
@@ -69,6 +70,36 @@ export const organization = pgTable("organization", {
.references(() => user.id, { onDelete: "cascade" }),
});
+export const organizationRole = pgTable(
+ "organization_role",
+ {
+ id: text("id")
+ .primaryKey()
+ .$defaultFn(() => nanoid()),
+ organizationId: text("organization_id")
+ .notNull()
+ .references(() => organization.id, { onDelete: "cascade" }),
+ role: text("role").notNull(),
+ permission: text("permission").notNull(),
+ createdAt: timestamp("created_at").defaultNow().notNull(),
+ updatedAt: timestamp("updated_at").$onUpdate(() => new Date()),
+ },
+ (table) => [
+ index("organizationRole_organizationId_idx").on(table.organizationId),
+ index("organizationRole_role_idx").on(table.role),
+ ],
+);
+
+export const organizationRoleRelations = relations(
+ organizationRole,
+ ({ one }) => ({
+ organization: one(organization, {
+ fields: [organizationRole.organizationId],
+ references: [organization.id],
+ }),
+ }),
+);
+
export const organizationRelations = relations(
organization,
({ one, many }) => ({
@@ -80,6 +111,7 @@ export const organizationRelations = relations(
projects: many(projects),
members: many(member),
ssoProviders: many(ssoProvider),
+ roles: many(organizationRole),
}),
);
@@ -93,7 +125,9 @@ export const member = pgTable("member", {
userId: text("user_id")
.notNull()
.references(() => user.id, { onDelete: "cascade" }),
- role: text("role").notNull().$type<"owner" | "member" | "admin">(),
+ role: text("role")
+ .notNull()
+ .$type<"owner" | "member" | "admin" | (string & {})>(),
createdAt: timestamp("created_at").notNull(),
teamId: text("team_id"),
isDefault: boolean("is_default").notNull().default(false),
@@ -148,7 +182,7 @@ export const invitation = pgTable("invitation", {
.notNull()
.references(() => organization.id, { onDelete: "cascade" }),
email: text("email").notNull(),
- role: text("role").$type<"owner" | "member" | "admin">(),
+ role: text("role").$type<"owner" | "member" | "admin" | (string & {})>(),
status: text("status").notNull(),
expiresAt: timestamp("expires_at").notNull(),
inviterId: text("inviter_id")
@@ -180,7 +214,8 @@ export const apikey = pgTable("apikey", {
start: text("start"),
prefix: text("prefix"),
key: text("key").notNull(),
- userId: text("user_id")
+ configId: text("config_id").default("default").notNull(),
+ referenceId: text("reference_id")
.notNull()
.references(() => user.id, { onDelete: "cascade" }),
refillInterval: integer("refill_interval"),
@@ -202,7 +237,7 @@ export const apikey = pgTable("apikey", {
export const apikeyRelations = relations(apikey, ({ one }) => ({
user: one(user, {
- fields: [apikey.userId],
+ fields: [apikey.referenceId],
references: [user.id],
}),
}));
diff --git a/packages/server/src/db/schema/application.ts b/packages/server/src/db/schema/application.ts
index 3d912654c..c469ac788 100644
--- a/packages/server/src/db/schema/application.ts
+++ b/packages/server/src/db/schema/application.ts
@@ -19,6 +19,7 @@ import { gitea } from "./gitea";
import { github } from "./github";
import { gitlab } from "./gitlab";
import { mounts } from "./mount";
+import { patch } from "./patch";
import { ports } from "./port";
import { previewDeployments } from "./preview-deployments";
import { redirects } from "./redirects";
@@ -158,7 +159,7 @@ export const applications = pgTable("application", {
},
),
enableSubmodules: boolean("enableSubmodules").notNull().default(false),
- dockerfile: text("dockerfile"),
+ dockerfile: text("dockerfile").default("Dockerfile"),
dockerContextPath: text("dockerContextPath"),
dockerBuildStage: text("dockerBuildStage"),
// Drop
@@ -286,6 +287,7 @@ export const applicationsRelations = relations(
references: [registry.registryId],
relationName: "applicationRollbackRegistry",
}),
+ patches: many(patch),
}),
);
@@ -329,6 +331,7 @@ const createSchema = createInsertSchema(applications, {
sourceType: z
.enum(["github", "docker", "git", "gitlab", "bitbucket", "gitea", "drop"])
.optional(),
+ triggerType: z.enum(["push", "tag"]).optional(),
applicationStatus: z.enum(["idle", "running", "done", "error"]),
buildType: z.enum([
"dockerfile",
@@ -362,12 +365,13 @@ const createSchema = createInsertSchema(applications, {
previewPath: z.string().optional(),
previewCertificateType: z.enum(["letsencrypt", "none", "custom"]).optional(),
previewRequireCollaboratorPermissions: z.boolean().optional(),
- watchPaths: z.array(z.string()).optional(),
+ watchPaths: z.array(z.string()).optional().optional(),
previewLabels: z.array(z.string()).optional(),
cleanCache: z.boolean().optional(),
stopGracePeriodSwarm: z.bigint().nullable(),
endpointSpecSwarm: EndpointSpecSwarmSchema.nullable(),
ulimitsSwarm: UlimitsSwarmSchema.nullable(),
+ enableSubmodules: z.boolean().optional(),
});
export const apiCreateApplication = createSchema.pick({
@@ -378,11 +382,9 @@ export const apiCreateApplication = createSchema.pick({
serverId: true,
});
-export const apiFindOneApplication = createSchema
- .pick({
- applicationId: true,
- })
- .required();
+export const apiFindOneApplication = z.object({
+ applicationId: z.string().min(1),
+});
export const apiDeployApplication = createSchema
.pick({
@@ -432,13 +434,13 @@ export const apiSaveGithubProvider = createSchema
owner: true,
buildPath: true,
githubId: true,
- watchPaths: true,
- enableSubmodules: true,
})
.required()
.extend({
triggerType: z.enum(["push", "tag"]).default("push"),
- });
+ })
+ .required()
+ .merge(createSchema.pick({ enableSubmodules: true, watchPaths: true }));
export const apiSaveGitlabProvider = createSchema
.pick({
@@ -450,10 +452,9 @@ export const apiSaveGitlabProvider = createSchema
gitlabId: true,
gitlabProjectId: true,
gitlabPathNamespace: true,
- watchPaths: true,
- enableSubmodules: true,
})
- .required();
+ .required()
+ .merge(createSchema.pick({ enableSubmodules: true, watchPaths: true }));
export const apiSaveBitbucketProvider = createSchema
.pick({
@@ -464,10 +465,9 @@ export const apiSaveBitbucketProvider = createSchema
bitbucketRepositorySlug: true,
bitbucketId: true,
applicationId: true,
- watchPaths: true,
- enableSubmodules: true,
})
- .required();
+ .required()
+ .merge(createSchema.pick({ enableSubmodules: true, watchPaths: true }));
export const apiSaveGiteaProvider = createSchema
.pick({
@@ -477,10 +477,9 @@ export const apiSaveGiteaProvider = createSchema
giteaOwner: true,
giteaRepository: true,
giteaId: true,
- watchPaths: true,
- enableSubmodules: true,
})
- .required();
+ .required()
+ .merge(createSchema.pick({ enableSubmodules: true, watchPaths: true }));
export const apiSaveDockerProvider = createSchema
.pick({
@@ -505,6 +504,7 @@ export const apiSaveGitProvider = createSchema
.merge(
createSchema.pick({
customGitSSHKeyId: true,
+ enableSubmodules: true,
}),
);
@@ -518,11 +518,9 @@ export const apiSaveEnvironmentVariables = createSchema
})
.required();
-export const apiFindMonitoringStats = createSchema
- .pick({
- appName: true,
- })
- .required();
+export const apiFindMonitoringStats = z.object({
+ appName: z.string().min(1),
+});
export const apiUpdateApplication = createSchema
.partial()
diff --git a/packages/server/src/db/schema/audit-log.ts b/packages/server/src/db/schema/audit-log.ts
new file mode 100644
index 000000000..2b08bde63
--- /dev/null
+++ b/packages/server/src/db/schema/audit-log.ts
@@ -0,0 +1,94 @@
+import { relations } from "drizzle-orm";
+import { index, pgTable, text, timestamp } from "drizzle-orm/pg-core";
+import { nanoid } from "nanoid";
+import { organization } from "./account";
+import { user } from "./user";
+
+export const auditLog = pgTable(
+ "audit_log",
+ {
+ id: text("id")
+ .primaryKey()
+ .$defaultFn(() => nanoid()),
+ organizationId: text("organization_id").references(() => organization.id, {
+ onDelete: "set null",
+ }),
+ userId: text("user_id").references(() => user.id, { onDelete: "set null" }),
+ userEmail: text("user_email").notNull(),
+ userRole: text("user_role").notNull(),
+ action: text("action").notNull(),
+ resourceType: text("resource_type").notNull(),
+ resourceId: text("resource_id"),
+ resourceName: text("resource_name"),
+ metadata: text("metadata"),
+ createdAt: timestamp("created_at").defaultNow().notNull(),
+ },
+ (t) => ({
+ orgIdx: index("auditLog_organizationId_idx").on(t.organizationId),
+ userIdx: index("auditLog_userId_idx").on(t.userId),
+ createdAtIdx: index("auditLog_createdAt_idx").on(t.createdAt),
+ }),
+);
+
+export const auditLogRelations = relations(auditLog, ({ one }) => ({
+ organization: one(organization, {
+ fields: [auditLog.organizationId],
+ references: [organization.id],
+ }),
+ user: one(user, {
+ fields: [auditLog.userId],
+ references: [user.id],
+ }),
+}));
+
+export type AuditLog = typeof auditLog.$inferSelect;
+export type NewAuditLog = typeof auditLog.$inferInsert;
+
+export type AuditAction =
+ | "create"
+ | "update"
+ | "delete"
+ | "deploy"
+ | "cancel"
+ | "redeploy"
+ | "login"
+ | "logout"
+ | "restore"
+ | "run"
+ | "start"
+ | "stop"
+ | "reload"
+ | "rebuild"
+ | "move";
+
+export type AuditResourceType =
+ | "project"
+ | "service"
+ | "environment"
+ | "deployment"
+ | "user"
+ | "customRole"
+ | "domain"
+ | "certificate"
+ | "registry"
+ | "server"
+ | "sshKey"
+ | "gitProvider"
+ | "destination"
+ | "notification"
+ | "settings"
+ | "session"
+ | "port"
+ | "redirect"
+ | "security"
+ | "schedule"
+ | "backup"
+ | "volumeBackup"
+ | "docker"
+ | "swarm"
+ | "previewDeployment"
+ | "organization"
+ | "cluster"
+ | "mount"
+ | "application"
+ | "compose";
diff --git a/packages/server/src/db/schema/backups.ts b/packages/server/src/db/schema/backups.ts
index 9b4881924..02c298ad6 100644
--- a/packages/server/src/db/schema/backups.ts
+++ b/packages/server/src/db/schema/backups.ts
@@ -165,11 +165,9 @@ export const apiCreateBackup = createSchema.pick({
metadata: true,
});
-export const apiFindOneBackup = createSchema
- .pick({
- backupId: true,
- })
- .required();
+export const apiFindOneBackup = z.object({
+ backupId: z.string().min(1),
+});
export const apiRemoveBackup = createSchema
.pick({
diff --git a/packages/server/src/db/schema/compose.ts b/packages/server/src/db/schema/compose.ts
index 02bd60f0b..531449bfa 100644
--- a/packages/server/src/db/schema/compose.ts
+++ b/packages/server/src/db/schema/compose.ts
@@ -12,6 +12,7 @@ import { gitea } from "./gitea";
import { github } from "./github";
import { gitlab } from "./gitlab";
import { mounts } from "./mount";
+import { patch } from "./patch";
import { schedules } from "./schedule";
import { server } from "./server";
import { applicationStatus, triggerType } from "./shared";
@@ -143,6 +144,7 @@ export const composeRelations = relations(compose, ({ one, many }) => ({
}),
backups: many(backups),
schedules: many(schedules),
+ patches: many(patch),
}));
const createSchema = createInsertSchema(compose, {
@@ -162,6 +164,11 @@ const createSchema = createInsertSchema(compose, {
composePath: z.string().min(1),
composeType: z.enum(["docker-compose", "stack"]).optional(),
watchPaths: z.array(z.string()).optional(),
+ sourceType: z
+ .enum(["git", "github", "gitlab", "bitbucket", "gitea", "raw"])
+ .optional(),
+ triggerType: z.enum(["push", "tag"]).optional(),
+ composeStatus: z.enum(["idle", "running", "done", "error"]).optional(),
});
export const apiCreateCompose = createSchema.pick({
diff --git a/packages/server/src/db/schema/deployment.ts b/packages/server/src/db/schema/deployment.ts
index b950703c8..0c1b547e0 100644
--- a/packages/server/src/db/schema/deployment.ts
+++ b/packages/server/src/db/schema/deployment.ts
@@ -126,7 +126,6 @@ const schema = createInsertSchema(deployments, {
previewDeploymentId: z.string(),
buildServerId: z.string(),
});
-
export const apiCreateDeployment = schema
.pick({
title: true,
@@ -210,44 +209,27 @@ export const apiCreateDeploymentVolumeBackup = schema
volumeBackupId: z.string().min(1),
});
-export const apiFindAllByApplication = schema
- .pick({
- applicationId: true,
- })
- .extend({
- applicationId: z.string().min(1),
- })
- .required();
+export const apiFindAllByApplication = z.object({
+ applicationId: z.string().min(1),
+});
-export const apiFindAllByCompose = schema
- .pick({
- composeId: true,
- })
- .extend({
- composeId: z.string().min(1),
- })
- .required();
+export const apiFindAllByCompose = z.object({
+ composeId: z.string().min(1),
+});
-export const apiFindAllByServer = schema
- .pick({
- serverId: true,
- })
- .extend({
- serverId: z.string().min(1),
- })
- .required();
+export const apiFindAllByServer = z.object({
+ serverId: z.string().min(1),
+});
-export const apiFindAllByType = z
- .object({
- id: z.string().min(1),
- type: z.enum([
- "application",
- "compose",
- "server",
- "schedule",
- "previewDeployment",
- "backup",
- "volumeBackup",
- ]),
- })
- .required();
+export const apiFindAllByType = z.object({
+ id: z.string().min(1),
+ type: z.enum([
+ "application",
+ "compose",
+ "server",
+ "schedule",
+ "previewDeployment",
+ "backup",
+ "volumeBackup",
+ ]),
+});
diff --git a/packages/server/src/db/schema/destination.ts b/packages/server/src/db/schema/destination.ts
index d1442a9a9..8e51aef91 100644
--- a/packages/server/src/db/schema/destination.ts
+++ b/packages/server/src/db/schema/destination.ts
@@ -61,11 +61,9 @@ export const apiCreateDestination = createSchema
serverId: z.string().optional(),
});
-export const apiFindOneDestination = createSchema
- .pick({
- destinationId: true,
- })
- .required();
+export const apiFindOneDestination = z.object({
+ destinationId: z.string().min(1),
+});
export const apiRemoveDestination = createSchema
.pick({
diff --git a/packages/server/src/db/schema/domain.ts b/packages/server/src/db/schema/domain.ts
index 81d56b4d2..369ff6db0 100644
--- a/packages/server/src/db/schema/domain.ts
+++ b/packages/server/src/db/schema/domain.ts
@@ -70,7 +70,11 @@ export const domainsRelations = relations(domains, ({ one }) => ({
}),
}));
-const createSchema = createInsertSchema(domains, domain._def.schema.shape);
+const createSchema = createInsertSchema(domains, {
+ ...domain.shape,
+ // Override pgEnum so Zod 4 infers only string literals, not numeric enum index
+ domainType: z.enum(["compose", "application", "preview"]).optional(),
+});
export const apiCreateDomain = createSchema.pick({
host: true,
@@ -88,11 +92,9 @@ export const apiCreateDomain = createSchema.pick({
stripPath: true,
});
-export const apiFindDomain = createSchema
- .pick({
- domainId: true,
- })
- .required();
+export const apiFindDomain = z.object({
+ domainId: z.string().min(1),
+});
export const apiFindDomainByApplication = createSchema.pick({
applicationId: true,
diff --git a/packages/server/src/db/schema/environment.ts b/packages/server/src/db/schema/environment.ts
index add3d8657..342fb1708 100644
--- a/packages/server/src/db/schema/environment.ts
+++ b/packages/server/src/db/schema/environment.ts
@@ -1,6 +1,5 @@
import { relations } from "drizzle-orm";
import { boolean, pgTable, text } from "drizzle-orm/pg-core";
-import { createInsertSchema } from "drizzle-zod";
import { nanoid } from "nanoid";
import { z } from "zod";
import { applications } from "./application";
@@ -46,46 +45,30 @@ export const environmentRelations = relations(
}),
);
-const createSchema = createInsertSchema(environments, {
+export const apiCreateEnvironment = z.object({
+ name: z.string().min(1),
+ description: z.string().optional(),
+ projectId: z.string().min(1),
+});
+
+export const apiFindOneEnvironment = z.object({
+ environmentId: z.string().min(1),
+});
+
+export const apiRemoveEnvironment = z.object({
+ environmentId: z.string().min(1),
+});
+
+export const apiUpdateEnvironment = z.object({
+ environmentId: z.string().min(1),
+ name: z.string().min(1).optional(),
+ description: z.string().optional(),
+ projectId: z.string().optional(),
+ env: z.string().optional(),
+});
+
+export const apiDuplicateEnvironment = z.object({
environmentId: z.string().min(1),
name: z.string().min(1),
description: z.string().optional(),
});
-
-export const apiCreateEnvironment = createSchema.pick({
- name: true,
- description: true,
- projectId: true,
-});
-
-export const apiFindOneEnvironment = createSchema
- .pick({
- environmentId: true,
- })
- .required();
-
-export const apiRemoveEnvironment = createSchema
- .pick({
- environmentId: true,
- })
- .required();
-
-export const apiUpdateEnvironment = createSchema
- .partial()
- .extend({
- environmentId: z.string().min(1),
- })
- .omit({
- isDefault: true,
- });
-
-export const apiDuplicateEnvironment = createSchema
- .pick({
- environmentId: true,
- name: true,
- description: true,
- })
- .required({
- environmentId: true,
- name: true,
- });
diff --git a/packages/server/src/db/schema/git-provider.ts b/packages/server/src/db/schema/git-provider.ts
index 3d2c7027c..74dd5cd94 100644
--- a/packages/server/src/db/schema/git-provider.ts
+++ b/packages/server/src/db/schema/git-provider.ts
@@ -1,6 +1,5 @@
import { relations } from "drizzle-orm";
import { pgEnum, pgTable, text } from "drizzle-orm/pg-core";
-import { createInsertSchema } from "drizzle-zod";
import { nanoid } from "nanoid";
import { z } from "zod";
import { organization } from "./account";
@@ -62,10 +61,6 @@ export const gitProviderRelations = relations(gitProvider, ({ one }) => ({
}),
}));
-const createSchema = createInsertSchema(gitProvider);
-
-export const apiRemoveGitProvider = createSchema
- .extend({
- gitProviderId: z.string().min(1),
- })
- .pick({ gitProviderId: true });
+export const apiRemoveGitProvider = z.object({
+ gitProviderId: z.string().min(1),
+});
diff --git a/packages/server/src/db/schema/github.ts b/packages/server/src/db/schema/github.ts
index fb8a267a7..b943b9945 100644
--- a/packages/server/src/db/schema/github.ts
+++ b/packages/server/src/db/schema/github.ts
@@ -1,6 +1,5 @@
import { relations } from "drizzle-orm";
import { integer, pgTable, text } from "drizzle-orm/pg-core";
-import { createInsertSchema } from "drizzle-zod";
import { nanoid } from "nanoid";
import { z } from "zod";
import { gitProvider } from "./git-provider";
@@ -29,8 +28,7 @@ export const githubProviderRelations = relations(github, ({ one }) => ({
}),
}));
-const createSchema = createInsertSchema(github);
-export const apiCreateGithub = createSchema.extend({
+export const apiCreateGithub = z.object({
githubAppName: z.string().optional(),
githubAppId: z.number().optional(),
githubClientId: z.string().optional(),
@@ -48,13 +46,11 @@ export const apiFindGithubBranches = z.object({
githubId: z.string().optional(),
});
-export const apiFindOneGithub = createSchema
- .extend({
- githubId: z.string().min(1),
- })
- .pick({ githubId: true });
+export const apiFindOneGithub = z.object({
+ githubId: z.string().min(1),
+});
-export const apiUpdateGithub = createSchema.extend({
+export const apiUpdateGithub = z.object({
githubId: z.string().min(1),
name: z.string().min(1),
gitProviderId: z.string().min(1),
diff --git a/packages/server/src/db/schema/gitlab.ts b/packages/server/src/db/schema/gitlab.ts
index 0d2bc8a0d..0c19e50a5 100644
--- a/packages/server/src/db/schema/gitlab.ts
+++ b/packages/server/src/db/schema/gitlab.ts
@@ -1,6 +1,5 @@
import { relations } from "drizzle-orm";
import { integer, pgTable, text } from "drizzle-orm/pg-core";
-import { createInsertSchema } from "drizzle-zod";
import { nanoid } from "nanoid";
import { z } from "zod";
import { gitProvider } from "./git-provider";
@@ -31,9 +30,7 @@ export const gitlabProviderRelations = relations(gitlab, ({ one }) => ({
}),
}));
-const createSchema = createInsertSchema(gitlab);
-
-export const apiCreateGitlab = createSchema.extend({
+export const apiCreateGitlab = z.object({
applicationId: z.string().optional(),
secret: z.string().optional(),
groupName: z.string().optional(),
@@ -45,17 +42,14 @@ export const apiCreateGitlab = createSchema.extend({
gitlabInternalUrl: z.string().optional().nullable(),
});
-export const apiFindOneGitlab = createSchema
- .extend({
- gitlabId: z.string().min(1),
- })
- .pick({ gitlabId: true });
+export const apiFindOneGitlab = z.object({
+ gitlabId: z.string().min(1),
+});
-export const apiGitlabTestConnection = createSchema
- .extend({
- groupName: z.string().optional(),
- })
- .pick({ gitlabId: true, groupName: true });
+export const apiGitlabTestConnection = z.object({
+ gitlabId: z.string().min(1),
+ groupName: z.string().optional(),
+});
export const apiFindGitlabBranches = z.object({
id: z.number().optional(),
@@ -64,7 +58,7 @@ export const apiFindGitlabBranches = z.object({
gitlabId: z.string().optional(),
});
-export const apiUpdateGitlab = createSchema.extend({
+export const apiUpdateGitlab = z.object({
applicationId: z.string().optional(),
secret: z.string().optional(),
groupName: z.string().optional(),
@@ -72,5 +66,6 @@ export const apiUpdateGitlab = createSchema.extend({
name: z.string().min(1),
gitlabId: z.string().min(1),
gitlabUrl: z.string().min(1),
+ gitProviderId: z.string().min(1),
gitlabInternalUrl: z.string().optional().nullable(),
});
diff --git a/packages/server/src/db/schema/index.ts b/packages/server/src/db/schema/index.ts
index 7d976feca..f44079773 100644
--- a/packages/server/src/db/schema/index.ts
+++ b/packages/server/src/db/schema/index.ts
@@ -1,5 +1,6 @@
export * from "./account";
export * from "./ai";
+export * from "./audit-log";
export * from "./application";
export * from "./backups";
export * from "./bitbucket";
@@ -18,6 +19,7 @@ export * from "./mongo";
export * from "./mount";
export * from "./mysql";
export * from "./notification";
+export * from "./patch";
export * from "./port";
export * from "./postgres";
export * from "./preview-deployments";
diff --git a/packages/server/src/db/schema/mariadb.ts b/packages/server/src/db/schema/mariadb.ts
index a2dbaa989..2659c2978 100644
--- a/packages/server/src/db/schema/mariadb.ts
+++ b/packages/server/src/db/schema/mariadb.ts
@@ -160,11 +160,9 @@ export const apiCreateMariaDB = createSchema.pick({
serverId: true,
});
-export const apiFindOneMariaDB = createSchema
- .pick({
- mariadbId: true,
- })
- .required();
+export const apiFindOneMariaDB = z.object({
+ mariadbId: z.string().min(1),
+});
export const apiChangeMariaDBStatus = createSchema
.pick({
@@ -204,6 +202,7 @@ export const apiUpdateMariaDB = createSchema
.partial()
.extend({
mariadbId: z.string().min(1),
+ dockerImage: z.string().optional(),
})
.omit({ serverId: true });
diff --git a/packages/server/src/db/schema/mongo.ts b/packages/server/src/db/schema/mongo.ts
index 5349823da..4599cedb2 100644
--- a/packages/server/src/db/schema/mongo.ts
+++ b/packages/server/src/db/schema/mongo.ts
@@ -156,11 +156,9 @@ export const apiCreateMongo = createSchema.pick({
replicaSets: true,
});
-export const apiFindOneMongo = createSchema
- .pick({
- mongoId: true,
- })
- .required();
+export const apiFindOneMongo = z.object({
+ mongoId: z.string().min(1),
+});
export const apiChangeMongoStatus = createSchema
.pick({
@@ -193,6 +191,7 @@ export const apiUpdateMongo = createSchema
.partial()
.extend({
mongoId: z.string().min(1),
+ dockerImage: z.string().optional(),
})
.omit({ serverId: true });
diff --git a/packages/server/src/db/schema/mount.ts b/packages/server/src/db/schema/mount.ts
index 299f39caf..d64ded63c 100644
--- a/packages/server/src/db/schema/mount.ts
+++ b/packages/server/src/db/schema/mount.ts
@@ -99,17 +99,15 @@ const createSchema = createInsertSchema(mounts, {
mountPath: z.string().min(1),
mountId: z.string().optional(),
filePath: z.string().optional(),
- serviceType: z
- .enum([
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose",
- ])
- .default("application"),
+ serviceType: z.enum([
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose",
+ ]),
});
export type ServiceType = NonNullable<
@@ -130,11 +128,9 @@ export const apiCreateMount = createSchema
serviceId: z.string().min(1),
});
-export const apiFindOneMount = createSchema
- .pick({
- mountId: true,
- })
- .required();
+export const apiFindOneMount = z.object({
+ mountId: z.string().min(1),
+});
export const apiRemoveMount = createSchema
.pick({
@@ -148,12 +144,20 @@ export const apiRemoveMount = createSchema
export const apiFindMountByApplicationId = createSchema
.extend({
serviceId: z.string().min(1),
+ serviceType: z.enum([
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose",
+ ]),
})
.pick({
serviceId: true,
serviceType: true,
- })
- .required();
+ });
export const apiUpdateMount = createSchema.partial().extend({
mountId: z.string().min(1),
diff --git a/packages/server/src/db/schema/mysql.ts b/packages/server/src/db/schema/mysql.ts
index 3f6e424b7..90b38e6fa 100644
--- a/packages/server/src/db/schema/mysql.ts
+++ b/packages/server/src/db/schema/mysql.ts
@@ -157,11 +157,9 @@ export const apiCreateMySql = createSchema.pick({
serverId: true,
});
-export const apiFindOneMySql = createSchema
- .pick({
- mysqlId: true,
- })
- .required();
+export const apiFindOneMySql = z.object({
+ mysqlId: z.string().min(1),
+});
export const apiChangeMySqlStatus = createSchema
.pick({
@@ -201,6 +199,7 @@ export const apiUpdateMySql = createSchema
.partial()
.extend({
mysqlId: z.string().min(1),
+ dockerImage: z.string().optional(),
})
.omit({ serverId: true });
diff --git a/packages/server/src/db/schema/notification.ts b/packages/server/src/db/schema/notification.ts
index 73af358d0..df486097e 100644
--- a/packages/server/src/db/schema/notification.ts
+++ b/packages/server/src/db/schema/notification.ts
@@ -23,6 +23,7 @@ export const notificationType = pgEnum("notificationType", [
"pushover",
"custom",
"lark",
+ "teams",
]);
export const notifications = pgTable("notification", {
@@ -72,6 +73,9 @@ export const notifications = pgTable("notification", {
pushoverId: text("pushoverId").references(() => pushover.pushoverId, {
onDelete: "cascade",
}),
+ teamsId: text("teamsId").references(() => teams.teamsId, {
+ onDelete: "cascade",
+ }),
organizationId: text("organizationId")
.notNull()
.references(() => organization.id, { onDelete: "cascade" }),
@@ -179,6 +183,14 @@ export const pushover = pgTable("pushover", {
expire: integer("expire"),
});
+export const teams = pgTable("teams", {
+ teamsId: text("teamsId")
+ .notNull()
+ .primaryKey()
+ .$defaultFn(() => nanoid()),
+ webhookUrl: text("webhookUrl").notNull(),
+});
+
export const notificationsRelations = relations(notifications, ({ one }) => ({
slack: one(slack, {
fields: [notifications.slackId],
@@ -220,6 +232,10 @@ export const notificationsRelations = relations(notifications, ({ one }) => ({
fields: [notifications.pushoverId],
references: [pushover.pushoverId],
}),
+ teams: one(teams, {
+ fields: [notifications.teamsId],
+ references: [teams.teamsId],
+ }),
organization: one(organization, {
fields: [notifications.organizationId],
references: [organization.id],
@@ -448,11 +464,9 @@ export const apiTestNtfyConnection = apiCreateNtfy.pick({
priority: true,
});
-export const apiFindOneNotification = notificationsSchema
- .pick({
- notificationId: true,
- })
- .required();
+export const apiFindOneNotification = z.object({
+ notificationId: z.string().min(1),
+});
export const apiCreateCustom = notificationsSchema
.pick({
@@ -467,7 +481,7 @@ export const apiCreateCustom = notificationsSchema
})
.extend({
endpoint: z.string().min(1),
- headers: z.record(z.string()).optional(),
+ headers: z.record(z.string(), z.string()).optional(),
});
export const apiUpdateCustom = apiCreateCustom.partial().extend({
@@ -478,7 +492,7 @@ export const apiUpdateCustom = apiCreateCustom.partial().extend({
export const apiTestCustomConnection = z.object({
endpoint: z.string().min(1),
- headers: z.record(z.string()).optional(),
+ headers: z.record(z.string(), z.string()).optional(),
});
export const apiCreateLark = notificationsSchema
@@ -507,6 +521,32 @@ export const apiTestLarkConnection = apiCreateLark.pick({
webhookUrl: true,
});
+export const apiCreateTeams = notificationsSchema
+ .pick({
+ appBuildError: true,
+ databaseBackup: true,
+ volumeBackup: true,
+ dokployRestart: true,
+ name: true,
+ appDeploy: true,
+ dockerCleanup: true,
+ serverThreshold: true,
+ })
+ .extend({
+ webhookUrl: z.string().min(1),
+ })
+ .required();
+
+export const apiUpdateTeams = apiCreateTeams.partial().extend({
+ notificationId: z.string().min(1),
+ teamsId: z.string().min(1),
+ organizationId: z.string().optional(),
+});
+
+export const apiTestTeamsConnection = apiCreateTeams.pick({
+ webhookUrl: true,
+});
+
export const apiCreatePushover = notificationsSchema
.pick({
appBuildError: true,
diff --git a/packages/server/src/db/schema/patch.ts b/packages/server/src/db/schema/patch.ts
new file mode 100644
index 000000000..c4fc1abd2
--- /dev/null
+++ b/packages/server/src/db/schema/patch.ts
@@ -0,0 +1,100 @@
+import { relations } from "drizzle-orm";
+import { boolean, pgEnum, pgTable, text, unique } from "drizzle-orm/pg-core";
+import { createInsertSchema } from "drizzle-zod";
+import { nanoid } from "nanoid";
+import { z } from "zod";
+import { applications } from "./application";
+import { compose } from "./compose";
+
+export const patchType = pgEnum("patchType", ["create", "update", "delete"]);
+
+export const patch = pgTable(
+ "patch",
+ {
+ patchId: text("patchId")
+ .notNull()
+ .primaryKey()
+ .$defaultFn(() => nanoid()),
+ type: patchType("type").notNull().default("update"),
+ filePath: text("filePath").notNull(),
+ enabled: boolean("enabled").notNull().default(true),
+ content: text("content").notNull(),
+ createdAt: text("createdAt")
+ .notNull()
+ .$defaultFn(() => new Date().toISOString()),
+ updatedAt: text("updatedAt").$defaultFn(() => new Date().toISOString()),
+ // Relations - one of these must be set
+ applicationId: text("applicationId").references(
+ () => applications.applicationId,
+ { onDelete: "cascade" },
+ ),
+ composeId: text("composeId").references(() => compose.composeId, {
+ onDelete: "cascade",
+ }),
+ },
+ (table) => [
+ // Unique constraint: one patch per file per application/compose
+ unique("patch_filepath_application_unique").on(
+ table.filePath,
+ table.applicationId,
+ ),
+ unique("patch_filepath_compose_unique").on(table.filePath, table.composeId),
+ ],
+);
+
+export const patchRelations = relations(patch, ({ one }) => ({
+ application: one(applications, {
+ fields: [patch.applicationId],
+ references: [applications.applicationId],
+ }),
+ compose: one(compose, {
+ fields: [patch.composeId],
+ references: [compose.composeId],
+ }),
+}));
+
+const createSchema = createInsertSchema(patch, {
+ filePath: z.string().min(1),
+ content: z.string(),
+ type: z.enum(["create", "update", "delete"]).optional(),
+ enabled: z.boolean().optional(),
+ applicationId: z.string().optional(),
+ composeId: z.string().optional(),
+});
+
+export const apiCreatePatch = createSchema.pick({
+ filePath: true,
+ content: true,
+ type: true,
+ enabled: true,
+ applicationId: true,
+ composeId: true,
+});
+
+export const apiFindPatch = z.object({
+ patchId: z.string().min(1),
+});
+
+export const apiFindPatchesByApplicationId = z.object({
+ applicationId: z.string().min(1),
+});
+
+export const apiFindPatchesByComposeId = z.object({
+ composeId: z.string().min(1),
+});
+
+export const apiUpdatePatch = createSchema
+ .partial()
+ .extend({
+ patchId: z.string().min(1),
+ })
+ .omit({ applicationId: true, composeId: true });
+
+export const apiDeletePatch = z.object({
+ patchId: z.string().min(1),
+});
+
+export const apiTogglePatchEnabled = z.object({
+ patchId: z.string().min(1),
+ enabled: z.boolean(),
+});
diff --git a/packages/server/src/db/schema/port.ts b/packages/server/src/db/schema/port.ts
index 30f79cc40..4ba27b5e3 100644
--- a/packages/server/src/db/schema/port.ts
+++ b/packages/server/src/db/schema/port.ts
@@ -49,11 +49,9 @@ export const apiCreatePort = createSchema
})
.required();
-export const apiFindOnePort = createSchema
- .pick({
- portId: true,
- })
- .required();
+export const apiFindOnePort = z.object({
+ portId: z.string().min(1),
+});
export const apiUpdatePort = createSchema
.pick({
diff --git a/packages/server/src/db/schema/postgres.ts b/packages/server/src/db/schema/postgres.ts
index cfd969aaa..5cb3015ce 100644
--- a/packages/server/src/db/schema/postgres.ts
+++ b/packages/server/src/db/schema/postgres.ts
@@ -150,11 +150,9 @@ export const apiCreatePostgres = createSchema.pick({
serverId: true,
});
-export const apiFindOnePostgres = createSchema
- .pick({
- postgresId: true,
- })
- .required();
+export const apiFindOnePostgres = z.object({
+ postgresId: z.string().min(1),
+});
export const apiChangePostgresStatus = createSchema
.pick({
@@ -194,6 +192,7 @@ export const apiUpdatePostgres = createSchema
.partial()
.extend({
postgresId: z.string().min(1),
+ dockerImage: z.string().optional(),
})
.omit({ serverId: true });
diff --git a/packages/server/src/db/schema/preview-deployments.ts b/packages/server/src/db/schema/preview-deployments.ts
index 3bdab2c25..3ce0f39d5 100644
--- a/packages/server/src/db/schema/preview-deployments.ts
+++ b/packages/server/src/db/schema/preview-deployments.ts
@@ -58,17 +58,12 @@ export const createSchema = createInsertSchema(previewDeployments, {
applicationId: z.string(),
});
-export const apiCreatePreviewDeployment = createSchema
- .pick({
- applicationId: true,
- domainId: true,
- branch: true,
- pullRequestId: true,
- pullRequestNumber: true,
- pullRequestURL: true,
- pullRequestTitle: true,
- })
- .extend({
- applicationId: z.string().min(1),
- // deploymentId: z.string().min(1),
- });
+export const apiCreatePreviewDeployment = z.object({
+ applicationId: z.string().min(1),
+ domainId: z.string().optional(),
+ branch: z.string().min(1),
+ pullRequestId: z.string().min(1),
+ pullRequestNumber: z.string().min(1),
+ pullRequestURL: z.string().min(1),
+ pullRequestTitle: z.string().min(1),
+});
diff --git a/packages/server/src/db/schema/project.ts b/packages/server/src/db/schema/project.ts
index 510f9c270..75faece69 100644
--- a/packages/server/src/db/schema/project.ts
+++ b/packages/server/src/db/schema/project.ts
@@ -45,12 +45,9 @@ export const apiCreateProject = createSchema.pick({
env: true,
});
-export const apiFindOneProject = createSchema
- .pick({
- projectId: true,
- })
- .required();
-
+export const apiFindOneProject = z.object({
+ projectId: z.string().min(1),
+});
export const apiRemoveProject = createSchema
.pick({
projectId: true,
diff --git a/packages/server/src/db/schema/redirects.ts b/packages/server/src/db/schema/redirects.ts
index 5b8e8eb22..6d14537d0 100644
--- a/packages/server/src/db/schema/redirects.ts
+++ b/packages/server/src/db/schema/redirects.ts
@@ -35,11 +35,9 @@ const createSchema = createInsertSchema(redirects, {
permanent: z.boolean().optional(),
});
-export const apiFindOneRedirect = createSchema
- .pick({
- redirectId: true,
- })
- .required();
+export const apiFindOneRedirect = z.object({
+ redirectId: z.string().min(1),
+});
export const apiCreateRedirect = createSchema
.pick({
diff --git a/packages/server/src/db/schema/redis.ts b/packages/server/src/db/schema/redis.ts
index aa76fdbcb..f02437805 100644
--- a/packages/server/src/db/schema/redis.ts
+++ b/packages/server/src/db/schema/redis.ts
@@ -136,11 +136,9 @@ export const apiCreateRedis = createSchema.pick({
serverId: true,
});
-export const apiFindOneRedis = createSchema
- .pick({
- redisId: true,
- })
- .required();
+export const apiFindOneRedis = z.object({
+ redisId: z.string().min(1),
+});
export const apiChangeRedisStatus = createSchema
.pick({
@@ -180,6 +178,7 @@ export const apiUpdateRedis = createSchema
.partial()
.extend({
redisId: z.string().min(1),
+ dockerImage: z.string().optional(),
})
.omit({ serverId: true });
diff --git a/packages/server/src/db/schema/registry.ts b/packages/server/src/db/schema/registry.ts
index dd00bf19d..ee9ca662a 100644
--- a/packages/server/src/db/schema/registry.ts
+++ b/packages/server/src/db/schema/registry.ts
@@ -94,11 +94,9 @@ export const apiRemoveRegistry = createSchema
})
.required();
-export const apiFindOneRegistry = createSchema
- .pick({
- registryId: true,
- })
- .required();
+export const apiFindOneRegistry = z.object({
+ registryId: z.string().min(1),
+});
export const apiUpdateRegistry = createSchema.partial().extend({
registryId: z.string().min(1),
diff --git a/packages/server/src/db/schema/security.ts b/packages/server/src/db/schema/security.ts
index 2223a3b29..b669a7900 100644
--- a/packages/server/src/db/schema/security.ts
+++ b/packages/server/src/db/schema/security.ts
@@ -38,11 +38,9 @@ const createSchema = createInsertSchema(security, {
password: z.string().min(1),
});
-export const apiFindOneSecurity = createSchema
- .pick({
- securityId: true,
- })
- .required();
+export const apiFindOneSecurity = z.object({
+ securityId: z.string().min(1),
+});
export const apiCreateSecurity = createSchema
.pick({
diff --git a/packages/server/src/db/schema/server.ts b/packages/server/src/db/schema/server.ts
index 176f35948..7daab58cd 100644
--- a/packages/server/src/db/schema/server.ts
+++ b/packages/server/src/db/schema/server.ts
@@ -133,6 +133,7 @@ const createSchema = createInsertSchema(server, {
serverId: z.string().min(1),
name: z.string().min(1),
description: z.string().optional(),
+ serverType: z.enum(["deploy", "build"]).optional(),
});
export const apiCreateServer = createSchema
@@ -147,11 +148,9 @@ export const apiCreateServer = createSchema
})
.required();
-export const apiFindOneServer = createSchema
- .pick({
- serverId: true,
- })
- .required();
+export const apiFindOneServer = z.object({
+ serverId: z.string().min(1),
+});
export const apiRemoveServer = createSchema
.pick({
diff --git a/packages/server/src/db/schema/session.ts b/packages/server/src/db/schema/session.ts
index 971bb25bd..ad8925c58 100644
--- a/packages/server/src/db/schema/session.ts
+++ b/packages/server/src/db/schema/session.ts
@@ -2,7 +2,7 @@ import { pgTable, text, timestamp } from "drizzle-orm/pg-core";
import { user } from "./user";
// OLD TABLE
-export const session = pgTable("session_temp", {
+export const session = pgTable("session", {
id: text("id").primaryKey(),
expiresAt: timestamp("expires_at").notNull(),
token: text("token").notNull().unique(),
diff --git a/packages/server/src/db/schema/shared.ts b/packages/server/src/db/schema/shared.ts
index 27362489d..e13afe10f 100644
--- a/packages/server/src/db/schema/shared.ts
+++ b/packages/server/src/db/schema/shared.ts
@@ -175,12 +175,12 @@ export const NetworkSwarmSchema = z.array(
.object({
Target: z.string().optional(),
Aliases: z.array(z.string()).optional(),
- DriverOpts: z.record(z.string()).optional(),
+ DriverOpts: z.record(z.string(), z.string()).optional(),
})
.strict(),
);
-export const LabelsSwarmSchema = z.record(z.string());
+export const LabelsSwarmSchema = z.record(z.string(), z.string());
export const EndpointPortConfigSwarmSchema = z
.object({
diff --git a/packages/server/src/db/schema/ssh-key.ts b/packages/server/src/db/schema/ssh-key.ts
index 8a66d6d9d..d90a921ca 100644
--- a/packages/server/src/db/schema/ssh-key.ts
+++ b/packages/server/src/db/schema/ssh-key.ts
@@ -2,6 +2,7 @@ import { relations } from "drizzle-orm";
import { pgTable, text } from "drizzle-orm/pg-core";
import { createInsertSchema } from "drizzle-zod";
import { nanoid } from "nanoid";
+import { z } from "zod";
import { sshKeyCreate, sshKeyType } from "../validations";
import { organization } from "./account";
import { applications } from "./application";
@@ -52,11 +53,9 @@ export const apiCreateSshKey = createSchema
})
.merge(sshKeyCreate.pick({ privateKey: true }));
-export const apiFindOneSshKey = createSchema
- .pick({
- sshKeyId: true,
- })
- .required();
+export const apiFindOneSshKey = z.object({
+ sshKeyId: z.string().min(1),
+});
export const apiGenerateSSHKey = sshKeyType;
diff --git a/packages/server/src/db/schema/web-server-settings.ts b/packages/server/src/db/schema/web-server-settings.ts
index fe5cc5ad1..f36f75660 100644
--- a/packages/server/src/db/schema/web-server-settings.ts
+++ b/packages/server/src/db/schema/web-server-settings.ts
@@ -66,6 +66,36 @@ export const webServerSettings = pgTable("webServerSettings", {
},
},
}),
+ // Whitelabeling Configuration (Enterprise / Proprietary)
+ whitelabelingConfig: jsonb("whitelabelingConfig")
+ .$type<{
+ appName: string | null;
+ appDescription: string | null;
+ logoUrl: string | null;
+ faviconUrl: string | null;
+ customCss: string | null;
+ loginLogoUrl: string | null;
+ supportUrl: string | null;
+ docsUrl: string | null;
+ errorPageTitle: string | null;
+ errorPageDescription: string | null;
+ metaTitle: string | null;
+ footerText: string | null;
+ }>()
+ .default({
+ appName: null,
+ appDescription: null,
+ logoUrl: null,
+ faviconUrl: null,
+ customCss: null,
+ loginLogoUrl: null,
+ supportUrl: null,
+ docsUrl: null,
+ errorPageTitle: null,
+ errorPageDescription: null,
+ metaTitle: null,
+ footerText: null,
+ }),
// Cache Cleanup Configuration
cleanupCacheApplications: boolean("cleanupCacheApplications")
.notNull()
@@ -154,6 +184,33 @@ export const apiUpdateDockerCleanup = z.object({
serverId: z.string().optional(),
});
+// Whitelabeling validation schemas
+const safeUrl = z
+ .string()
+ .refine((url) => /^https?:\/\//i.test(url), {
+ message: "Only http:// and https:// URLs are allowed",
+ })
+ .nullable();
+
+export const whitelabelingConfigSchema = z.object({
+ appName: z.string().nullable(),
+ appDescription: z.string().nullable(),
+ logoUrl: safeUrl,
+ faviconUrl: safeUrl,
+ customCss: z.string().nullable(),
+ loginLogoUrl: safeUrl,
+ supportUrl: safeUrl,
+ docsUrl: safeUrl,
+ errorPageTitle: z.string().nullable(),
+ errorPageDescription: z.string().nullable(),
+ metaTitle: z.string().nullable(),
+ footerText: z.string().nullable(),
+});
+
+export const apiUpdateWhitelabeling = z.object({
+ whitelabelingConfig: whitelabelingConfigSchema,
+});
+
export const apiUpdateWebServerMonitoring = z.object({
metricsConfig: z
.object({
diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts
index 7bfc5553b..9adc9081e 100644
--- a/packages/server/src/index.ts
+++ b/packages/server/src/index.ts
@@ -27,10 +27,13 @@ export * from "./services/mongo";
export * from "./services/mount";
export * from "./services/mysql";
export * from "./services/notification";
+export * from "./services/patch";
+export * from "./services/patch-repo";
export * from "./services/port";
export * from "./services/postgres";
export * from "./services/preview-deployment";
export * from "./services/project";
+export * from "./services/proprietary/license-key";
export * from "./services/proprietary/sso";
export * from "./services/redirect";
export * from "./services/redis";
diff --git a/packages/server/src/lib/access-control.ts b/packages/server/src/lib/access-control.ts
new file mode 100644
index 000000000..d49fd2d45
--- /dev/null
+++ b/packages/server/src/lib/access-control.ts
@@ -0,0 +1,190 @@
+import { createAccessControl } from "better-auth/plugins/access";
+
+/**
+ * Dokploy Access Control Statements
+ *
+ * Defines all resources and their possible actions across the platform.
+ * The first 5 (organization, member, invitation, team, ac) are better-auth defaults
+ * used internally by the organization plugin.
+ * The rest are Dokploy-specific resources.
+ *
+ * Enterprise-only resources (only assignable via custom roles):
+ * deployment, envVars, server, registry, certificate, backup, domain, logs, monitoring
+ */
+export const statements = {
+ // better-auth organization plugin defaults
+ organization: ["update", "delete"],
+ member: ["read", "create", "update", "delete"],
+ invitation: ["create", "cancel"],
+ team: ["create", "update", "delete"],
+ ac: ["create", "read", "update", "delete"],
+
+ // Dokploy core resources (free tier)
+ project: ["create", "delete"],
+ service: ["create", "read", "delete"],
+ environment: ["create", "read", "delete"],
+ docker: ["read"],
+ sshKeys: ["read", "create", "delete"],
+ gitProviders: ["read", "create", "delete"],
+ traefikFiles: ["read", "write"],
+ api: ["read"],
+
+ // Enterprise-only resources (custom roles only)
+ volume: ["read", "create", "delete"],
+ deployment: ["read", "create", "cancel"],
+ envVars: ["read", "write"],
+ projectEnvVars: ["read", "write"],
+ environmentEnvVars: ["read", "write"],
+ server: ["read", "create", "delete"],
+ registry: ["read", "create", "delete"],
+ certificate: ["read", "create", "delete"],
+ backup: ["read", "create", "update", "delete", "restore"],
+ volumeBackup: ["read", "create", "update", "delete", "restore"],
+ schedule: ["read", "create", "update", "delete"],
+ domain: ["read", "create", "delete"],
+ destination: ["read", "create", "delete"],
+ notification: ["read", "create", "update", "delete"],
+ logs: ["read"],
+ monitoring: ["read"],
+ auditLog: ["read"],
+} as const;
+
+/**
+ * Enterprise-only resources. For static roles (owner/admin/member),
+ * permission checks on these resources are bypassed — they only apply
+ * when using custom roles with an enterprise license.
+ */
+export const enterpriseOnlyResources = new Set([
+ "volume",
+ "deployment",
+ "envVars",
+ "projectEnvVars",
+ "environmentEnvVars",
+ "server",
+ "registry",
+ "certificate",
+ "backup",
+ "volumeBackup",
+ "schedule",
+ "domain",
+ "destination",
+ "notification",
+ "logs",
+ "monitoring",
+ "auditLog",
+]);
+
+export const ac = createAccessControl(statements);
+
+/**
+ * Owner role — full access to everything
+ */
+export const ownerRole = ac.newRole({
+ organization: ["update", "delete"],
+ member: ["read", "create", "update", "delete"],
+ invitation: ["create", "cancel"],
+ team: ["create", "update", "delete"],
+ ac: ["create", "read", "update", "delete"],
+ project: ["create", "delete"],
+ service: ["create", "read", "delete"],
+ environment: ["create", "read", "delete"],
+ docker: ["read"],
+ sshKeys: ["read", "create", "delete"],
+ gitProviders: ["read", "create", "delete"],
+ traefikFiles: ["read", "write"],
+ api: ["read"],
+ volume: ["read", "create", "delete"],
+ deployment: ["read", "create", "cancel"],
+ envVars: ["read", "write"],
+ projectEnvVars: ["read", "write"],
+ environmentEnvVars: ["read", "write"],
+ server: ["read", "create", "delete"],
+ registry: ["read", "create", "delete"],
+ certificate: ["read", "create", "delete"],
+ backup: ["read", "create", "update", "delete", "restore"],
+ volumeBackup: ["read", "create", "update", "delete", "restore"],
+ schedule: ["read", "create", "update", "delete"],
+ domain: ["read", "create", "delete"],
+ destination: ["read", "create", "delete"],
+ notification: ["read", "create", "update", "delete"],
+ logs: ["read"],
+ monitoring: ["read"],
+ auditLog: ["read"],
+});
+
+/**
+ * Admin role — same as owner but cannot delete the organization
+ */
+export const adminRole = ac.newRole({
+ organization: ["update"],
+ member: ["read", "create", "update", "delete"],
+ invitation: ["create", "cancel"],
+ team: ["create", "update", "delete"],
+ ac: ["create", "read", "update", "delete"],
+ project: ["create", "delete"],
+ service: ["create", "read", "delete"],
+ environment: ["create", "read", "delete"],
+ docker: ["read"],
+ sshKeys: ["read", "create", "delete"],
+ gitProviders: ["read", "create", "delete"],
+ traefikFiles: ["read", "write"],
+ api: ["read"],
+ volume: ["read", "create", "delete"],
+ deployment: ["read", "create", "cancel"],
+ envVars: ["read", "write"],
+ projectEnvVars: ["read", "write"],
+ environmentEnvVars: ["read", "write"],
+ server: ["read", "create", "delete"],
+ registry: ["read", "create", "delete"],
+ certificate: ["read", "create", "delete"],
+ backup: ["read", "create", "update", "delete", "restore"],
+ volumeBackup: ["read", "create", "update", "delete", "restore"],
+ schedule: ["read", "create", "update", "delete"],
+ domain: ["read", "create", "delete"],
+ destination: ["read", "create", "delete"],
+ notification: ["read", "create", "update", "delete"],
+ logs: ["read"],
+ monitoring: ["read"],
+ auditLog: ["read"],
+});
+
+/**
+ * Member role (free tier) — read-only base permissions.
+ * Members can read projects/services/environments they have access to,
+ * but cannot create, delete, or access admin resources.
+ * Enterprise resources are not available to the base member role.
+ */
+export const memberRole = ac.newRole({
+ organization: [],
+ member: [],
+ invitation: [],
+ team: [],
+ ac: ["read"],
+ project: [],
+ service: ["read"],
+ environment: ["read"],
+ docker: [],
+ sshKeys: [],
+ gitProviders: [],
+ traefikFiles: [],
+ api: [],
+ // Service-level enterprise resources — member can do everything within services they have access to
+ volume: ["read", "create", "delete"],
+ deployment: ["read", "create", "cancel"],
+ envVars: ["read", "write"],
+ projectEnvVars: ["read", "write"],
+ environmentEnvVars: ["read", "write"],
+ backup: ["read", "create", "update", "delete", "restore"],
+ volumeBackup: ["read", "create", "update", "delete", "restore"],
+ schedule: ["read", "create", "update", "delete"],
+ domain: ["read", "create", "delete"],
+ logs: ["read"],
+ monitoring: ["read"],
+ // Org-level enterprise resources — member cannot manage these
+ server: [],
+ registry: [],
+ certificate: [],
+ destination: [],
+ notification: [],
+ auditLog: [],
+});
diff --git a/packages/server/src/lib/auth.ts b/packages/server/src/lib/auth.ts
index c4fa81f86..c05253a13 100644
--- a/packages/server/src/lib/auth.ts
+++ b/packages/server/src/lib/auth.ts
@@ -1,15 +1,21 @@
import type { IncomingMessage } from "node:http";
+import { apiKey } from "@better-auth/api-key";
import { sso } from "@better-auth/sso";
import * as bcrypt from "bcrypt";
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { APIError } from "better-auth/api";
-import { admin, apiKey, organization, twoFactor } from "better-auth/plugins";
+import { admin, organization, twoFactor } from "better-auth/plugins";
import { and, desc, eq } from "drizzle-orm";
import { BETTER_AUTH_SECRET, IS_CLOUD } from "../constants";
import { db } from "../db";
import * as schema from "../db/schema";
-import { getTrustedOrigins, getUserByToken } from "../services/admin";
+import {
+ getTrustedOrigins,
+ getTrustedProviders,
+ getUserByToken,
+} from "../services/admin";
+import { createAuditLog } from "../services/proprietary/audit-log";
import {
getWebServerSettings,
updateWebServerSettings,
@@ -17,8 +23,7 @@ import {
import { getHubSpotUTK, submitToHubSpot } from "../utils/tracking/hubspot";
import { sendEmail } from "../verification/send-verification-email";
import { getPublicIpWithFallback } from "../wss/utils";
-
-const trustedProviders = process.env?.TRUSTED_PROVIDERS?.split(",") || [];
+import { ac, adminRole, memberRole, ownerRole } from "./access-control";
const { handler, api } = betterAuth({
database: drizzleAdapter(db, {
@@ -49,7 +54,10 @@ const { handler, api } = betterAuth({
account: {
accountLinking: {
enabled: true,
- trustedProviders: ["github", "google", ...(trustedProviders || [])],
+ async trustedProviders() {
+ const fromDb = await getTrustedProviders();
+ return ["github", "google", ...fromDb];
+ },
allowDifferentEmails: true,
},
},
@@ -68,25 +76,32 @@ const { handler, api } = betterAuth({
disabled: process.env.NODE_ENV === "production",
},
async trustedOrigins() {
- const trustedOrigins = await getTrustedOrigins();
- if (IS_CLOUD) {
- return trustedOrigins;
- }
- const settings = await getWebServerSettings();
- if (!settings) {
+ try {
+ if (IS_CLOUD) {
+ return await getTrustedOrigins();
+ }
+ const [trustedOrigins, settings] = await Promise.all([
+ getTrustedOrigins(),
+ getWebServerSettings(),
+ ]);
+ if (!settings) return [];
+ const devOrigins =
+ process.env.NODE_ENV === "development"
+ ? [
+ "http://localhost:3000",
+ "https://absolutely-handy-falcon.ngrok-free.app",
+ ]
+ : [];
+ return [
+ ...(settings?.serverIp ? [`http://${settings?.serverIp}:3000`] : []),
+ ...(settings?.host ? [`https://${settings?.host}`] : []),
+ ...devOrigins,
+ ...trustedOrigins,
+ ];
+ } catch (error) {
+ console.error("Failed to resolve trusted origins:", error);
return [];
}
- return [
- ...(settings?.serverIp ? [`http://${settings?.serverIp}:3000`] : []),
- ...(settings?.host ? [`https://${settings?.host}`] : []),
- ...(process.env.NODE_ENV === "development"
- ? [
- "http://localhost:3000",
- "https://absolutely-handy-falcon.ngrok-free.app",
- ]
- : []),
- ...trustedOrigins,
- ];
},
emailVerification: {
sendOnSignUp: true,
@@ -106,7 +121,7 @@ const { handler, api } = betterAuth({
emailAndPassword: {
enabled: true,
autoSignIn: !IS_CLOUD,
- requireEmailVerification: IS_CLOUD,
+ requireEmailVerification: IS_CLOUD && process.env.NODE_ENV === "production",
password: {
async hash(password) {
return bcrypt.hashSync(password, 10);
@@ -262,6 +277,52 @@ const { handler, api } = betterAuth({
},
};
},
+ after: async (session) => {
+ const orgId = (
+ session as typeof session & { activeOrganizationId?: string }
+ ).activeOrganizationId;
+ if (!orgId) return;
+ const memberRecord = await db.query.member.findFirst({
+ where: and(
+ eq(schema.member.userId, session.userId),
+ eq(schema.member.organizationId, orgId),
+ ),
+ with: { user: true },
+ });
+ if (!memberRecord) return;
+ await createAuditLog({
+ organizationId: orgId,
+ userId: session.userId,
+ userEmail: memberRecord.user.email,
+ userRole: memberRecord.role,
+ action: "login",
+ resourceType: "session",
+ });
+ },
+ },
+ delete: {
+ after: async (session) => {
+ const orgId = (
+ session as typeof session & { activeOrganizationId?: string }
+ ).activeOrganizationId;
+ if (!orgId) return;
+ const memberRecord = await db.query.member.findFirst({
+ where: and(
+ eq(schema.member.userId, session.userId),
+ eq(schema.member.organizationId, orgId),
+ ),
+ with: { user: true },
+ });
+ if (!memberRecord) return;
+ await createAuditLog({
+ organizationId: orgId,
+ userId: session.userId,
+ userEmail: memberRecord.user.email,
+ userRole: memberRecord.role,
+ action: "logout",
+ resourceType: "session",
+ });
+ },
},
},
},
@@ -311,10 +372,21 @@ const { handler, api } = betterAuth({
plugins: [
apiKey({
enableMetadata: true,
+ references: "user",
}),
sso(),
twoFactor(),
organization({
+ ac,
+ roles: {
+ owner: ownerRole,
+ admin: adminRole,
+ member: memberRole,
+ },
+ dynamicAccessControl: {
+ enabled: true,
+ maximumRolesPerOrganization: 10,
+ },
async sendInvitationEmail(data, _request) {
if (IS_CLOUD) {
const host =
@@ -343,13 +415,16 @@ const { handler, api } = betterAuth({
],
});
-export const auth = {
+const _auth = {
handler,
createApiKey: api.createApiKey,
registerSSOProvider: api.registerSSOProvider,
updateSSOProvider: api.updateSSOProvider,
};
+export type AuthType = typeof _auth;
+export const auth: AuthType = _auth;
+
export const validateRequest = async (request: IncomingMessage) => {
const apiKey = request.headers["x-api-key"] as string;
if (apiKey) {
@@ -361,7 +436,7 @@ export const validateRequest = async (request: IncomingMessage) => {
});
if (error) {
- throw new Error(error.message || "Error verifying API key");
+ throw new Error(error.message?.toString() || "Error verifying API key");
}
if (!valid || !key) {
return {
@@ -460,11 +535,16 @@ export const validateRequest = async (request: IncomingMessage) => {
const member = await db.query.member.findFirst({
where: and(
eq(schema.member.userId, session.user.id),
- eq(
- schema.member.organizationId,
- session.session.activeOrganizationId || "",
- ),
+ ...(session.session.activeOrganizationId
+ ? [
+ eq(
+ schema.member.organizationId,
+ session.session.activeOrganizationId || "",
+ ),
+ ]
+ : []),
),
+ orderBy: [desc(schema.member.isDefault), desc(schema.member.createdAt)],
with: {
organization: true,
user: true,
@@ -476,6 +556,7 @@ export const validateRequest = async (request: IncomingMessage) => {
member?.user.enableEnterpriseFeatures || false;
session.user.isValidEnterpriseLicense =
member?.user.isValidEnterpriseLicense || false;
+ session.session.activeOrganizationId = member?.organization.id || "";
if (member) {
session.user.ownerId = member.organization.ownerId;
} else {
diff --git a/packages/server/src/services/admin.ts b/packages/server/src/services/admin.ts
index d7e7e9a77..f0c8cb0eb 100644
--- a/packages/server/src/services/admin.ts
+++ b/packages/server/src/services/admin.ts
@@ -117,21 +117,50 @@ export const getDokployUrl = async () => {
return `http://${settings?.serverIp}:${process.env.PORT}`;
};
-export const getTrustedOrigins = async () => {
- const members = await db.query.member.findMany({
- where: eq(member.role, "owner"),
- with: {
- user: true,
- },
- });
+const TRUSTED_ORIGINS_CACHE_TTL_MS = 30 * 60_000;
+let trustedOriginsCache: { data: string[]; expiresAt: number } | null = null;
- if (members.length === 0) {
- return [];
+export const getTrustedOrigins = async () => {
+ const runQuery = async () => {
+ const rows = await db
+ .select({ trustedOrigins: user.trustedOrigins })
+ .from(member)
+ .innerJoin(user, eq(member.userId, user.id))
+ .where(eq(member.role, "owner"));
+ return Array.from(new Set(rows.flatMap((r) => r.trustedOrigins ?? [])));
+ };
+
+ if (IS_CLOUD) {
+ const now = Date.now();
+ if (trustedOriginsCache && now < trustedOriginsCache.expiresAt) {
+ return trustedOriginsCache.data;
+ }
+ try {
+ const trustedOrigins = await runQuery();
+ trustedOriginsCache = {
+ data: trustedOrigins,
+ expiresAt: now + TRUSTED_ORIGINS_CACHE_TTL_MS,
+ };
+ return trustedOrigins;
+ } catch (error) {
+ console.error("Failed to fetch trusted origins:", error);
+ return trustedOriginsCache?.data ?? [];
+ }
}
- const trustedOrigins = members.flatMap(
- (member) => member.user.trustedOrigins || [],
- );
-
- return Array.from(new Set(trustedOrigins));
+ try {
+ return await runQuery();
+ } catch (error) {
+ console.error("Failed to fetch trusted origins:", error);
+ return [];
+ }
+};
+
+export const getTrustedProviders = async () => {
+ try {
+ const providers = await db.query.ssoProvider.findMany();
+ return providers.map((provider) => provider.providerId);
+ } catch (error) {
+ return [];
+ }
};
diff --git a/packages/server/src/services/ai.ts b/packages/server/src/services/ai.ts
index fefc82eae..ccfb31fc1 100644
--- a/packages/server/src/services/ai.ts
+++ b/packages/server/src/services/ai.ts
@@ -2,13 +2,31 @@ import { db } from "@dokploy/server/db";
import { ai } from "@dokploy/server/db/schema";
import { selectAIProvider } from "@dokploy/server/utils/ai/select-ai-provider";
import { TRPCError } from "@trpc/server";
-import { generateObject } from "ai";
+import { generateText, Output } from "ai";
import { desc, eq } from "drizzle-orm";
import { z } from "zod";
import { IS_CLOUD } from "../constants";
import { findServerById } from "./server";
import { getWebServerSettings } from "./web-server-settings";
+interface SuggestionItem {
+ id: string;
+ name: string;
+ shortDescription: string;
+ description: string;
+}
+
+interface SuggestionsOutput {
+ suggestions: SuggestionItem[];
+}
+
+interface DockerOutput {
+ dockerCompose: string;
+ envVariables: Array<{ name: string; value: string }>;
+ domains: Array<{ host: string; port: number; serviceName: string }>;
+ configFiles?: Array<{ content: string; filePath: string }>;
+}
+
export const getAiSettingsByOrganizationId = async (organizationId: string) => {
const aiSettings = await db.query.ai.findMany({
where: eq(ai.organizationId, organizationId),
@@ -60,7 +78,7 @@ interface Props {
}
export const suggestVariants = async ({
- organizationId,
+ organizationId: _organizationId,
aiId,
input,
serverId,
@@ -90,173 +108,177 @@ export const suggestVariants = async ({
ip = "127.0.0.1";
}
- const { object } = await generateObject({
- model,
- output: "object",
- schema: z.object({
- suggestions: z.array(
- z.object({
- id: z.string(),
- name: z.string(),
- shortDescription: z.string(),
- description: z.string(),
- }),
- ),
- }),
- prompt: `
- Act as advanced DevOps engineer and analyze the user's request to determine the appropriate suggestions (up to 3 items).
-
- CRITICAL - Read the user's request carefully and follow the appropriate strategy:
-
- Strategy A - If the user specifies a PARTICULAR APPLICATION/SERVICE (e.g., "deploy Chatwoot", "install sendingtk/chatwoot:develop", "setup Bitwarden"):
- - Generate different deployment VARIANTS of that SAME application
- - Each variant should be a different configuration (minimal, full stack, with different databases, development vs production, etc.)
- - Example: For "Chatwoot" → "Chatwoot with PostgreSQL", "Chatwoot Development", "Chatwoot Full Stack"
- - The name MUST include the specific application name the user mentioned
-
- Strategy B - If the user describes a GENERAL NEED or USE CASE (e.g., "personal blog", "project management tool", "chat application"):
- - Suggest different open source projects that fulfill that need
- - Each suggestion should be a different tool/platform that solves the same problem
- - Example: For "personal blog" → "WordPress", "Ghost", "Hugo with Nginx"
- - The name should be the actual project name
-
- Return your response as a JSON object with the following structure:
- {
- "suggestions": [
- {
- "id": "project-or-variant-slug",
- "name": "Project Name or Variant Name",
- "shortDescription": "Brief one-line description",
- "description": "Detailed description"
- }
- ]
- }
-
- Important rules for the response:
- 1. Use slug format for the id field (lowercase, hyphenated)
- 2. Determine which strategy to use based on whether the user specified a particular application or described a general need
- 3. For Strategy A (specific app): The name must include the app name and describe the variant configuration
- 4. For Strategy B (general need): The name should be the actual project/tool name that fulfills the need
- 5. The description field should ONLY contain a plain text description of the project or variant, its features, and use cases
- 6. Do NOT include any code snippets, configuration examples, or installation instructions in the description
- 7. The shortDescription should be a single-line summary focusing on key technologies or differentiators
- 8. All suggestions should be installable in docker and have docker compose support
- 9. Provide variety in your suggestions - different complexity levels, tech stacks, or approaches
-
- User wants to create a new project with the following details:
-
- ${input}
- `,
+ const suggestionsSchema = z.object({
+ suggestions: z.array(
+ z.object({
+ id: z.string(),
+ name: z.string(),
+ shortDescription: z.string(),
+ description: z.string(),
+ }),
+ ),
});
+ const suggestionsResult = await generateText({
+ model,
+ // @ts-ignore - Zod + AI SDK Output.object() causes excessively deep instantiation
+ output: Output.object({ schema: suggestionsSchema }),
+ prompt: `
+ Act as advanced DevOps engineer and analyze the user's request to determine the appropriate suggestions (up to 3 items).
+
+ CRITICAL - Read the user's request carefully and follow the appropriate strategy:
+
+ Strategy A - If the user specifies a PARTICULAR APPLICATION/SERVICE (e.g., "deploy Chatwoot", "install sendingtk/chatwoot:develop", "setup Bitwarden"):
+ - Generate different deployment VARIANTS of that SAME application
+ - Each variant should be a different configuration (minimal, full stack, with different databases, development vs production, etc.)
+ - Example: For "Chatwoot" → "Chatwoot with PostgreSQL", "Chatwoot Development", "Chatwoot Full Stack"
+ - The name MUST include the specific application name the user mentioned
+
+ Strategy B - If the user describes a GENERAL NEED or USE CASE (e.g., "personal blog", "project management tool", "chat application"):
+ - Suggest different open source projects that fulfill that need
+ - Each suggestion should be a different tool/platform that solves the same problem
+ - Example: For "personal blog" → "WordPress", "Ghost", "Hugo with Nginx"
+ - The name should be the actual project name
+
+ Return your response as a JSON object with the following structure:
+ {
+ "suggestions": [
+ {
+ "id": "project-or-variant-slug",
+ "name": "Project Name or Variant Name",
+ "shortDescription": "Brief one-line description",
+ "description": "Detailed description"
+ }
+ ]
+ }
+
+ Important rules for the response:
+ 1. Use slug format for the id field (lowercase, hyphenated)
+ 2. Determine which strategy to use based on whether the user specified a particular application or described a general need
+ 3. For Strategy A (specific app): The name must include the app name and describe the variant configuration
+ 4. For Strategy B (general need): The name should be the actual project/tool name that fulfills the need
+ 5. The description field should ONLY contain a plain text description of the project or variant, its features, and use cases
+ 6. Do NOT include any code snippets, configuration examples, or installation instructions in the description
+ 7. The shortDescription should be a single-line summary focusing on key technologies or differentiators
+ 8. All suggestions should be installable in docker and have docker compose support
+ 9. Provide variety in your suggestions - different complexity levels, tech stacks, or approaches
+
+ User wants to create a new project with the following details:
+
+ ${input}
+ `,
+ });
+ const object = suggestionsResult.output as SuggestionsOutput | undefined;
if (object?.suggestions?.length) {
+ const dockerSchema = z.object({
+ dockerCompose: z.string(),
+ envVariables: z.array(
+ z.object({
+ name: z.string(),
+ value: z.string(),
+ }),
+ ),
+ domains: z.array(
+ z.object({
+ host: z.string(),
+ port: z.number(),
+ serviceName: z.string(),
+ }),
+ ),
+ configFiles: z
+ .array(
+ z.object({
+ content: z.string(),
+ filePath: z.string(),
+ }),
+ )
+ .optional(),
+ });
const result = [];
for (const suggestion of object.suggestions) {
try {
- const { object: docker } = await generateObject({
+ const dockerResult = await generateText({
model,
- output: "object",
- schema: z.object({
- dockerCompose: z.string(),
- envVariables: z.array(
- z.object({
- name: z.string(),
- value: z.string(),
- }),
- ),
- domains: z.array(
- z.object({
- host: z.string(),
- port: z.number(),
- serviceName: z.string(),
- }),
- ),
- configFiles: z
- .array(
- z.object({
- content: z.string(),
- filePath: z.string(),
- }),
- )
- .optional(),
- }),
+ // @ts-ignore - Zod + AI SDK Output.object() causes excessively deep instantiation
+ output: Output.object({ schema: dockerSchema }),
prompt: `
- Act as advanced DevOps engineer and generate docker compose with environment variables and domain configurations needed to install the following project.
-
- Return your response as a JSON object with this structure:
- {
- "dockerCompose": "yaml string here",
- "envVariables": [{"name": "VAR_NAME", "value": "example_value"}],
- "domains": [{"host": "domain.com", "port": 3000, "serviceName": "service"}],
- "configFiles": [{"content": "file content", "filePath": "path/to/file"}]
- }
-
- Note: configFiles is optional - only include it if configuration files are absolutely required.
-
- Follow these rules:
+ Act as advanced DevOps engineer and generate docker compose with environment variables and domain configurations needed to install the following project.
- Docker Compose Rules:
- 1. Use placeholder like \${VARIABLE_NAME-default} for generated variables in the docker-compose.yml
- 2. Use complex values for passwords/secrets variables
- 3. Don't set container_name field in services
- 4. Don't set version field in the docker compose
- 5. Don't set ports like 'ports: 3000:3000', use 'ports: "3000"' instead
- 6. If a service depends on a database or other service, INCLUDE that service in the docker-compose
- 7. Make sure all required services are defined in the docker-compose
+ Return your response as a JSON object with this structure:
+ {
+ "dockerCompose": "yaml string here",
+ "envVariables": [{"name": "VAR_NAME", "value": "example_value"}],
+ "domains": [{"host": "domain.com", "port": 3000, "serviceName": "service"}],
+ "configFiles": [{"content": "file content", "filePath": "path/to/file"}]
+ }
- Docker Image Rules (CRITICAL):
- 1. ALWAYS use 'image:' field, NEVER use 'build:' field
- 2. NEVER use 'build: .' or any build directive - we don't have local Dockerfiles
- 3. Use images from Docker Hub or other public registries (e.g., docker.io, ghcr.io, quay.io)
- 4. For dependencies (databases, redis, etc.), use official images (e.g., postgres:16, redis:7, etc.)
- 5. Always specify image tags - avoid using 'latest' tag, use specific versions when possible
- 6. Examples of correct image usage:
- - image: sendingtk/chatwoot:develop
- - image: postgres:16-alpine
- - image: redis:7-alpine
- - image: chatwoot/chatwoot:latest
- 7. Examples of INCORRECT usage (DO NOT USE):
- - build: .
- - build: ./app
- - build:
- context: .
- dockerfile: Dockerfile
+ Note: configFiles is optional - only include it if configuration files are absolutely required.
- Volume Mounting and Configuration Rules:
- 1. DO NOT create configuration files unless the service CANNOT work without them
- 2. Most services can work with just environment variables - USE THEM FIRST
- 3. Ask yourself: "Can this be configured with an environment variable instead?"
- 4. If and ONLY IF a config file is absolutely required:
- - Keep it minimal with only critical settings
- - Use "../files/" prefix for all mounts
- - Format: "../files/folder:/container/path"
- 5. DO NOT add configuration files for:
- - Default configurations that work out of the box
- - Settings that can be handled by environment variables
- - Proxy or routing configurations (these are handled elsewhere)
+ Follow these rules:
- Environment Variables Rules:
- 1. For the envVariables array, provide ACTUAL example values, not placeholders
- 2. Use realistic example values (e.g., "admin@example.com" for emails, "mypassword123" for passwords)
- 3. DO NOT use \${VARIABLE_NAME-default} syntax in the envVariables values
- 4. ONLY include environment variables that are actually used in the docker-compose
- 5. Every environment variable referenced in the docker-compose MUST have a corresponding entry in envVariables
- 6. Do not include environment variables for services that don't exist in the docker-compose
-
- For each service that needs to be exposed to the internet:
- 1. Define a domain configuration with:
- - host: the domain name for the service in format: {service-name}-{random-3-chars-hex}-${ip ? ip.replaceAll(".", "-") : ""}.traefik.me
- - port: the internal port the service runs on
- - serviceName: the name of the service in the docker-compose
- 2. Make sure the service is properly configured to work with the specified port
-
- User's original request: ${input}
-
- Project details:
- ${suggestion?.description}
- `,
+ Docker Compose Rules:
+ 1. Use placeholder like \${VARIABLE_NAME-default} for generated variables in the docker-compose.yml
+ 2. Use complex values for passwords/secrets variables
+ 3. Don't set container_name field in services
+ 4. Don't set version field in the docker compose
+ 5. Don't set ports like 'ports: 3000:3000', use 'ports: "3000"' instead
+ 6. If a service depends on a database or other service, INCLUDE that service in the docker-compose
+ 7. Make sure all required services are defined in the docker-compose
+
+ Docker Image Rules (CRITICAL):
+ 1. ALWAYS use 'image:' field, NEVER use 'build:' field
+ 2. NEVER use 'build: .' or any build directive - we don't have local Dockerfiles
+ 3. Use images from Docker Hub or other public registries (e.g., docker.io, ghcr.io, quay.io)
+ 4. For dependencies (databases, redis, etc.), use official images (e.g., postgres:16, redis:7, etc.)
+ 5. Always specify image tags - avoid using 'latest' tag, use specific versions when possible
+ 6. Examples of correct image usage:
+ - image: sendingtk/chatwoot:develop
+ - image: postgres:16-alpine
+ - image: redis:7-alpine
+ - image: chatwoot/chatwoot:latest
+ 7. Examples of INCORRECT usage (DO NOT USE):
+ - build: .
+ - build: ./app
+ - build:
+ context: .
+ dockerfile: Dockerfile
+
+ Volume Mounting and Configuration Rules:
+ 1. DO NOT create configuration files unless the service CANNOT work without them
+ 2. Most services can work with just environment variables - USE THEM FIRST
+ 3. Ask yourself: "Can this be configured with an environment variable instead?"
+ 4. If and ONLY IF a config file is absolutely required:
+ - Keep it minimal with only critical settings
+ - Use "../files/" prefix for all mounts
+ - Format: "../files/folder:/container/path"
+ 5. DO NOT add configuration files for:
+ - Default configurations that work out of the box
+ - Settings that can be handled by environment variables
+ - Proxy or routing configurations (these are handled elsewhere)
+
+ Environment Variables Rules:
+ 1. For the envVariables array, provide ACTUAL example values, not placeholders
+ 2. Use realistic example values (e.g., "admin@example.com" for emails, "mypassword123" for passwords)
+ 3. DO NOT use \${VARIABLE_NAME-default} syntax in the envVariables values
+ 4. ONLY include environment variables that are actually used in the docker-compose
+ 5. Every environment variable referenced in the docker-compose MUST have a corresponding entry in envVariables
+ 6. Do not include environment variables for services that don't exist in the docker-compose
+
+ For each service that needs to be exposed to the internet:
+ 1. Define a domain configuration with:
+ - host: the domain name for the service in format: {service-name}-{random-3-chars-hex}-${ip ? ip.replaceAll(".", "-") : ""}.traefik.me
+ - port: the internal port the service runs on
+ - serviceName: the name of the service in the docker-compose
+ 2. Make sure the service is properly configured to work with the specified port
+
+ User's original request: ${input}
+
+ Project details:
+ ${suggestion?.description}
+ `,
});
- if (!!docker && !!docker.dockerCompose) {
+ const docker = dockerResult.output as DockerOutput | undefined;
+ if (docker?.dockerCompose) {
result.push({
...suggestion,
...docker,
diff --git a/packages/server/src/services/application.ts b/packages/server/src/services/application.ts
index 11cff15a4..ac1fbb449 100644
--- a/packages/server/src/services/application.ts
+++ b/packages/server/src/services/application.ts
@@ -29,6 +29,7 @@ import { cloneGitlabRepository } from "@dokploy/server/utils/providers/gitlab";
import { createTraefikConfig } from "@dokploy/server/utils/traefik/application";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
+import type { z } from "zod";
import { encodeBase64 } from "../utils/docker/utils";
import { getDokployUrl } from "./admin";
import {
@@ -44,6 +45,7 @@ import {
issueCommentExists,
updateIssueComment,
} from "./github";
+import { generateApplyPatchesCommand } from "./patch";
import {
findPreviewDeploymentById,
updatePreviewDeployment,
@@ -52,7 +54,7 @@ import { validUniqueServerAppName } from "./project";
export type Application = typeof applications.$inferSelect;
export const createApplication = async (
- input: typeof apiCreateApplication._type,
+ input: z.infer,
) => {
const appName = buildAppName("app", input.appName);
@@ -202,6 +204,14 @@ export const deployApplication = async ({
command += await buildRemoteDocker(application);
}
+ if (application.sourceType !== "docker") {
+ command += await generateApplyPatchesCommand({
+ id: application.applicationId,
+ type: "application",
+ serverId,
+ });
+ }
+
command += await getBuildCommand(application);
const commandWithLog = `(${command}) >> ${deployment.logPath} 2>&1`;
diff --git a/packages/server/src/services/backup.ts b/packages/server/src/services/backup.ts
index 40faf6d9c..d638d3478 100644
--- a/packages/server/src/services/backup.ts
+++ b/packages/server/src/services/backup.ts
@@ -2,17 +2,16 @@ import { db } from "@dokploy/server/db";
import { type apiCreateBackup, backups } from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
+import type { z } from "zod";
export type Backup = typeof backups.$inferSelect;
export type BackupSchedule = Awaited>;
export type BackupScheduleList = Awaited>;
-export const createBackup = async (input: typeof apiCreateBackup._type) => {
+export const createBackup = async (input: z.infer) => {
const newBackup = await db
.insert(backups)
- .values({
- ...input,
- })
+ .values({ ...input } as typeof backups.$inferInsert)
.returning()
.then((value) => value[0]);
diff --git a/packages/server/src/services/bitbucket.ts b/packages/server/src/services/bitbucket.ts
index 4cd48f957..bd877e801 100644
--- a/packages/server/src/services/bitbucket.ts
+++ b/packages/server/src/services/bitbucket.ts
@@ -7,11 +7,12 @@ import {
} from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
+import type { z } from "zod";
export type Bitbucket = typeof bitbucket.$inferSelect;
export const createBitbucket = async (
- input: typeof apiCreateBitbucket._type,
+ input: z.infer,
organizationId: string,
userId: string,
) => {
@@ -65,7 +66,7 @@ export const findBitbucketById = async (bitbucketId: string) => {
export const updateBitbucket = async (
bitbucketId: string,
- input: typeof apiUpdateBitbucket._type,
+ input: z.infer,
) => {
return await db.transaction(async (tx) => {
// First get the current bitbucket provider to get gitProviderId
diff --git a/packages/server/src/services/compose.ts b/packages/server/src/services/compose.ts
index 7021ba29a..71876a3ee 100644
--- a/packages/server/src/services/compose.ts
+++ b/packages/server/src/services/compose.ts
@@ -33,6 +33,7 @@ import { cloneGitlabRepository } from "@dokploy/server/utils/providers/gitlab";
import { getCreateComposeFileCommand } from "@dokploy/server/utils/providers/raw";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
+import type { z } from "zod";
import { encodeBase64 } from "../utils/docker/utils";
import { getDokployUrl } from "./admin";
import {
@@ -40,11 +41,14 @@ import {
updateDeployment,
updateDeploymentStatus,
} from "./deployment";
+import { generateApplyPatchesCommand } from "./patch";
import { validUniqueServerAppName } from "./project";
export type Compose = typeof compose.$inferSelect;
-export const createCompose = async (input: typeof apiCreateCompose._type) => {
+export const createCompose = async (
+ input: z.infer,
+) => {
const appName = buildAppName("compose", input.appName);
const valid = await validUniqueServerAppName(appName);
@@ -247,8 +251,15 @@ export const deployCompose = async ({
} else {
await execAsync(commandWithLog);
}
-
command = "set -e;";
+ if (compose.sourceType !== "raw") {
+ command += await generateApplyPatchesCommand({
+ id: compose.composeId,
+ type: "compose",
+ serverId: compose.serverId,
+ });
+ }
+
command += await getBuildComposeCommand(entity);
commandWithLog = `(${command}) >> ${deployment.logPath} 2>&1`;
if (compose.serverId) {
diff --git a/packages/server/src/services/deployment.ts b/packages/server/src/services/deployment.ts
index 6244ec8eb..a9f059465 100644
--- a/packages/server/src/services/deployment.ts
+++ b/packages/server/src/services/deployment.ts
@@ -10,13 +10,21 @@ import {
type apiCreateDeploymentSchedule,
type apiCreateDeploymentServer,
type apiCreateDeploymentVolumeBackup,
+ applications,
+ compose,
deployments,
+ environments,
+ projects,
} from "@dokploy/server/db/schema";
import { removeDirectoryIfExistsContent } from "@dokploy/server/utils/filesystem/directory";
-import { execAsyncRemote } from "@dokploy/server/utils/process/execAsync";
+import {
+ execAsync,
+ execAsyncRemote,
+} from "@dokploy/server/utils/process/execAsync";
import { TRPCError } from "@trpc/server";
import { format } from "date-fns";
-import { desc, eq } from "drizzle-orm";
+import { desc, eq, and, inArray, or, sql } from "drizzle-orm";
+import type { z } from "zod";
import {
type Application,
findApplicationById,
@@ -34,6 +42,41 @@ import { findScheduleById } from "./schedule";
import { findServerById, type Server } from "./server";
import { findVolumeBackupById } from "./volume-backups";
+export type ServicePath = { href: string | null; label: string };
+
+export async function resolveServicePath(
+ orgId: string,
+ data: Record,
+): Promise {
+ try {
+ const applicationId = data?.applicationId as string | undefined;
+ const composeId = data?.composeId as string | undefined;
+ if (applicationId) {
+ const app = await findApplicationById(applicationId);
+ if (app.environment.project.organizationId !== orgId) {
+ return { href: null, label: "Application" };
+ }
+ return {
+ href: `/dashboard/project/${app.environment.project.projectId}/environment/${app.environment.environmentId}/services/application/${app.applicationId}`,
+ label: "Application",
+ };
+ }
+ if (composeId) {
+ const comp = await findComposeById(composeId);
+ if (comp.environment.project.organizationId !== orgId) {
+ return { href: null, label: "Compose" };
+ }
+ return {
+ href: `/dashboard/project/${comp.environment.project.projectId}/environment/${comp.environment.environmentId}/services/compose/${comp.composeId}`,
+ label: "Compose",
+ };
+ }
+ } catch {
+ // not found or unauthorized
+ }
+ return { href: null, label: "—" };
+}
+
export type Deployment = typeof deployments.$inferSelect;
export const findDeploymentById = async (deploymentId: string) => {
@@ -69,17 +112,17 @@ export const findDeploymentByApplicationId = async (applicationId: string) => {
export const createDeployment = async (
deployment: Omit<
- typeof apiCreateDeployment._type,
+ z.infer,
"deploymentId" | "createdAt" | "status" | "logPath"
>,
) => {
const application = await findApplicationById(deployment.applicationId);
+ await removeLastTenDeployments(
+ deployment.applicationId,
+ "application",
+ application.serverId,
+ );
try {
- await removeLastTenDeployments(
- deployment.applicationId,
- "application",
- application.serverId,
- );
const serverId = application.buildServerId || application.serverId;
const { LOGS_PATH } = paths(!!serverId);
@@ -150,20 +193,19 @@ export const createDeployment = async (
export const createDeploymentPreview = async (
deployment: Omit<
- typeof apiCreateDeploymentPreview._type,
+ z.infer,
"deploymentId" | "createdAt" | "status" | "logPath"
>,
) => {
const previewDeployment = await findPreviewDeploymentById(
deployment.previewDeploymentId,
);
+ await removeLastTenDeployments(
+ deployment.previewDeploymentId,
+ "previewDeployment",
+ previewDeployment?.application?.serverId,
+ );
try {
- await removeLastTenDeployments(
- deployment.previewDeploymentId,
- "previewDeployment",
- previewDeployment?.application?.serverId,
- );
-
const appName = `${previewDeployment.appName}`;
const { LOGS_PATH } = paths(!!previewDeployment?.application?.serverId);
const formattedDateTime = format(new Date(), "yyyy-MM-dd:HH:mm:ss");
@@ -233,17 +275,17 @@ export const createDeploymentPreview = async (
export const createDeploymentCompose = async (
deployment: Omit<
- typeof apiCreateDeploymentCompose._type,
+ z.infer,
"deploymentId" | "createdAt" | "status" | "logPath"
>,
) => {
const compose = await findComposeById(deployment.composeId);
+ await removeLastTenDeployments(
+ deployment.composeId,
+ "compose",
+ compose.serverId,
+ );
try {
- await removeLastTenDeployments(
- deployment.composeId,
- "compose",
- compose.serverId,
- );
const { LOGS_PATH } = paths(!!compose.serverId);
const formattedDateTime = format(new Date(), "yyyy-MM-dd:HH:mm:ss");
const fileName = `${compose.appName}-${formattedDateTime}.log`;
@@ -310,7 +352,7 @@ echo "Initializing deployment\n" >> ${logFilePath};
export const createDeploymentBackup = async (
deployment: Omit<
- typeof apiCreateDeploymentBackup._type,
+ z.infer,
"deploymentId" | "createdAt" | "status" | "logPath"
>,
) => {
@@ -326,8 +368,8 @@ export const createDeploymentBackup = async (
} else if (backup.backupType === "compose") {
serverId = backup.compose?.serverId;
}
+ await removeLastTenDeployments(deployment.backupId, "backup", serverId);
try {
- await removeLastTenDeployments(deployment.backupId, "backup", serverId);
const { LOGS_PATH } = paths(!!serverId);
const formattedDateTime = format(new Date(), "yyyy-MM-dd:HH:mm:ss");
const fileName = `${backup.appName}-${formattedDateTime}.log`;
@@ -390,18 +432,18 @@ echo "Initializing backup\n" >> ${logFilePath};
export const createDeploymentSchedule = async (
deployment: Omit<
- typeof apiCreateDeploymentSchedule._type,
+ z.infer,
"deploymentId" | "createdAt" | "status" | "logPath"
>,
) => {
const schedule = await findScheduleById(deployment.scheduleId);
+ const serverId =
+ schedule.application?.serverId ||
+ schedule.compose?.serverId ||
+ schedule.server?.serverId;
+ await removeLastTenDeployments(deployment.scheduleId, "schedule", serverId);
try {
- const serverId =
- schedule.application?.serverId ||
- schedule.compose?.serverId ||
- schedule.server?.serverId;
- await removeLastTenDeployments(deployment.scheduleId, "schedule", serverId);
const { SCHEDULES_PATH } = paths(!!serverId);
const formattedDateTime = format(new Date(), "yyyy-MM-dd:HH:mm:ss");
const fileName = `${schedule.appName}-${formattedDateTime}.log`;
@@ -466,20 +508,20 @@ export const createDeploymentSchedule = async (
export const createDeploymentVolumeBackup = async (
deployment: Omit<
- typeof apiCreateDeploymentVolumeBackup._type,
+ z.infer,
"deploymentId" | "createdAt" | "status" | "logPath"
>,
) => {
const volumeBackup = await findVolumeBackupById(deployment.volumeBackupId);
+ const serverId =
+ volumeBackup.application?.serverId || volumeBackup.compose?.serverId;
+ await removeLastTenDeployments(
+ deployment.volumeBackupId,
+ "volumeBackup",
+ serverId,
+ );
try {
- const serverId =
- volumeBackup.application?.serverId || volumeBackup.compose?.serverId;
- await removeLastTenDeployments(
- deployment.volumeBackupId,
- "volumeBackup",
- serverId,
- );
const { VOLUME_BACKUPS_PATH } = paths(!!serverId);
const formattedDateTime = format(new Date(), "yyyy-MM-dd:HH:mm:ss");
const fileName = `${volumeBackup.appName}-${formattedDateTime}.log`;
@@ -554,11 +596,27 @@ export const removeDeployment = async (deploymentId: string) => {
const deployment = await db
.delete(deployments)
.where(eq(deployments.deploymentId, deploymentId))
- .returning();
- return deployment[0];
+ .returning()
+ .then((result) => result[0]);
+
+ if (!deployment) {
+ return null;
+ }
+
+ const logPath = path.join(deployment.logPath);
+ if (logPath && logPath !== ".") {
+ const command = `rm -f ${logPath};`;
+ if (deployment.serverId) {
+ await execAsyncRemote(deployment.serverId, command);
+ } else {
+ await execAsync(command);
+ }
+ }
+
+ return deployment;
} catch (error) {
const message =
- error instanceof Error ? error.message : "Error creating the deployment";
+ error instanceof Error ? error.message : "Error removing the deployment";
throw new TRPCError({
code: "BAD_REQUEST",
message,
@@ -626,34 +684,49 @@ const removeLastTenDeployments = async (
if (serverId) {
let command = "";
for (const oldDeployment of deploymentsToDelete) {
- const logPath = path.join(oldDeployment.logPath);
- if (oldDeployment.rollbackId) {
- await removeRollbackById(oldDeployment.rollbackId);
- }
+ try {
+ const logPath = path.join(oldDeployment.logPath);
+ if (oldDeployment.rollbackId) {
+ await removeRollbackById(oldDeployment.rollbackId);
+ }
- if (logPath !== ".") {
- command += `
- rm -rf ${logPath};
- `;
+ if (logPath && logPath !== ".") {
+ command += `rm -rf ${logPath};`;
+ }
+ await removeDeployment(oldDeployment.deploymentId);
+ } catch (err) {
+ console.error(
+ `Failed to remove deployment ${oldDeployment.deploymentId} during cleanup:`,
+ err,
+ );
}
- await removeDeployment(oldDeployment.deploymentId);
}
- await execAsyncRemote(serverId, command);
+ if (command) {
+ await execAsyncRemote(serverId, command);
+ }
} else {
for (const oldDeployment of deploymentsToDelete) {
- if (oldDeployment.rollbackId) {
- await removeRollbackById(oldDeployment.rollbackId);
+ try {
+ if (oldDeployment.rollbackId) {
+ await removeRollbackById(oldDeployment.rollbackId);
+ }
+ const logPath = path.join(oldDeployment.logPath);
+ if (
+ logPath &&
+ logPath !== "." &&
+ existsSync(logPath) &&
+ !oldDeployment.errorMessage
+ ) {
+ await fsPromises.unlink(logPath);
+ }
+ await removeDeployment(oldDeployment.deploymentId);
+ } catch (err) {
+ console.error(
+ `Failed to remove deployment ${oldDeployment.deploymentId} during cleanup:`,
+ err,
+ );
}
- const logPath = path.join(oldDeployment.logPath);
- if (
- existsSync(logPath) &&
- !oldDeployment.errorMessage &&
- logPath !== "."
- ) {
- await fsPromises.unlink(logPath);
- }
- await removeDeployment(oldDeployment.deploymentId);
}
}
}
@@ -717,6 +790,135 @@ export const findAllDeploymentsByComposeId = async (composeId: string) => {
return deploymentsList;
};
+const centralizedDeploymentsWith = {
+ application: {
+ columns: { applicationId: true, name: true, appName: true },
+ with: {
+ environment: {
+ columns: { environmentId: true, name: true },
+ with: {
+ project: {
+ columns: { projectId: true, name: true },
+ },
+ },
+ },
+ server: {
+ columns: { serverId: true, name: true, serverType: true },
+ },
+ buildServer: {
+ columns: { serverId: true, name: true, serverType: true },
+ },
+ },
+ },
+ compose: {
+ columns: { composeId: true, name: true, appName: true },
+ with: {
+ environment: {
+ columns: { environmentId: true, name: true },
+ with: {
+ project: {
+ columns: { projectId: true, name: true },
+ },
+ },
+ },
+ server: {
+ columns: { serverId: true, name: true, serverType: true },
+ },
+ },
+ },
+ server: {
+ columns: { serverId: true, name: true, serverType: true },
+ },
+ buildServer: {
+ columns: { serverId: true, name: true, serverType: true },
+ },
+} as const;
+
+async function getApplicationIdsInOrg(
+ orgId: string,
+ accessedServices: string[] | null,
+): Promise {
+ const rows = await db
+ .select({ applicationId: applications.applicationId })
+ .from(applications)
+ .innerJoin(
+ environments,
+ eq(applications.environmentId, environments.environmentId),
+ )
+ .innerJoin(projects, eq(environments.projectId, projects.projectId))
+ .where(
+ accessedServices !== null
+ ? and(
+ eq(projects.organizationId, orgId),
+ inArray(applications.applicationId, accessedServices),
+ )
+ : eq(projects.organizationId, orgId),
+ );
+ return rows.map((r) => r.applicationId);
+}
+
+async function getComposeIdsInOrg(
+ orgId: string,
+ accessedServices: string[] | null,
+): Promise