From 532265141292f9483f2d6faacc02f33e20101f39 Mon Sep 17 00:00:00 2001 From: Real Codesiman Date: Wed, 19 Aug 2026 08:10:17 +0700 Subject: [PATCH 1/2] feat(templates): add shareable flow templates with install and auto-update Lets a workspace publish a flow as a reusable template (with a share token and folder manifest) and lets other workspaces install it, optionally keeping installations in sync via auto-update. --- apps/builder/messages/ar.json | 71 +- apps/builder/messages/da.json | 71 +- apps/builder/messages/de.json | 71 +- apps/builder/messages/en.json | 71 +- apps/builder/messages/es.json | 71 +- apps/builder/messages/fi.json | 71 +- apps/builder/messages/fr.json | 71 +- apps/builder/messages/he.json | 71 +- apps/builder/messages/id.json | 71 +- apps/builder/messages/it.json | 71 +- apps/builder/messages/ja.json | 71 +- apps/builder/messages/nl.json | 71 +- apps/builder/messages/pt-BR.json | 71 +- apps/builder/messages/pt-PT.json | 71 +- apps/builder/messages/ro.json | 71 +- apps/builder/messages/sv.json | 71 +- apps/builder/messages/tr.json | 71 +- apps/builder/messages/vi.json | 71 +- apps/builder/messages/zh-CN.json | 71 +- apps/builder/messages/zh-TW.json | 71 +- .../templates/[id]/edit/page.tsx | 59 + .../[workspaceId]/templates/create/page.tsx | 49 + .../[workspaceId]/templates/installs/page.tsx | 39 + .../space/[workspaceId]/templates/page.tsx | 75 + apps/builder/src/app/t/[shareToken]/page.tsx | 206 + .../actions/delete-template.action.ts | 14 + .../actions/install-template.action.ts | 78 + .../actions/reinstall-template.action.ts | 37 + .../templates/actions/save-template.action.ts | 36 + .../actions/template-action-client.ts | 24 + .../update-installation-auto-update.action.ts | 22 + .../actions/update-share-settings.action.ts | 21 + .../src/features/templates/api/index.ts | 43 + .../components/category-resource-list.tsx | 213 + .../components/delete-template-dialog.tsx | 80 + .../components/install-auto-update-cell.tsx | 76 + .../components/install-progress-refresher.tsx | 26 + .../components/template-contents-card.tsx | 111 + .../templates/components/template-form.tsx | 211 + .../template-image-upload-field.tsx | 66 + .../components/template-installs-table.tsx | 178 + .../templates/components/templates-table.tsx | 166 + .../templates/components/workspace-picker.tsx | 89 + .../src/features/templates/lib/selection.ts | 33 + .../queries/list-selectable-resources.ts | 180 + .../features/templates/schemas/mutation.ts | 50 + .../builder/src/features/tools/tools-list.tsx | 1 + apps/builder/src/proxy.ts | 4 + apps/builder/src/routers/index.ts | 5 + .../src/default/handlers/install-template.ts | 48 + apps/worker/src/default/worker.ts | 7 + .../template-folder-manifest.test.ts | 127 + .../__tests__/template-install-order.test.ts | 35 + .../template-keywords-adapter.test.ts | 89 + .../__tests__/template-share-token.test.ts | 19 + packages/business/src/index.ts | 1 + .../business/src/integration-webchat/index.ts | 1 + .../src/integration-webchat/service.ts | 86 + .../src/template/adapters/ai-agents.ts | 142 + .../src/template/adapters/ai-functions.ts | 100 + .../src/template/adapters/calendars.ts | 244 + .../template/adapters/entry-point-links.ts | 115 + .../adapters/fb-comment-automations.ts | 155 + .../business/src/template/adapters/flows.ts | 177 + .../business/src/template/adapters/index.ts | 12 + .../src/template/adapters/install-order.ts | 150 + .../src/template/adapters/keywords.ts | 105 + .../adapters/manifests/custom-fields.ts | 54 + .../template/adapters/manifests/folders.ts | 154 + .../adapters/manifests/product-categories.ts | 115 + .../src/template/adapters/manifests/tags.ts | 68 + .../business/src/template/adapters/naming.ts | 38 + .../src/template/adapters/products.ts | 144 + .../src/template/adapters/registry.ts | 87 + .../src/template/adapters/settings.ts | 113 + .../src/template/adapters/triggers.ts | 135 + .../business/src/template/adapters/types.ts | 69 + .../src/template/adapters/webchats.ts | 145 + packages/business/src/template/index.ts | 15 + .../business/src/template/install.service.ts | 396 + .../template/installed-resource.service.ts | 55 + packages/business/src/template/service.ts | 478 + packages/business/src/template/share-token.ts | 45 + .../business/src/template/snapshot.service.ts | 351 + .../20260817114301_add_template/migration.sql | 75 + .../20260817114301_add_template/snapshot.json | 37168 +++++++++++++++ .../migration.sql | 6 + .../snapshot.json | 37246 ++++++++++++++++ packages/database/src/partials/index.ts | 1 + packages/database/src/partials/template.ts | 72 + packages/database/src/relations/index.ts | 6 + .../src/relations/template-installation.ts | 31 + .../relations/template-installed-resource.ts | 19 + packages/database/src/relations/template.ts | 24 + packages/database/src/schema/index.ts | 3 + .../src/schema/template-installation.ts | 104 + .../src/schema/template-installed-resource.ts | 56 + packages/database/src/schema/template.ts | 89 + packages/database/src/types.ts | 5 + packages/flow-config/__tests__/remap.test.ts | 230 + .../__tests__/template-export-schema.test.ts | 84 + .../flow-config/src/import-export/index.ts | 29 + .../src/import-export/reference-fields.ts | 126 + .../src/import-export/references.ts | 205 +- .../flow-config/src/import-export/remap.ts | 328 + .../src/import-export/template-schema.ts | 152 + .../worker-config/src/queues/default/index.ts | 10 + 107 files changed, 83545 insertions(+), 211 deletions(-) create mode 100644 apps/builder/src/app/space/[workspaceId]/templates/[id]/edit/page.tsx create mode 100644 apps/builder/src/app/space/[workspaceId]/templates/create/page.tsx create mode 100644 apps/builder/src/app/space/[workspaceId]/templates/installs/page.tsx create mode 100644 apps/builder/src/app/space/[workspaceId]/templates/page.tsx create mode 100644 apps/builder/src/app/t/[shareToken]/page.tsx create mode 100644 apps/builder/src/features/templates/actions/delete-template.action.ts create mode 100644 apps/builder/src/features/templates/actions/install-template.action.ts create mode 100644 apps/builder/src/features/templates/actions/reinstall-template.action.ts create mode 100644 apps/builder/src/features/templates/actions/save-template.action.ts create mode 100644 apps/builder/src/features/templates/actions/template-action-client.ts create mode 100644 apps/builder/src/features/templates/actions/update-installation-auto-update.action.ts create mode 100644 apps/builder/src/features/templates/actions/update-share-settings.action.ts create mode 100644 apps/builder/src/features/templates/api/index.ts create mode 100644 apps/builder/src/features/templates/components/category-resource-list.tsx create mode 100644 apps/builder/src/features/templates/components/delete-template-dialog.tsx create mode 100644 apps/builder/src/features/templates/components/install-auto-update-cell.tsx create mode 100644 apps/builder/src/features/templates/components/install-progress-refresher.tsx create mode 100644 apps/builder/src/features/templates/components/template-contents-card.tsx create mode 100644 apps/builder/src/features/templates/components/template-form.tsx create mode 100644 apps/builder/src/features/templates/components/template-image-upload-field.tsx create mode 100644 apps/builder/src/features/templates/components/template-installs-table.tsx create mode 100644 apps/builder/src/features/templates/components/templates-table.tsx create mode 100644 apps/builder/src/features/templates/components/workspace-picker.tsx create mode 100644 apps/builder/src/features/templates/lib/selection.ts create mode 100644 apps/builder/src/features/templates/queries/list-selectable-resources.ts create mode 100644 apps/builder/src/features/templates/schemas/mutation.ts create mode 100644 apps/worker/src/default/handlers/install-template.ts create mode 100644 packages/business/__tests__/template-folder-manifest.test.ts create mode 100644 packages/business/__tests__/template-install-order.test.ts create mode 100644 packages/business/__tests__/template-keywords-adapter.test.ts create mode 100644 packages/business/__tests__/template-share-token.test.ts create mode 100644 packages/business/src/integration-webchat/service.ts create mode 100644 packages/business/src/template/adapters/ai-agents.ts create mode 100644 packages/business/src/template/adapters/ai-functions.ts create mode 100644 packages/business/src/template/adapters/calendars.ts create mode 100644 packages/business/src/template/adapters/entry-point-links.ts create mode 100644 packages/business/src/template/adapters/fb-comment-automations.ts create mode 100644 packages/business/src/template/adapters/flows.ts create mode 100644 packages/business/src/template/adapters/index.ts create mode 100644 packages/business/src/template/adapters/install-order.ts create mode 100644 packages/business/src/template/adapters/keywords.ts create mode 100644 packages/business/src/template/adapters/manifests/custom-fields.ts create mode 100644 packages/business/src/template/adapters/manifests/folders.ts create mode 100644 packages/business/src/template/adapters/manifests/product-categories.ts create mode 100644 packages/business/src/template/adapters/manifests/tags.ts create mode 100644 packages/business/src/template/adapters/naming.ts create mode 100644 packages/business/src/template/adapters/products.ts create mode 100644 packages/business/src/template/adapters/registry.ts create mode 100644 packages/business/src/template/adapters/settings.ts create mode 100644 packages/business/src/template/adapters/triggers.ts create mode 100644 packages/business/src/template/adapters/types.ts create mode 100644 packages/business/src/template/adapters/webchats.ts create mode 100644 packages/business/src/template/index.ts create mode 100644 packages/business/src/template/install.service.ts create mode 100644 packages/business/src/template/installed-resource.service.ts create mode 100644 packages/business/src/template/service.ts create mode 100644 packages/business/src/template/share-token.ts create mode 100644 packages/business/src/template/snapshot.service.ts create mode 100644 packages/database/drizzle/20260817114301_add_template/migration.sql create mode 100644 packages/database/drizzle/20260817114301_add_template/snapshot.json create mode 100644 packages/database/drizzle/20260818081114_add_template_install_folder_and_autoupdate/migration.sql create mode 100644 packages/database/drizzle/20260818081114_add_template_install_folder_and_autoupdate/snapshot.json create mode 100644 packages/database/src/partials/template.ts create mode 100644 packages/database/src/relations/template-installation.ts create mode 100644 packages/database/src/relations/template-installed-resource.ts create mode 100644 packages/database/src/relations/template.ts create mode 100644 packages/database/src/schema/template-installation.ts create mode 100644 packages/database/src/schema/template-installed-resource.ts create mode 100644 packages/database/src/schema/template.ts create mode 100644 packages/flow-config/__tests__/remap.test.ts create mode 100644 packages/flow-config/__tests__/template-export-schema.test.ts create mode 100644 packages/flow-config/src/import-export/reference-fields.ts create mode 100644 packages/flow-config/src/import-export/remap.ts create mode 100644 packages/flow-config/src/import-export/template-schema.ts diff --git a/apps/builder/messages/ar.json b/apps/builder/messages/ar.json index a4b24d0d1..270edd3df 100644 --- a/apps/builder/messages/ar.json +++ b/apps/builder/messages/ar.json @@ -145,7 +145,8 @@ "onSuccess": "عند النجاح", "clone": "استنساخ", "remove": "إزالة", - "restore": "استعادة" + "restore": "استعادة", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "يجب أن تكون مسؤولًا فائقًا لمساحة العمل للقيام بذلك." @@ -1220,6 +1221,9 @@ "mcpServer": { "label": "خادم MCP" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "وظيفة النظام", "names": { @@ -1418,9 +1422,11 @@ "label": "الحالة", "pending": "قيد الانتظار", "processing": "قيد المعالجة", + "installing": "Installing", "success": "نجاح", "error": "خطأ", "completed": "مكتمل", + "partial": "Partial", "failed": "فاشل" }, "subtitle": { @@ -3986,7 +3992,56 @@ }, "templates": { "title": "القوالب", - "description": "إنشاء قوالبك وإدارتها." + "description": "إنشاء قوالبك وإدارتها.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "مولّد رمز QR", @@ -4102,6 +4157,18 @@ "unavailableTitle": "إلغاء الاشتراك غير متاح.", "unavailableDescription": "مساحة العمل هذه لم تعد متاحة." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "حذف بياناتي", diff --git a/apps/builder/messages/da.json b/apps/builder/messages/da.json index 49638c773..3fe4e7a6c 100644 --- a/apps/builder/messages/da.json +++ b/apps/builder/messages/da.json @@ -145,7 +145,8 @@ "onSuccess": "På succes", "clone": "Klon", "remove": "Fjern", - "restore": "Gendan" + "restore": "Gendan", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Du skal være super admin for arbejdsområdet for at gøre dette." @@ -1146,6 +1147,9 @@ "mcpServer": { "label": "MCP Server" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "System Function", "names": { @@ -1344,7 +1348,9 @@ "label": "Status", "pending": "Pending", "processing": "Processing", + "installing": "Installing", "completed": "Completed", + "partial": "Partial", "failed": "Failed", "success": "Succes", "error": "Fejl" @@ -4151,7 +4157,56 @@ }, "templates": { "title": "Skabeloner", - "description": "Opret og administrer din skabeloner." + "description": "Opret og administrer din skabeloner.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "QR Kode Generator", @@ -4267,6 +4322,18 @@ "unavailableTitle": "Afmeld unavailable.", "unavailableDescription": "Denne arbejdsområde er ingen longer tilgængelig." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "Slet My Data", diff --git a/apps/builder/messages/de.json b/apps/builder/messages/de.json index b559606eb..b8086129d 100644 --- a/apps/builder/messages/de.json +++ b/apps/builder/messages/de.json @@ -145,7 +145,8 @@ "onSuccess": "Bei Erfolg", "clone": "Klonen", "remove": "Entfernen", - "restore": "Wiederherstellen" + "restore": "Wiederherstellen", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Sie müssen Super-Administrator des Arbeitsbereichs sein, um dies zu tun." @@ -1146,6 +1147,9 @@ "mcpServer": { "label": "MCP-Server" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "Systemfunktion", "names": { @@ -1344,7 +1348,9 @@ "label": "Status", "pending": "Ausstehend", "processing": "In Verarbeitung", + "installing": "Installing", "completed": "Abgeschlossen", + "partial": "Partial", "failed": "Fehlgeschlagen", "success": "Erfolg", "error": "Fehler" @@ -4151,7 +4157,56 @@ }, "templates": { "title": "Vorlagen", - "description": "Erstellen und verwalten Sie Ihre Vorlagen." + "description": "Erstellen und verwalten Sie Ihre Vorlagen.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "QR-Code-Generator", @@ -4267,6 +4322,18 @@ "unavailableTitle": "Abmeldung nicht verfügbar.", "unavailableDescription": "Dieser Arbeitsbereich ist nicht mehr verfügbar." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "Meine Daten löschen", diff --git a/apps/builder/messages/en.json b/apps/builder/messages/en.json index 637f4f244..b49c47b76 100644 --- a/apps/builder/messages/en.json +++ b/apps/builder/messages/en.json @@ -145,7 +145,8 @@ "onSuccess": "On success", "clone": "Clone", "remove": "Remove", - "restore": "Restore" + "restore": "Restore", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "You need to be a workspace super admin to do this." @@ -1226,6 +1227,9 @@ "mcpServer": { "label": "MCP Server" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "System Function", "names": { @@ -1424,7 +1428,9 @@ "label": "Status", "pending": "Pending", "processing": "Processing", + "installing": "Installing", "completed": "Completed", + "partial": "Partial", "failed": "Failed", "success": "Success", "error": "Error" @@ -4424,7 +4430,56 @@ }, "templates": { "title": "Templates", - "description": "Create and manage your templates." + "description": "Create and manage your templates.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "QR Code Generator", @@ -4540,6 +4595,18 @@ "unavailableTitle": "Unsubscribe unavailable.", "unavailableDescription": "This workspace is no longer available." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "bookingPage": { "metadataTitle": "Booking", "comingSoonTitle": "Booking page coming soon", diff --git a/apps/builder/messages/es.json b/apps/builder/messages/es.json index 85ef11e6d..36f527f12 100644 --- a/apps/builder/messages/es.json +++ b/apps/builder/messages/es.json @@ -145,7 +145,8 @@ "onSuccess": "Al completarse", "clone": "Clonar", "remove": "Quitar", - "restore": "Restaurar" + "restore": "Restaurar", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Debes ser superadministrador del espacio de trabajo para hacer esto." @@ -1220,6 +1221,9 @@ "mcpServer": { "label": "Servidor MCP" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "Función del sistema", "names": { @@ -1418,7 +1422,9 @@ "label": "Estado", "pending": "Pendiente", "processing": "Procesando", + "installing": "Installing", "completed": "Completado", + "partial": "Partial", "failed": "Fallido", "success": "Éxito", "error": "Error" @@ -4151,7 +4157,56 @@ }, "templates": { "title": "Plantillas", - "description": "Crear y Gestionar tu plantillas." + "description": "Crear y Gestionar tu plantillas.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "Generador de códigos QR", @@ -4267,6 +4322,18 @@ "unavailableTitle": "Unsubscribe undisponible.", "unavailableDescription": "This workspace es no longer disponible." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "Eliminar My Datos", diff --git a/apps/builder/messages/fi.json b/apps/builder/messages/fi.json index a02cd6336..13095e01c 100644 --- a/apps/builder/messages/fi.json +++ b/apps/builder/messages/fi.json @@ -145,7 +145,8 @@ "onSuccess": "Onnistuessa", "clone": "Kloonaa", "remove": "Poista", - "restore": "Palauta" + "restore": "Palauta", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Sinun täytyy olla työtilan pääylläpitäjä tehdäksesi tämän." @@ -1146,6 +1147,9 @@ "mcpServer": { "label": "MCP-palvelin" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "Järjestelmätoiminto", "names": { @@ -1344,7 +1348,9 @@ "label": "Tila", "pending": "Odottaa", "processing": "Käsitellään", + "installing": "Installing", "completed": "Valmis", + "partial": "Partial", "failed": "Epäonnistui", "success": "Onnistui", "error": "Virhe" @@ -4151,7 +4157,56 @@ }, "templates": { "title": "Mallit", - "description": "Luo ja hallitse mallejasi." + "description": "Luo ja hallitse mallejasi.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "QR-koodigeneraattori", @@ -4267,6 +4322,18 @@ "unavailableTitle": "Tilauksen peruuttaminen ei ole käytettävissä.", "unavailableDescription": "Tämä työtila ei ole enää käytettävissä." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "Poista tietoni", diff --git a/apps/builder/messages/fr.json b/apps/builder/messages/fr.json index 2428b2005..763530c24 100644 --- a/apps/builder/messages/fr.json +++ b/apps/builder/messages/fr.json @@ -145,7 +145,8 @@ "onSuccess": "En cas de réussite", "clone": "Cloner", "remove": "Retirer", - "restore": "Restaurer" + "restore": "Restaurer", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Vous devez être super-administrateur de l’espace de travail pour effectuer cette action." @@ -1146,6 +1147,9 @@ "mcpServer": { "label": "Serveur MCP" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "Fonction système", "names": { @@ -1344,7 +1348,9 @@ "label": "État", "pending": "En attente", "processing": "Traitement en cours", + "installing": "Installing", "completed": "Terminé", + "partial": "Partial", "failed": "Échec", "success": "Réussite", "error": "Erreur" @@ -4151,7 +4157,56 @@ }, "templates": { "title": "Modèles", - "description": "Créez et gérez vos modèles." + "description": "Créez et gérez vos modèles.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "Générateur de codes QR", @@ -4267,6 +4322,18 @@ "unavailableTitle": "Désabonnement indisponible.", "unavailableDescription": "Cet espace de travail n’est plus disponible." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "Supprimer mes données", diff --git a/apps/builder/messages/he.json b/apps/builder/messages/he.json index 5bef2bb0f..9148f3d4e 100644 --- a/apps/builder/messages/he.json +++ b/apps/builder/messages/he.json @@ -145,7 +145,8 @@ "onSuccess": "במקרה של הצלחה", "clone": "שכפול", "remove": "הסרה", - "restore": "שחזור" + "restore": "שחזור", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "עליכם להיות מנהל-על של סביבת העבודה כדי לבצע פעולה זו." @@ -2440,7 +2441,56 @@ }, "templates": { "title": "תבניות", - "description": "יצירה וניהול של התבניות שלכם." + "description": "יצירה וניהול של התבניות שלכם.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "מחולל קודי QR", @@ -2556,6 +2606,18 @@ "unavailableTitle": "ביטול ההרשמה אינו זמין.", "unavailableDescription": "סביבת עבודה זו אינה זמינה עוד." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "מחיקת הנתונים שלי", @@ -3537,6 +3599,9 @@ "mcpServer": { "label": "שרת MCP" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "פונקציית מערכת", "names": { @@ -3735,7 +3800,9 @@ "label": "מצב", "pending": "ממתין", "processing": "בעיבוד", + "installing": "Installing", "completed": "הושלם", + "partial": "Partial", "failed": "נכשל", "success": "הצלחה", "error": "שגיאה" diff --git a/apps/builder/messages/id.json b/apps/builder/messages/id.json index 5598f79a4..e060933e3 100644 --- a/apps/builder/messages/id.json +++ b/apps/builder/messages/id.json @@ -145,7 +145,8 @@ "onSuccess": "Saat berhasil", "clone": "Klon", "remove": "Hapus", - "restore": "Pulihkan" + "restore": "Pulihkan", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Anda harus menjadi super admin workspace untuk melakukan ini." @@ -1146,6 +1147,9 @@ "mcpServer": { "label": "Server MCP" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "Fungsi Sistem", "names": { @@ -1344,7 +1348,9 @@ "label": "Status", "pending": "Menunggu", "processing": "Sedang diproses", + "installing": "Installing", "completed": "Selesai", + "partial": "Partial", "failed": "Gagal", "success": "Berhasil", "error": "Kesalahan" @@ -4151,7 +4157,56 @@ }, "templates": { "title": "Templat", - "description": "Buat dan kelola templat Anda." + "description": "Buat dan kelola templat Anda.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "Pembuat Kode QR", @@ -4267,6 +4322,18 @@ "unavailableTitle": "Berhenti berlangganan tidak tersedia.", "unavailableDescription": "Ruang kerja ini tidak lagi tersedia." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "Hapus Data Saya", diff --git a/apps/builder/messages/it.json b/apps/builder/messages/it.json index 442a5a5b5..93cec4cb8 100644 --- a/apps/builder/messages/it.json +++ b/apps/builder/messages/it.json @@ -528,6 +528,9 @@ "mcpServer": { "label": "Server MCP" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "Funzione di sistema", "names": { @@ -726,7 +729,9 @@ "label": "Stato", "pending": "In attesa", "processing": "In elaborazione", + "installing": "Installing", "completed": "Completato", + "partial": "Partial", "failed": "Non riuscito", "success": "Operazione riuscita", "error": "Errore" @@ -1510,7 +1515,8 @@ "onSuccess": "In caso di successo", "clone": "Clona", "remove": "Rimuovi", - "restore": "Ripristina" + "restore": "Ripristina", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Devi essere super admin dello spazio di lavoro per farlo." @@ -4151,7 +4157,56 @@ }, "templates": { "title": "Modelli", - "description": "Crea e gestisci i tuoi modelli." + "description": "Crea e gestisci i tuoi modelli.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "Generatore di codici QR", @@ -4267,6 +4322,18 @@ "unavailableTitle": "Annullamento dell'iscrizione non disponibile.", "unavailableDescription": "Questa area di lavoro non è più disponibile." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "Elimina i miei dati", diff --git a/apps/builder/messages/ja.json b/apps/builder/messages/ja.json index 553002ff0..3419b15b4 100644 --- a/apps/builder/messages/ja.json +++ b/apps/builder/messages/ja.json @@ -145,7 +145,8 @@ "onSuccess": "成功時", "clone": "複製", "remove": "削除", - "restore": "復元" + "restore": "復元", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "この操作を行うには、ワークスペースのスーパー管理者である必要があります。" @@ -1146,6 +1147,9 @@ "mcpServer": { "label": "MCPサーバー" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "システム関数", "names": { @@ -1344,7 +1348,9 @@ "label": "ステータス", "pending": "保留中", "processing": "処理中", + "installing": "Installing", "completed": "完了", + "partial": "Partial", "failed": "失敗", "success": "成功", "error": "エラー" @@ -4151,7 +4157,56 @@ }, "templates": { "title": "テンプレート", - "description": "テンプレートを作成・管理します。" + "description": "テンプレートを作成・管理します。", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "QRコード生成", @@ -4267,6 +4322,18 @@ "unavailableTitle": "配信を停止できません。", "unavailableDescription": "このワークスペースは利用できなくなりました。" }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "自分のデータを削除", diff --git a/apps/builder/messages/nl.json b/apps/builder/messages/nl.json index f53ca23bc..657265127 100644 --- a/apps/builder/messages/nl.json +++ b/apps/builder/messages/nl.json @@ -145,7 +145,8 @@ "onSuccess": "Bij succes", "clone": "Klonen", "remove": "Verwijderen", - "restore": "Herstellen" + "restore": "Herstellen", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Je moet superbeheerder van de werkruimte zijn om dit te doen." @@ -960,6 +961,9 @@ "mcpServer": { "label": "MCP-server" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "Systeemfunctie", "names": { @@ -1158,7 +1162,9 @@ "label": "Status", "pending": "In behandeling", "processing": "Wordt verwerkt", + "installing": "Installing", "completed": "Voltooid", + "partial": "Partial", "failed": "Mislukt", "success": "Geslaagd", "error": "Fout" @@ -4151,7 +4157,56 @@ }, "templates": { "title": "Sjablonen", - "description": "Maak en beheer je sjablonen." + "description": "Maak en beheer je sjablonen.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "QR-codegenerator", @@ -4267,6 +4322,18 @@ "unavailableTitle": "Afmelden niet beschikbaar.", "unavailableDescription": "Deze werkruimte is niet meer beschikbaar." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "Mijn gegevens verwijderen", diff --git a/apps/builder/messages/pt-BR.json b/apps/builder/messages/pt-BR.json index 22bf314b1..e999797b8 100644 --- a/apps/builder/messages/pt-BR.json +++ b/apps/builder/messages/pt-BR.json @@ -145,7 +145,8 @@ "onSuccess": "Em caso de sucesso", "clone": "Clonar", "remove": "Remover", - "restore": "Restaurar" + "restore": "Restaurar", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Você precisa ser um superadministrador do espaço de trabalho para fazer isso." @@ -1146,6 +1147,9 @@ "mcpServer": { "label": "Servidor MCP" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "Função do sistema", "names": { @@ -1344,7 +1348,9 @@ "label": "Status", "pending": "Pendente", "processing": "Processando", + "installing": "Installing", "completed": "Concluído", + "partial": "Partial", "failed": "Falhou", "success": "Sucesso", "error": "Erro" @@ -4151,7 +4157,56 @@ }, "templates": { "title": "Modelos", - "description": "Crie e gerencie seus modelos." + "description": "Crie e gerencie seus modelos.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "Gerador de códigos QR", @@ -4267,6 +4322,18 @@ "unavailableTitle": "Cancelamento de inscrição indisponível.", "unavailableDescription": "Este espaço de trabalho não está mais disponível." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "Excluir meus dados", diff --git a/apps/builder/messages/pt-PT.json b/apps/builder/messages/pt-PT.json index e2b1605ae..5d9aeb65e 100644 --- a/apps/builder/messages/pt-PT.json +++ b/apps/builder/messages/pt-PT.json @@ -145,7 +145,8 @@ "onSuccess": "Em caso de sucesso", "clone": "Clonar", "remove": "Remover", - "restore": "Restaurar" + "restore": "Restaurar", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Tem de ser um superadministrador do espaço de trabalho para fazer isto." @@ -1146,6 +1147,9 @@ "mcpServer": { "label": "Servidor MCP" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "Função do sistema", "names": { @@ -1344,7 +1348,9 @@ "label": "Estado", "pending": "Pendente", "processing": "Em processamento", + "installing": "Installing", "completed": "Concluído", + "partial": "Partial", "failed": "Falhou", "success": "Sucesso", "error": "Erro" @@ -4151,7 +4157,56 @@ }, "templates": { "title": "Modelos", - "description": "Crie e faça a gestão dos seus modelos." + "description": "Crie e faça a gestão dos seus modelos.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "Gerador de códigos QR", @@ -4267,6 +4322,18 @@ "unavailableTitle": "Cancelamento de subscrição indisponível.", "unavailableDescription": "Este espaço de trabalho já não está disponível." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "Eliminar os meus dados", diff --git a/apps/builder/messages/ro.json b/apps/builder/messages/ro.json index 218995afc..23a6a67a0 100644 --- a/apps/builder/messages/ro.json +++ b/apps/builder/messages/ro.json @@ -892,7 +892,8 @@ "onSuccess": "La reușită", "clone": "Clonează", "remove": "Elimină", - "restore": "Restaurează" + "restore": "Restaurează", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Trebuie să fii superadministrator al spațiului de lucru pentru a face acest lucru." @@ -1893,6 +1894,9 @@ "mcpServer": { "label": "Server MCP" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "Funcție de sistem", "names": { @@ -2091,7 +2095,9 @@ "label": "Stare", "pending": "În așteptare", "processing": "În curs de procesare", + "installing": "Installing", "completed": "Finalizat", + "partial": "Partial", "failed": "Eșuat", "success": "Succes", "error": "Eroare" @@ -4686,7 +4692,56 @@ }, "templates": { "description": "Creează și gestionează șabloanele tale.", - "title": "Șabloane" + "title": "Șabloane", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "tiktok": { "description": "Conectează-ți contul TikTok pentru a răspunde la mesajele directe.", @@ -4701,6 +4756,18 @@ "unavailableDescription": "Acest spațiu de lucru nu mai este disponibil.", "unavailableTitle": "Dezabonare indisponibilă." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "bookingWebview": { "metadataTitle": "Programează o întâlnire", "badge": "Programare", diff --git a/apps/builder/messages/sv.json b/apps/builder/messages/sv.json index ed3f4b918..d234b50b5 100644 --- a/apps/builder/messages/sv.json +++ b/apps/builder/messages/sv.json @@ -149,7 +149,8 @@ "uploadFile": "Ladda upp fil", "view": "Visa", "viewAnalytics": "Visa analys", - "wait": "Vänta" + "wait": "Vänta", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Du måste vara superadministratör för arbetsytan för att göra detta." @@ -2018,6 +2019,9 @@ "mcpServer": { "label": "MCP-server" }, + "template": { + "label": "Template" + }, "me": { "label": "Länk till mina data" }, @@ -2379,11 +2383,13 @@ }, "status": { "completed": "Slutförd", + "partial": "Partial", "error": "Fel", "failed": "Misslyckades", "label": "Status", "pending": "Väntande", "processing": "Bearbetas", + "installing": "Installing", "success": "Lyckades" }, "statusCode": { @@ -4234,7 +4240,56 @@ }, "templates": { "description": "Skapa och hantera dina mallar.", - "title": "Mallar" + "title": "Mallar", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "texts": { "or": "eller" @@ -4323,6 +4378,18 @@ "unavailableDescription": "Den här arbetsytan är inte längre tillgänglig.", "unavailableTitle": "Avregistrering är inte tillgänglig." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "userPersistentMenus": { "title": "Beständiga användarmenyer" }, diff --git a/apps/builder/messages/tr.json b/apps/builder/messages/tr.json index b79bcd3db..b2b994131 100644 --- a/apps/builder/messages/tr.json +++ b/apps/builder/messages/tr.json @@ -145,7 +145,8 @@ "onSuccess": "Başarı durumunda", "clone": "Klonla", "remove": "Kaldır", - "restore": "Geri Yükle" + "restore": "Geri Yükle", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Bunu yapmak için çalışma alanı süper yöneticisi olmanız gerekir." @@ -1220,6 +1221,9 @@ "mcpServer": { "label": "MCP Sunucusu" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "Sistem İşlevi", "names": { @@ -1418,7 +1422,9 @@ "label": "Durum", "pending": "Bekliyor", "processing": "İşleniyor", + "installing": "Installing", "completed": "Tamamlandı", + "partial": "Partial", "failed": "Başarısız", "success": "Başarılı", "error": "Hata" @@ -4151,7 +4157,56 @@ }, "templates": { "title": "Şablonlar", - "description": "Şablonlarınızı oluşturun ve yönetin." + "description": "Şablonlarınızı oluşturun ve yönetin.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "QR Kod Oluşturucu", @@ -4267,6 +4322,18 @@ "unavailableTitle": "Abonelikten çıkma kullanılamıyor.", "unavailableDescription": "Bu çalışma alanı artık kullanılamıyor." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "Verilerimi Sil", diff --git a/apps/builder/messages/vi.json b/apps/builder/messages/vi.json index 2a7c959ee..5e0ba1349 100644 --- a/apps/builder/messages/vi.json +++ b/apps/builder/messages/vi.json @@ -145,7 +145,8 @@ "onSuccess": "Khi thành công", "clone": "Nhân bản", "remove": "Xóa", - "restore": "Khôi phục" + "restore": "Khôi phục", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "Bạn cần là super admin của workspace để thực hiện thao tác này." @@ -1190,6 +1191,9 @@ "mcpServer": { "label": "MCP Server" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "Hàm hệ thống", "names": { @@ -1388,7 +1392,9 @@ "label": "Trạng thái", "pending": "Đang chờ", "processing": "Đang xử lý", + "installing": "Installing", "completed": "Hoàn tất", + "partial": "Partial", "failed": "Thất bại", "success": "Thành công", "error": "Lỗi" @@ -4324,7 +4330,56 @@ }, "templates": { "title": "Mẫu", - "description": "Tạo và quản lý các mẫu của bạn." + "description": "Tạo và quản lý các mẫu của bạn.", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "Trình tạo mã QR", @@ -4444,6 +4499,18 @@ "unavailableTitle": "Không thể hủy đăng ký.", "unavailableDescription": "Không gian làm việc này không còn khả dụng." }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "bookingPage": { "metadataTitle": "Đặt lịch", "comingSoonTitle": "Trang đặt lịch sắp ra mắt", diff --git a/apps/builder/messages/zh-CN.json b/apps/builder/messages/zh-CN.json index a875cf8eb..ea6edeae3 100644 --- a/apps/builder/messages/zh-CN.json +++ b/apps/builder/messages/zh-CN.json @@ -149,7 +149,8 @@ "uploadFile": "上传文件", "view": "查看", "viewAnalytics": "查看分析", - "wait": "等等" + "wait": "等等", + "loadMore": "Load more" }, "activeCampaign": { "automations": { @@ -2026,6 +2027,9 @@ "mcpServer": { "label": "MCP服务器" }, + "template": { + "label": "Template" + }, "me": { "label": "我的数据链接" }, @@ -2382,11 +2386,13 @@ }, "status": { "completed": "已完成", + "partial": "Partial", "error": "错误", "failed": "失败", "label": "状态", "pending": "待定", "processing": "处理中", + "installing": "Installing", "success": "成功" }, "statusCode": { @@ -4234,7 +4240,56 @@ }, "templates": { "description": "创建并管理您的范本。", - "title": "范本" + "title": "范本", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "texts": { "or": "或" @@ -4323,6 +4378,18 @@ "unavailableDescription": "此工作区不再可用。", "unavailableTitle": "无法取消订阅。" }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "userPersistentMenus": { "title": "用户常驻菜单" }, diff --git a/apps/builder/messages/zh-TW.json b/apps/builder/messages/zh-TW.json index 22229e7ab..be417554e 100644 --- a/apps/builder/messages/zh-TW.json +++ b/apps/builder/messages/zh-TW.json @@ -536,6 +536,9 @@ "mcpServer": { "label": "MCP伺服器" }, + "template": { + "label": "Template" + }, "systemFunction": { "label": "系統功能", "names": { @@ -726,7 +729,9 @@ "label": "狀態", "pending": "待定", "processing": "處理中", + "installing": "Installing", "completed": "已完成", + "partial": "Partial", "failed": "失敗", "success": "成功", "error": "錯誤" @@ -1661,7 +1666,8 @@ "onSuccess": "成功", "clone": "複製", "remove": "移除", - "restore": "還原" + "restore": "還原", + "loadMore": "Load more" }, "errors": { "superAdminRequired": "您需要是工作區的超級管理員才能執行此操作。" @@ -4184,7 +4190,56 @@ }, "templates": { "title": "範本", - "description": "建立並管理您的範本。" + "description": "建立並管理您的範本。", + "share": { + "label": "Share", + "enabled": "Shared", + "disabled": "Not shared" + }, + "installs": { + "title": "Installs", + "resources": "Resources", + "warnings": "Warnings", + "completedAt": "Completed at", + "autoUpdate": "Auto-update", + "updateNow": "Update now", + "updateStarted": "Update started" + }, + "form": { + "contents": "Template contents", + "comingSoon": "Coming soon", + "selectAll": "Select all", + "selectedCount": "{count} selected", + "details": "Details", + "permissions": "Default permissions", + "allowEdit": "Allow editing after install", + "allowDelete": "Allow deleting after install", + "publisherName": "Publisher name", + "youtubeVideoId": "YouTube video ID", + "testLink": "Test link", + "imageUrl": "Cover image", + "installBehavior": "Install behavior", + "createInstallFolder": "Install into a dedicated folder", + "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", + "defaultAutoUpdate": "Flag installs for updates by default", + "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + }, + "categories": { + "flows": "Flows", + "customFields": "Custom fields", + "tags": "Tags", + "products": "Products", + "productCategories": "Product categories", + "aiFunctions": "AI functions", + "aiAgents": "AI agents", + "calendars": "Calendars", + "webchats": "Webchats", + "keywords": "Keywords", + "entryPointLinks": "Entry point links", + "triggers": "Triggers", + "fbCommentAutomations": "Facebook comment automations", + "settings": "Settings" + } }, "qrCodeGenerator": { "title": "QR Code 產生器", @@ -4300,6 +4355,18 @@ "unavailableTitle": "無法取消訂閱。", "unavailableDescription": "此工作區不再可用。" }, + "templatesPublicPage": { + "invalidTitle": "This link is no longer available.", + "invalidDescription": "This template share link is invalid, disabled, or has expired.", + "byPublisher": "By {publisherName}", + "includes": "This template includes", + "tryItOut": "Try it out", + "signInToInstall": "Sign in to install", + "selectWorkspace": "Select a workspace", + "install": "Install", + "installStarted": "Install started", + "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + }, "extensionsMe": { "actions": { "delete": "刪除我的資料", diff --git a/apps/builder/src/app/space/[workspaceId]/templates/[id]/edit/page.tsx b/apps/builder/src/app/space/[workspaceId]/templates/[id]/edit/page.tsx new file mode 100644 index 000000000..11958ddda --- /dev/null +++ b/apps/builder/src/app/space/[workspaceId]/templates/[id]/edit/page.tsx @@ -0,0 +1,59 @@ +import { templateService } from "@chatbotx.io/business" +import { getIdFromParams } from "@chatbotx.io/utils" +import { notFound } from "next/navigation" +import { getTranslations } from "next-intl/server" +import { AppBreadcrumb } from "@/components/app-breadcrumb" +import { TemplateForm } from "@/features/templates/components/template-form" +import { hasWorkspacePermission } from "@/lib/auth/permission-routes" +import { getCurrentUserAndTargetWorkspace } from "@/lib/auth/utils" + +export default async function EditTemplatePage({ + params, +}: { + params: Promise<{ workspaceId: string; id: string }> +}) { + const resolvedParams = await params + const workspaceId = getIdFromParams(resolvedParams, "workspaceId") + const id = getIdFromParams(resolvedParams, "id") + if (!(workspaceId && id)) { + return notFound() + } + + const userAndWorkspace = await getCurrentUserAndTargetWorkspace(workspaceId) + if ( + !( + userAndWorkspace && + hasWorkspacePermission( + userAndWorkspace.targetWorkspaceMember.permissions, + "superAdmin", + ) + ) + ) { + return notFound() + } + + const template = await templateService + .findByIdOrFail({ workspaceId, templateId: id }) + .catch(() => null) + if (!template) { + return notFound() + } + + const t = await getTranslations() + + return ( +
+ + +
+ ) +} diff --git a/apps/builder/src/app/space/[workspaceId]/templates/create/page.tsx b/apps/builder/src/app/space/[workspaceId]/templates/create/page.tsx new file mode 100644 index 000000000..42dbf12c7 --- /dev/null +++ b/apps/builder/src/app/space/[workspaceId]/templates/create/page.tsx @@ -0,0 +1,49 @@ +import { getIdFromParams } from "@chatbotx.io/utils" +import { notFound } from "next/navigation" +import { getTranslations } from "next-intl/server" +import { AppBreadcrumb } from "@/components/app-breadcrumb" +import { TemplateForm } from "@/features/templates/components/template-form" +import { hasWorkspacePermission } from "@/lib/auth/permission-routes" +import { getCurrentUserAndTargetWorkspace } from "@/lib/auth/utils" + +export default async function CreateTemplatePage({ + params, +}: { + params: Promise<{ workspaceId: string }> +}) { + const workspaceId = getIdFromParams(await params, "workspaceId") + if (!workspaceId) { + return notFound() + } + + const userAndWorkspace = await getCurrentUserAndTargetWorkspace(workspaceId) + if ( + !( + userAndWorkspace && + hasWorkspacePermission( + userAndWorkspace.targetWorkspaceMember.permissions, + "superAdmin", + ) + ) + ) { + return notFound() + } + + const t = await getTranslations() + + return ( +
+ + +
+ ) +} diff --git a/apps/builder/src/app/space/[workspaceId]/templates/installs/page.tsx b/apps/builder/src/app/space/[workspaceId]/templates/installs/page.tsx new file mode 100644 index 000000000..d57fa7178 --- /dev/null +++ b/apps/builder/src/app/space/[workspaceId]/templates/installs/page.tsx @@ -0,0 +1,39 @@ +import { templateService } from "@chatbotx.io/business" +import { getIdFromParams } from "@chatbotx.io/utils" +import { notFound } from "next/navigation" +import { getTranslations } from "next-intl/server" +import { AppBreadcrumb } from "@/components/app-breadcrumb" +import { TemplateInstallsTable } from "@/features/templates/components/template-installs-table" + +export default async function TemplateInstallsPage({ + params, +}: { + params: Promise<{ workspaceId: string }> +}) { + const workspaceId = getIdFromParams(await params, "workspaceId") + if (!workspaceId) { + return notFound() + } + + const t = await getTranslations() + const installations = await templateService.listInstallations(workspaceId) + + return ( +
+ + +
+ ) +} diff --git a/apps/builder/src/app/space/[workspaceId]/templates/page.tsx b/apps/builder/src/app/space/[workspaceId]/templates/page.tsx new file mode 100644 index 000000000..732d7c6c4 --- /dev/null +++ b/apps/builder/src/app/space/[workspaceId]/templates/page.tsx @@ -0,0 +1,75 @@ +import { templateService } from "@chatbotx.io/business" +import { Button } from "@chatbotx.io/ui/components/ui/button" +import { getIdFromParams } from "@chatbotx.io/utils" +import { PlusIcon } from "lucide-react" +import Link from "next/link" +import { notFound } from "next/navigation" +import { getTranslations } from "next-intl/server" +import { AppBreadcrumb } from "@/components/app-breadcrumb" +import { TemplatesTable } from "@/features/templates/components/templates-table" +import { hasWorkspacePermission } from "@/lib/auth/permission-routes" +import { getCurrentUserAndTargetWorkspace } from "@/lib/auth/utils" + +export default async function TemplatesPage({ + params, +}: { + params: Promise<{ workspaceId: string }> +}) { + const workspaceId = getIdFromParams(await params, "workspaceId") + if (!workspaceId) { + return notFound() + } + + const userAndWorkspace = await getCurrentUserAndTargetWorkspace(workspaceId) + const isSuperAdmin = Boolean( + userAndWorkspace && + hasWorkspacePermission( + userAndWorkspace.targetWorkspaceMember.permissions, + "superAdmin", + ), + ) + + const t = await getTranslations() + const templates = await templateService.list(workspaceId) + + return ( +
+ +
+

+ {t("templates.description")} +

+
+
+
+ +
+ ) +} diff --git a/apps/builder/src/app/t/[shareToken]/page.tsx b/apps/builder/src/app/t/[shareToken]/page.tsx new file mode 100644 index 000000000..92cd2cfb0 --- /dev/null +++ b/apps/builder/src/app/t/[shareToken]/page.tsx @@ -0,0 +1,206 @@ +import { templateService, workspaceMemberService } from "@chatbotx.io/business" +import { getPublicFileUrl } from "@chatbotx.io/utils" +import type { Metadata } from "next" +import { getTranslations } from "next-intl/server" +import { WorkspacePicker } from "@/features/templates/components/workspace-picker" +import { getTenantSettings } from "@/features/tenant/utils" +import { hasWorkspacePermission } from "@/lib/auth/permission-routes" +import { getCurrentUser } from "@/lib/auth/utils" + +export const metadata: Metadata = { + title: "Template", +} + +type PublicTemplatePageProps = { + params: Promise<{ shareToken: string }> +} + +/** + * Every failure mode — bad token, disabled share, expired — collapses into + * the same generic invalid-link message via one try/catch, mirroring + * `/unsubscribe`. The page must never be a token-existence oracle. + */ +export default async function PublicTemplatePage( + props: PublicTemplatePageProps, +) { + const { shareToken } = await props.params + const [t, tCategories] = await Promise.all([ + getTranslations("templatesPublicPage"), + getTranslations("templates.categories"), + ]) + + const template = await templateService.findPublicByShareToken(shareToken) + if (!template) { + return ( + + ) + } + + const [user, { storageUrl }] = await Promise.all([ + getCurrentUser(), + getTenantSettings(), + ]) + const imageUrl = template.imageUrl + ? getPublicFileUrl(template.imageUrl, storageUrl) + : null + + return ( +
+ {imageUrl ? ( + // biome-ignore lint/performance/noImgElement: external, unoptimized template thumbnail resolved from publisher-uploaded storage + {template.name} + ) : null} +
+

{template.name}

+ {template.publisherName ? ( +

+ {t("byPublisher", { publisherName: template.publisherName })} +

+ ) : null} +
+ {template.description ? ( +

{template.description}

+ ) : null} + + {template.testLink ? ( + + {t("tryItOut")} + + ) : null} + + {user ? ( + + ) : ( + + )} +
+ ) +} + +async function InstallSection({ + shareToken, + tenantId, + userId, +}: { + shareToken: string + tenantId: string + userId: string +}) { + const t = await getTranslations("templatesPublicPage") + const members = await workspaceMemberService.listByUserId({ userId }) + + // The tenant filter here is UI convenience only — `installTemplateAction` + // re-checks both membership (via `workspaceActionClient`) and the + // same-tenant gate (via `templateService.assertInstallable`) server-side, + // so a forged workspace id in a direct action call still fails. + const installableWorkspaces = members + .filter( + (member) => + member.workspace.tenantId === tenantId && + hasWorkspacePermission(member.permissions, "superAdmin"), + ) + .map((member) => member.workspace) + + if (installableWorkspaces.length === 0) { + return ( +

+ {t("noEligibleWorkspaces")} +

+ ) + } + + return ( + + ) +} + +function SignInPrompt({ + shareToken, + label, +}: { + shareToken: string + label: string +}) { + return ( + + {label} + + ) +} + +function TemplateCategorySummary({ + categoryCounts, + label, + categoryLabel, +}: { + categoryCounts: Record + label: string + categoryLabel: (category: string) => string +}) { + const nonZeroCategories = Object.entries(categoryCounts).filter( + ([, count]) => count > 0, + ) + if (nonZeroCategories.length === 0) { + return null + } + return ( +
+

{label}

+
    + {nonZeroCategories.map(([category, count]) => ( +
  • + {categoryLabel(category)} ({count}) +
  • + ))} +
+
+ ) +} + +function TemplateMessage({ + title, + description, +}: { + title: string + description: string +}) { + return ( +
+
+

{title}

+

{description}

+
+
+ ) +} diff --git a/apps/builder/src/features/templates/actions/delete-template.action.ts b/apps/builder/src/features/templates/actions/delete-template.action.ts new file mode 100644 index 000000000..785f79e96 --- /dev/null +++ b/apps/builder/src/features/templates/actions/delete-template.action.ts @@ -0,0 +1,14 @@ +"use server" + +import { templateService } from "@chatbotx.io/business" +import { zodBigintAsString } from "@chatbotx.io/utils" +import { templateActionClient } from "./template-action-client" + +export const deleteTemplateAction = templateActionClient + .bindArgsSchemas([zodBigintAsString(), zodBigintAsString()]) + .action(async (props) => { + const { + bindArgsParsedInputs: [workspaceId, templateId], + } = props + await templateService.softDelete({ workspaceId, templateId }) + }) diff --git a/apps/builder/src/features/templates/actions/install-template.action.ts b/apps/builder/src/features/templates/actions/install-template.action.ts new file mode 100644 index 000000000..1285a9190 --- /dev/null +++ b/apps/builder/src/features/templates/actions/install-template.action.ts @@ -0,0 +1,78 @@ +"use server" + +import { templateService } from "@chatbotx.io/business" +import { ChatbotXException } from "@chatbotx.io/business/errors" +import { zodBigintAsString } from "@chatbotx.io/utils" +import { DefaultJobAction, defaultQueue } from "@chatbotx.io/worker-config" +import { hasWorkspacePermission } from "@/lib/auth/permission-routes" +import { workspaceActionClient } from "@/lib/safe-action" +import { installTemplateRequest } from "../schemas/mutation" + +/** + * Binds the *user-chosen* target workspace as a bound arg (not part of the + * free-form input), the same way every other workspace-scoped action does — + * `workspaceActionClient` re-validates the caller's membership in that + * workspace server-side, so a forged workspace id in the request fails at + * the client layer before this action body even runs. + * `templateService.assertInstallable` then enforces the same-tenant gate on + * top of that membership check. + * + * Follows the `import-products.action.ts` shape: create the tracking row + * first, enqueue inside a try, and mark the row failed on enqueue failure + * so it is never left stuck at `pending`. + */ +export const installTemplateAction = workspaceActionClient + .bindArgsSchemas([zodBigintAsString()]) + .inputSchema(installTemplateRequest) + .action( + async ({ + ctx: { user, workspaceMemberPermissions }, + bindArgsParsedInputs: [targetWorkspaceId], + parsedInput, + }) => { + // The public landing page's workspace picker already filters to + // superAdmin workspaces, but that is a UI convenience — a member + // could still call this action directly with a workspace id from + // elsewhere, so the real gate lives here. + if (!hasWorkspacePermission(workspaceMemberPermissions, "superAdmin")) { + throw new ChatbotXException( + "You need to be a super admin to install a template into this workspace", + "templateInstallSuperAdminRequired", + 403, + ) + } + + const { template } = await templateService.assertInstallable({ + shareToken: parsedInput.shareToken, + targetWorkspaceId, + }) + + const installation = await templateService.createInstallationRecord({ + workspaceId: targetWorkspaceId, + installedBy: user.id, + template, + }) + + try { + await defaultQueue.add( + DefaultJobAction.installTemplate, + { + type: DefaultJobAction.installTemplate, + data: { + installationId: installation.id, + workspaceId: targetWorkspaceId, + }, + }, + { jobId: `install-template-${installation.id}` }, + ) + } catch (error) { + await templateService.markInstallationFailed({ + installationId: installation.id, + errorMessage: "Unable to queue template install", + }) + throw error + } + + return { installationId: installation.id } + }, + ) diff --git a/apps/builder/src/features/templates/actions/reinstall-template.action.ts b/apps/builder/src/features/templates/actions/reinstall-template.action.ts new file mode 100644 index 000000000..a012017a6 --- /dev/null +++ b/apps/builder/src/features/templates/actions/reinstall-template.action.ts @@ -0,0 +1,37 @@ +"use server" + +import { templateService } from "@chatbotx.io/business" +import { zodBigintAsString } from "@chatbotx.io/utils" +import { DefaultJobAction, defaultQueue } from "@chatbotx.io/worker-config" +import { templateActionClient } from "./template-action-client" + +/** + * Re-enqueues the same `installTemplate` worker job against an *existing* + * installation id — reuses the install pipeline as-is (`wasExisting` + * tracking on each adapter makes a re-run idempotent-ish rather than + * duplicating resources). Resets `status` to `pending` first so the row + * can't be read mid-transition, then marks it failed if the enqueue itself + * throws, mirroring `installTemplateAction`. + */ +export const reinstallTemplateAction = templateActionClient + .bindArgsSchemas([zodBigintAsString(), zodBigintAsString()]) + .action(async ({ bindArgsParsedInputs: [workspaceId, installationId] }) => { + await templateService.prepareReinstall({ workspaceId, installationId }) + + try { + await defaultQueue.add( + DefaultJobAction.installTemplate, + { + type: DefaultJobAction.installTemplate, + data: { installationId, workspaceId }, + }, + { jobId: `install-template-${installationId}-${Date.now()}` }, + ) + } catch (error) { + await templateService.markInstallationFailed({ + installationId, + errorMessage: "Unable to queue template reinstall", + }) + throw error + } + }) diff --git a/apps/builder/src/features/templates/actions/save-template.action.ts b/apps/builder/src/features/templates/actions/save-template.action.ts new file mode 100644 index 000000000..74c605b4d --- /dev/null +++ b/apps/builder/src/features/templates/actions/save-template.action.ts @@ -0,0 +1,36 @@ +"use server" + +import { templateService } from "@chatbotx.io/business" +import { workspaceIdrequestParams } from "@/features/common/schemas" +import { saveTemplateRequest } from "../schemas/mutation" +import { templateActionClient } from "./template-action-client" + +export const saveTemplateAction = templateActionClient + .bindArgsSchemas(workspaceIdrequestParams) + .inputSchema(saveTemplateRequest) + .action( + async ({ + ctx: { user, workspace }, + bindArgsParsedInputs: [workspaceId], + parsedInput, + }) => { + const template = await templateService.createOrUpdate({ + workspaceId, + tenantId: workspace.tenantId, + createdBy: user.id, + name: parsedInput.name, + description: parsedInput.description, + imageUrl: parsedInput.imageUrl, + publisherName: parsedInput.publisherName, + youtubeVideoId: parsedInput.youtubeVideoId, + testLink: parsedInput.testLink, + selection: parsedInput.selection, + defaultPermissions: parsedInput.defaultPermissions, + createInstallFolder: parsedInput.createInstallFolder, + defaultAutoUpdate: parsedInput.defaultAutoUpdate, + existingTemplateId: parsedInput.templateId, + }) + + return { templateId: template.id } + }, + ) diff --git a/apps/builder/src/features/templates/actions/template-action-client.ts b/apps/builder/src/features/templates/actions/template-action-client.ts new file mode 100644 index 000000000..f46d19468 --- /dev/null +++ b/apps/builder/src/features/templates/actions/template-action-client.ts @@ -0,0 +1,24 @@ +import { ChatbotXException } from "@chatbotx.io/business/errors" +import { hasWorkspacePermission } from "@/lib/auth/permission-routes" +import { workspaceActionClient } from "@/lib/safe-action" + +/** + * Shared gate for every template mutation action — applies + * `hasWorkspacePermission(ctx.workspaceMemberPermissions, "superAdmin")` + * once, so a new action can't forget it. `workspaceActionClient` alone only + * verifies membership; page-level guards are bypassable by calling an + * action directly (see `update-webchat.action.ts`'s comment for the same + * precedent), so this check has to live in the action layer too. + */ +export const templateActionClient = workspaceActionClient.use( + ({ ctx, next }) => { + if (!hasWorkspacePermission(ctx.workspaceMemberPermissions, "superAdmin")) { + throw new ChatbotXException( + "You need to be a super admin to manage templates", + "templateSuperAdminRequired", + 403, + ) + } + return next() + }, +) diff --git a/apps/builder/src/features/templates/actions/update-installation-auto-update.action.ts b/apps/builder/src/features/templates/actions/update-installation-auto-update.action.ts new file mode 100644 index 000000000..07a2816cd --- /dev/null +++ b/apps/builder/src/features/templates/actions/update-installation-auto-update.action.ts @@ -0,0 +1,22 @@ +"use server" + +import { templateService } from "@chatbotx.io/business" +import { zodBigintAsString } from "@chatbotx.io/utils" +import { z } from "zod" +import { templateActionClient } from "./template-action-client" + +export const updateInstallationAutoUpdateAction = templateActionClient + .bindArgsSchemas([zodBigintAsString(), zodBigintAsString()]) + .inputSchema(z.object({ autoUpdate: z.boolean() })) + .action( + async ({ + bindArgsParsedInputs: [workspaceId, installationId], + parsedInput, + }) => { + await templateService.updateInstallationAutoUpdate({ + workspaceId, + installationId, + autoUpdate: parsedInput.autoUpdate, + }) + }, + ) diff --git a/apps/builder/src/features/templates/actions/update-share-settings.action.ts b/apps/builder/src/features/templates/actions/update-share-settings.action.ts new file mode 100644 index 000000000..462590160 --- /dev/null +++ b/apps/builder/src/features/templates/actions/update-share-settings.action.ts @@ -0,0 +1,21 @@ +"use server" + +import { templateService } from "@chatbotx.io/business" +import { workspaceIdrequestParams } from "@/features/common/schemas" +import { updateShareSettingsRequest } from "../schemas/mutation" +import { templateActionClient } from "./template-action-client" + +export const updateShareSettingsAction = templateActionClient + .bindArgsSchemas(workspaceIdrequestParams) + .inputSchema(updateShareSettingsRequest) + .action(async ({ bindArgsParsedInputs: [workspaceId], parsedInput }) => { + const template = await templateService.updateShareSettings({ + workspaceId, + templateId: parsedInput.templateId, + shareEnabled: parsedInput.shareEnabled, + shareExpiresAt: parsedInput.shareExpiresAt + ? new Date(parsedInput.shareExpiresAt) + : null, + }) + return { shareToken: template.shareToken } + }) diff --git a/apps/builder/src/features/templates/api/index.ts b/apps/builder/src/features/templates/api/index.ts new file mode 100644 index 000000000..04a2b81a7 --- /dev/null +++ b/apps/builder/src/features/templates/api/index.ts @@ -0,0 +1,43 @@ +import { templateCategories } from "@chatbotx.io/database/partials" +import { zodBigintAsString } from "@chatbotx.io/utils" +import { z } from "zod" +import { withWorkspaceIdSchema } from "@/features/workspaces/schema/resource" +import { workspaceAuthorizedMidddleware } from "@/middlewares/auth" +import { authorizedAPI } from "@/orpc" +import { listSelectableResources } from "../queries/list-selectable-resources" + +const listSelectableResourcesRequest = z.object({ + category: templateCategories, + keyword: z.string().trim().max(255).optional(), + cursor: z.string().optional(), + limit: z.number().int().min(1).max(200).optional(), +}) + +const selectableResourceItemSchema = z.object({ + id: zodBigintAsString(), + name: z.string(), + folderName: z.string().optional(), +}) + +const listSelectableResourcesResponse = z.object({ + items: z.array(selectableResourceItemSchema), + nextCursor: z.string().nullable(), + total: z.number(), + allIds: z.array(zodBigintAsString()).optional(), +}) + +const listSelectableResourcesAPI = authorizedAPI + .route({ + method: "GET", + path: "/workspaces/{workspaceId}/templates/selectable-resources", + summary: "List resources selectable for a template, by category", + tags: ["Templates"], + }) + .input(listSelectableResourcesRequest.and(withWorkspaceIdSchema)) + .use(workspaceAuthorizedMidddleware, (input) => input.workspaceId) + .output(listSelectableResourcesResponse) + .handler(async ({ input }) => await listSelectableResources(input)) + +export const templatesAPI = { + listSelectableResourcesAPI, +} diff --git a/apps/builder/src/features/templates/components/category-resource-list.tsx b/apps/builder/src/features/templates/components/category-resource-list.tsx new file mode 100644 index 000000000..a03c5f1f8 --- /dev/null +++ b/apps/builder/src/features/templates/components/category-resource-list.tsx @@ -0,0 +1,213 @@ +"use client" + +import type { TemplateCategory } from "@chatbotx.io/database/partials" +import { Button } from "@chatbotx.io/ui/components/ui/button" +import { Checkbox } from "@chatbotx.io/ui/components/ui/checkbox" +import { Input } from "@chatbotx.io/ui/components/ui/input" +import { Label } from "@chatbotx.io/ui/components/ui/label" +import { ScrollArea } from "@chatbotx.io/ui/components/ui/scroll-area" +import { useDebouncedCallback } from "@chatbotx.io/ui/hooks/use-debounced-callback" +import { SearchIcon } from "lucide-react" +import { useTranslations } from "next-intl" +import { useEffect, useState } from "react" +import { client } from "@/lib/orpc/orpc" +import type { CategorySelectionState } from "../lib/selection" + +const PAGE_SIZE = 100 +const SEARCH_DEBOUNCE_MS = 300 + +type ResourceItem = { + id: string + name: string + folderName?: string +} + +type CategoryResourceListProps = { + workspaceId: string + category: TemplateCategory + selection: CategorySelectionState + onChange: (next: CategorySelectionState) => void +} + +/** + * Lazy per-category loader — only fetches once this category's accordion + * row is expanded (`initialized` gates the effect so re-expanding never + * refetches), following the `ig-comment-posts-store.ts` shape but as local + * component state since there is no cross-component sharing need here. + * + * Tri-state select-all uses the checkbox's native `indeterminate` prop. + * Unchecking a single row while `mode:"all"` downgrades the selection to an + * explicit id list built from `allIds` (returned by the endpoint whenever + * `total <= 1000`), so the downgrade is exact rather than limited to + * whatever page happens to be loaded. + */ +export function CategoryResourceList({ + workspaceId, + category, + selection, + onChange, +}: CategoryResourceListProps) { + const t = useTranslations() + const [items, setItems] = useState([]) + const [allIds, setAllIds] = useState(undefined) + const [total, setTotal] = useState(0) + const [nextCursor, setNextCursor] = useState(null) + const [keyword, setKeyword] = useState("") + const [loading, setLoading] = useState(false) + const [initialized, setInitialized] = useState(false) + + const fetchPage = async (cursor: string | null, searchKeyword: string) => { + setLoading(true) + try { + const result = await client.templatesAPI.listSelectableResourcesAPI({ + workspaceId, + category, + keyword: searchKeyword || undefined, + cursor: cursor ?? undefined, + limit: PAGE_SIZE, + }) + setItems((current) => + cursor ? [...current, ...result.items] : result.items, + ) + setNextCursor(result.nextCursor) + setTotal(result.total) + if (!cursor) { + setAllIds(result.allIds) + } + } finally { + setLoading(false) + } + } + + useEffect(() => { + if (initialized) { + return + } + setInitialized(true) + fetchPage(null, "") + // biome-ignore lint/correctness/useExhaustiveDependencies: fetch-once-on-mount is intentional, see comment above + }, [initialized, fetchPage]) + + const debouncedSearch = useDebouncedCallback((value: string) => { + fetchPage(null, value) + }, SEARCH_DEBOUNCE_MS) + + const selectedIds = + selection.mode === "ids" ? new Set(selection.ids) : undefined + const isAllMode = selection.mode === "all" + const selectedCount = isAllMode ? total : (selectedIds?.size ?? 0) + + const isRowChecked = (id: string): boolean => + isAllMode ? true : (selectedIds?.has(id) ?? false) + + const toggleRow = (id: string, checked: boolean) => { + if (isAllMode) { + // Downgrading from "all" to an explicit list — start from every known + // id (exact when `allIds` was returned) minus the row just unchecked. + const base = allIds ?? items.map((item) => item.id) + const next = checked ? base : base.filter((itemId) => itemId !== id) + onChange({ mode: "ids", ids: next }) + return + } + const current = selection.mode === "ids" ? selection.ids : [] + const next = checked + ? [...new Set([...current, id])] + : current.filter((itemId) => itemId !== id) + onChange({ mode: "ids", ids: next }) + } + + const toggleSelectAll = (checked: boolean) => { + if (!checked) { + onChange({ mode: "ids", ids: [] }) + return + } + onChange(allIds ? { mode: "ids", ids: allIds } : { mode: "all" as const }) + } + + const allPageRowsSelected = + items.length > 0 && items.every((item) => isRowChecked(item.id)) + const somePageRowsSelected = + items.some((item) => isRowChecked(item.id)) && !allPageRowsSelected + + return ( +
+
+
+ + { + setKeyword(event.target.value) + debouncedSearch(event.target.value) + }} + placeholder={t("actions.search")} + value={keyword} + /> +
+ + {t("templates.form.selectedCount", { count: selectedCount })} + +
+ +
+ toggleSelectAll(Boolean(checked))} + /> + +
+ + +
+ {items.map((item) => ( +
+ + toggleRow(item.id, Boolean(checked)) + } + /> + + {item.folderName ? ( + + {item.folderName} + + ) : null} +
+ ))} + {items.length === 0 && !loading ? ( +

+ {t("actions.noRecordFound")} +

+ ) : null} +
+
+ + {nextCursor ? ( + + ) : null} +
+ ) +} diff --git a/apps/builder/src/features/templates/components/delete-template-dialog.tsx b/apps/builder/src/features/templates/components/delete-template-dialog.tsx new file mode 100644 index 000000000..c2afc6257 --- /dev/null +++ b/apps/builder/src/features/templates/components/delete-template-dialog.tsx @@ -0,0 +1,80 @@ +"use client" + +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, +} from "@chatbotx.io/ui/components/ui/alert-dialog" +import { Loader2Icon } from "lucide-react" +import { useRouter } from "next/navigation" +import { useTranslations } from "next-intl" +import { useAction } from "next-safe-action/hooks" +import { toast } from "sonner" +import { deleteTemplateAction } from "../actions/delete-template.action" + +type DeleteTemplateDialogProps = { + workspaceId: string + templateId: string + open: boolean + onOpenChange: (open: boolean) => void +} + +export function DeleteTemplateDialog({ + workspaceId, + templateId, + open, + onOpenChange, +}: DeleteTemplateDialogProps) { + const t = useTranslations() + const router = useRouter() + + const { execute, isPending } = useAction( + deleteTemplateAction.bind(null, workspaceId, templateId), + { + onSuccess: () => { + toast.success( + t("messages.deletedSuccess", { feature: t("fields.template.label") }), + ) + onOpenChange(false) + router.refresh() + }, + onError: ({ error }) => { + if (error.serverError) { + toast.error(error.serverError) + } + }, + }, + ) + + return ( + + + + + {t("messages.deleteFeature", { + feature: t("fields.template.label"), + })} + + + {t("messages.deleteConfirmation", { + feature: t("fields.template.label"), + name: "", + })} + + + + {t("actions.cancel")} + execute()}> + {isPending && } + {t("actions.confirm")} + + + + + ) +} diff --git a/apps/builder/src/features/templates/components/install-auto-update-cell.tsx b/apps/builder/src/features/templates/components/install-auto-update-cell.tsx new file mode 100644 index 000000000..47c3f196e --- /dev/null +++ b/apps/builder/src/features/templates/components/install-auto-update-cell.tsx @@ -0,0 +1,76 @@ +"use client" + +import { Button } from "@chatbotx.io/ui/components/ui/button" +import { Switch } from "@chatbotx.io/ui/components/ui/switch" +import { Loader2Icon } from "lucide-react" +import { useRouter } from "next/navigation" +import { useTranslations } from "next-intl" +import { useAction } from "next-safe-action/hooks" +import { toast } from "sonner" +import { reinstallTemplateAction } from "../actions/reinstall-template.action" +import { updateInstallationAutoUpdateAction } from "../actions/update-installation-auto-update.action" + +type InstallAutoUpdateCellProps = { + workspaceId: string + installationId: string + autoUpdate: boolean + updateAvailable: boolean +} + +export function InstallAutoUpdateCell({ + workspaceId, + installationId, + autoUpdate, + updateAvailable, +}: InstallAutoUpdateCellProps) { + const t = useTranslations() + const router = useRouter() + + const { execute: executeToggle, isPending: isToggling } = useAction( + updateInstallationAutoUpdateAction.bind(null, workspaceId, installationId), + { + onSuccess: () => router.refresh(), + onError: ({ error }) => { + if (error.serverError) { + toast.error(error.serverError) + } + }, + }, + ) + + const { execute: executeReinstall, isPending: isReinstalling } = useAction( + reinstallTemplateAction.bind(null, workspaceId, installationId), + { + onSuccess: () => { + toast.success(t("templates.installs.updateStarted")) + router.refresh() + }, + onError: ({ error }) => { + if (error.serverError) { + toast.error(error.serverError) + } + }, + }, + ) + + return ( +
+ executeToggle({ autoUpdate: checked })} + /> + {updateAvailable ? ( + + ) : null} +
+ ) +} diff --git a/apps/builder/src/features/templates/components/install-progress-refresher.tsx b/apps/builder/src/features/templates/components/install-progress-refresher.tsx new file mode 100644 index 000000000..d4cbe9ba3 --- /dev/null +++ b/apps/builder/src/features/templates/components/install-progress-refresher.tsx @@ -0,0 +1,26 @@ +"use client" + +import { useRouter } from "next/navigation" +import { useEffect } from "react" + +const REFRESH_INTERVAL_MS = 3000 + +/** + * Polls the server component tree via `router.refresh()` while any + * installation on this page is still `pending`/`installing`. Renders + * nothing — purely a side-effect component, unmounted by the parent once + * every row has settled (see `hasPendingWork` in + * `template-installs-table.tsx`), so the interval naturally stops. + */ +export function InstallProgressRefresher() { + const router = useRouter() + + useEffect(() => { + const interval = setInterval(() => { + router.refresh() + }, REFRESH_INTERVAL_MS) + return () => clearInterval(interval) + }, [router]) + + return null +} diff --git a/apps/builder/src/features/templates/components/template-contents-card.tsx b/apps/builder/src/features/templates/components/template-contents-card.tsx new file mode 100644 index 000000000..be399ec48 --- /dev/null +++ b/apps/builder/src/features/templates/components/template-contents-card.tsx @@ -0,0 +1,111 @@ +"use client" + +import type { TemplateCategory } from "@chatbotx.io/database/partials" +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from "@chatbotx.io/ui/components/ui/accordion" +import { Badge } from "@chatbotx.io/ui/components/ui/badge" +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from "@chatbotx.io/ui/components/ui/card" +import { useTranslations } from "next-intl" +import type { + CategorySelectionState, + TemplateSelectionFormState, +} from "../lib/selection" +import { selectionCount } from "../lib/selection" +import { CategoryResourceList } from "./category-resource-list" + +/** + * Categories with a working `listSelectableResources` collector + + * snapshot-service `mode:"all"` resolver. The rest render a disabled row + * with a "coming soon" note rather than a broken picker — see + * `snapshot.service.ts`'s `resolveSelectionIds` TODO for the matching + * backend gap. + */ +const AVAILABLE_CATEGORIES: readonly TemplateCategory[] = [ + "flows", + "tags", + "customFields", +] + +const ALL_CATEGORIES: readonly TemplateCategory[] = [ + "flows", + "customFields", + "tags", + "products", + "productCategories", + "aiFunctions", + "aiAgents", + "calendars", + "webchats", + "keywords", + "entryPointLinks", + "triggers", + "fbCommentAutomations", + "settings", +] + +type TemplateContentsCardProps = { + workspaceId: string + selection: TemplateSelectionFormState + onChange: (category: TemplateCategory, next: CategorySelectionState) => void +} + +export function TemplateContentsCard({ + workspaceId, + selection, + onChange, +}: TemplateContentsCardProps) { + const t = useTranslations() + + return ( + + + {t("templates.form.contents")} + + + + {ALL_CATEGORIES.map((category) => { + const isAvailable = AVAILABLE_CATEGORIES.includes(category) + const count = selectionCount(selection[category]) + return ( + + + + {t(`templates.categories.${category}`)} + {isAvailable ? ( + count > 0 && {count} + ) : ( + + {t("templates.form.comingSoon")} + + )} + + + {isAvailable ? ( + + onChange(category, next)} + selection={ + selection[category] ?? { mode: "ids", ids: [] } + } + workspaceId={workspaceId} + /> + + ) : null} + + ) + })} + + + + ) +} diff --git a/apps/builder/src/features/templates/components/template-form.tsx b/apps/builder/src/features/templates/components/template-form.tsx new file mode 100644 index 000000000..2ff0f405a --- /dev/null +++ b/apps/builder/src/features/templates/components/template-form.tsx @@ -0,0 +1,211 @@ +"use client" + +import type { TemplateCategory } from "@chatbotx.io/database/partials" +import type { TemplateModel } from "@chatbotx.io/database/types" +import { InputField } from "@chatbotx.io/ui/components/form/input-field" +import { SwitchField } from "@chatbotx.io/ui/components/form/switch-field" +import { TextareaField } from "@chatbotx.io/ui/components/form/textarea-field" +import { Button } from "@chatbotx.io/ui/components/ui/button" +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from "@chatbotx.io/ui/components/ui/card" +import { Form } from "@chatbotx.io/ui/components/ui/form" +import { getPublicFileUrl } from "@chatbotx.io/utils" +import { zodResolver } from "@hookform/resolvers/zod" +import { useHookFormAction } from "@next-safe-action/adapter-react-hook-form/hooks" +import { Loader2Icon } from "lucide-react" +import { useRouter } from "next/navigation" +import { useTranslations } from "next-intl" +import { useWatch } from "react-hook-form" +import { toast } from "sonner" +import { useTenantSettings } from "@/features/tenant" +import { saveTemplateAction } from "../actions/save-template.action" +import type { + CategorySelectionState, + TemplateSelectionFormState, +} from "../lib/selection" +import { saveTemplateRequest } from "../schemas/mutation" +import { TemplateContentsCard } from "./template-contents-card" +import { TemplateImageUploadField } from "./template-image-upload-field" + +type TemplateFormProps = { + workspaceId: string + template?: TemplateModel +} + +export function TemplateForm({ workspaceId, template }: TemplateFormProps) { + const t = useTranslations() + const router = useRouter() + const isEdit = Boolean(template) + const { storageUrl } = useTenantSettings() + + const { form, handleSubmitWithAction } = useHookFormAction( + saveTemplateAction.bind(null, workspaceId), + zodResolver(saveTemplateRequest), + { + actionProps: { + onSuccess: ({ data }) => { + toast.success( + t(isEdit ? "messages.updatedSuccess" : "messages.createdSuccess", { + feature: t("fields.template.label"), + }), + ) + if (isEdit) { + router.refresh() + } else if (data?.templateId) { + router.push( + `/space/${workspaceId}/templates/${data.templateId}/edit`, + ) + } else { + router.push(`/space/${workspaceId}/templates`) + } + }, + onError: ({ error }) => { + if (error.serverError) { + toast.error(error.serverError) + } + }, + }, + formProps: { + mode: "onChange", + defaultValues: { + templateId: template?.id, + name: template?.name ?? "", + description: template?.description ?? "", + imageUrl: template?.imageUrl ?? "", + publisherName: template?.publisherName ?? "", + youtubeVideoId: template?.youtubeVideoId ?? "", + testLink: template?.testLink ?? "", + selection: template?.selection ?? {}, + defaultPermissions: template?.defaultPermissions ?? { + allowEdit: true, + allowDelete: true, + }, + createInstallFolder: template?.createInstallFolder ?? false, + defaultAutoUpdate: template?.defaultAutoUpdate ?? false, + }, + }, + }, + ) + + const selection = (useWatch({ control: form.control, name: "selection" }) ?? + {}) as TemplateSelectionFormState + const imageUrl = useWatch({ control: form.control, name: "imageUrl" }) + + const handleSelectionChange = ( + category: TemplateCategory, + next: CategorySelectionState, + ) => { + form.setValue( + "selection", + { ...selection, [category]: next }, + { shouldValidate: true, shouldDirty: true }, + ) + } + + return ( +
+ + + + {t("templates.form.details")} + + + + +
+

+ {t("templates.form.imageUrl")} +

+ + form.setValue("imageUrl", path, { shouldDirty: true }) + } + previewUrl={ + imageUrl ? getPublicFileUrl(imageUrl, storageUrl) : undefined + } + uploadLabel={t("actions.uploadFile")} + uploadPath={`public/space/${workspaceId}/templates`} + workspaceId={workspaceId} + /> +
+ + + +
+
+ + + + + + {t("templates.form.permissions")} + + + + + + + + + + {t("templates.form.installBehavior")} + + + + + + + +
+ + +
+ + + ) +} diff --git a/apps/builder/src/features/templates/components/template-image-upload-field.tsx b/apps/builder/src/features/templates/components/template-image-upload-field.tsx new file mode 100644 index 000000000..ccfe1ffbc --- /dev/null +++ b/apps/builder/src/features/templates/components/template-image-upload-field.tsx @@ -0,0 +1,66 @@ +"use client" + +import { Button } from "@chatbotx.io/ui/components/ui/button" +import { DirectUploadButton } from "@chatbotx.io/ui/components/uploader/direct-upload-button" +import { cn } from "@chatbotx.io/ui/lib/utils" +import { ImageIcon } from "lucide-react" +import { useRef } from "react" +import { toast } from "sonner" + +type TemplateImageUploadFieldProps = { + previewUrl: string | undefined + uploadPath: string + workspaceId: string + uploadLabel: string + onUploaded: (path: string) => void +} + +export function TemplateImageUploadField({ + previewUrl, + uploadPath, + workspaceId, + uploadLabel, + onUploaded, +}: TemplateImageUploadFieldProps) { + const triggerRef = useRef(null) + + return ( + <> + { + toast.error(error.message) + }} + onUploadSuccess={(filePath) => { + onUploaded(filePath) + }} + triggerRef={triggerRef} + uploadPath={uploadPath} + workspaceId={workspaceId} + /> + + + ) +} diff --git a/apps/builder/src/features/templates/components/template-installs-table.tsx b/apps/builder/src/features/templates/components/template-installs-table.tsx new file mode 100644 index 000000000..178ce11d7 --- /dev/null +++ b/apps/builder/src/features/templates/components/template-installs-table.tsx @@ -0,0 +1,178 @@ +"use client" + +import type { TemplateInstallationStatus } from "@chatbotx.io/database/partials" +import type { TemplateInstallationModel } from "@chatbotx.io/database/types" +import { DataTable } from "@chatbotx.io/ui/components/data-table/data-table" +import { DataTableColumnHeader } from "@chatbotx.io/ui/components/data-table/data-table-column-header" +import { Badge } from "@chatbotx.io/ui/components/ui/badge" +import { useDataTable } from "@chatbotx.io/ui/hooks/use-data-table" +import type { ColumnDef } from "@tanstack/react-table" +import { format } from "date-fns" +import { useTranslations } from "next-intl" +import { useMemo } from "react" +import { InstallAutoUpdateCell } from "./install-auto-update-cell" +import { InstallProgressRefresher } from "./install-progress-refresher" + +type TemplateInstallationRow = TemplateInstallationModel & { + updateAvailable: boolean +} + +type TemplateInstallsTableProps = { + workspaceId: string + installations: TemplateInstallationRow[] +} + +const STATUS_VARIANTS: Record< + TemplateInstallationStatus, + "default" | "secondary" | "destructive" | "outline" +> = { + pending: "secondary", + installing: "default", + completed: "outline", + partial: "outline", + failed: "destructive", +} + +const hasPendingWork = (installations: TemplateInstallationRow[]): boolean => + installations.some( + (installation) => + installation.status === "pending" || installation.status === "installing", + ) + +export function TemplateInstallsTable({ + workspaceId, + installations, +}: TemplateInstallsTableProps) { + const t = useTranslations() + + const columns = useMemo[]>( + () => [ + { + accessorKey: "templateName", + size: 260, + header: ({ column }) => ( + + ), + cell: ({ row }) => ( +
+ {row.original.templateName} +
+ ), + enableSorting: false, + enableHiding: false, + }, + { + accessorKey: "status", + size: 120, + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const status = row.original.status + const labelKey = `fields.status.${status}` as const + return ( + + {t.has(labelKey) ? t(labelKey) : status} + + ) + }, + enableSorting: false, + enableHiding: false, + }, + { + accessorKey: "resourceCount", + size: 120, + header: t("templates.installs.resources"), + cell: ({ row }) => ( + {row.original.resourceCount} + ), + enableSorting: false, + enableHiding: false, + }, + { + accessorKey: "warningCount", + size: 120, + header: t("templates.installs.warnings"), + cell: ({ row }) => { + const { warningCount } = row.original + if (warningCount === 0) { + return 0 + } + // A completed-with-warnings install (status "partial") is not a + // failure — amber, not red — mirroring + // `import-history-table.tsx`'s warning-only treatment. + return ( + {warningCount} + ) + }, + enableSorting: false, + enableHiding: false, + }, + { + accessorKey: "createdAt", + size: 150, + header: ({ column }) => ( + + ), + cell: ({ row }) => format(row.original.createdAt, "yyyy/MM/dd HH:mm"), + enableSorting: true, + enableHiding: false, + }, + { + accessorKey: "completedAt", + size: 150, + header: t("templates.installs.completedAt"), + cell: ({ row }) => + row.original.completedAt + ? format(row.original.completedAt, "yyyy/MM/dd HH:mm") + : "—", + enableSorting: false, + enableHiding: false, + }, + { + accessorKey: "autoUpdate", + size: 220, + header: t("templates.installs.autoUpdate"), + cell: ({ row }) => ( + + ), + enableSorting: false, + enableHiding: false, + }, + ], + [t, workspaceId], + ) + + const { table } = useDataTable({ + data: installations, + columns, + pageCount: 1, + initialState: { + sorting: [{ id: "createdAt", desc: true }], + }, + getRowId: (row) => row.id, + shallow: false, + clearOnDefault: true, + }) + + return ( + <> + {hasPendingWork(installations) ? : null} + + + ) +} diff --git a/apps/builder/src/features/templates/components/templates-table.tsx b/apps/builder/src/features/templates/components/templates-table.tsx new file mode 100644 index 000000000..0c24c06f2 --- /dev/null +++ b/apps/builder/src/features/templates/components/templates-table.tsx @@ -0,0 +1,166 @@ +"use client" + +import type { TemplateModel } from "@chatbotx.io/database/types" +import { DataTable } from "@chatbotx.io/ui/components/data-table/data-table" +import { DataTableColumnHeader } from "@chatbotx.io/ui/components/data-table/data-table-column-header" +import { Badge } from "@chatbotx.io/ui/components/ui/badge" +import { Button } from "@chatbotx.io/ui/components/ui/button" +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@chatbotx.io/ui/components/ui/dropdown-menu" +import { useDataTable } from "@chatbotx.io/ui/hooks/use-data-table" +import type { ColumnDef } from "@tanstack/react-table" +import { format } from "date-fns" +import { MoreHorizontalIcon, PencilIcon, Trash2Icon } from "lucide-react" +import { useRouter } from "next/navigation" +import { useTranslations } from "next-intl" +import { useMemo, useState } from "react" +import { DeleteTemplateDialog } from "./delete-template-dialog" + +type TemplatesTableProps = { + workspaceId: string + templates: TemplateModel[] + isSuperAdmin: boolean +} + +export function TemplatesTable({ + workspaceId, + templates, + isSuperAdmin, +}: TemplatesTableProps) { + const t = useTranslations() + const router = useRouter() + const [deletingTemplate, setDeletingTemplate] = + useState(null) + + const columns = useMemo[]>( + () => [ + { + accessorKey: "name", + size: 260, + header: ({ column }) => ( + + ), + cell: ({ row }) => ( +
{row.original.name}
+ ), + enableSorting: false, + enableHiding: false, + }, + { + id: "shareStatus", + size: 140, + header: t("templates.share.label"), + cell: ({ row }) => ( + + {row.original.shareEnabled + ? t("templates.share.enabled") + : t("templates.share.disabled")} + + ), + enableSorting: false, + enableHiding: false, + }, + { + accessorKey: "installCount", + size: 120, + header: t("templates.installs.title"), + cell: ({ row }) => ( + {row.original.installCount} + ), + enableSorting: false, + enableHiding: false, + }, + { + accessorKey: "createdAt", + size: 150, + header: ({ column }) => ( + + ), + cell: ({ row }) => format(row.original.createdAt, "yyyy/MM/dd HH:mm"), + enableSorting: true, + enableHiding: false, + }, + { + id: "action", + size: 10, + header: ({ column }) => ( + + ), + cell: ({ row }) => ( + + + + {t("actions.openMenu")} + + } + /> + + {isSuperAdmin && ( + + router.push( + `/space/${workspaceId}/templates/${row.original.id}/edit`, + ) + } + > + + {t("actions.edit")} + + )} + setDeletingTemplate(row.original)} + variant="destructive" + > + + {t("actions.delete")} + + + + ), + enableSorting: false, + enableHiding: false, + }, + ], + [t, router, workspaceId, isSuperAdmin], + ) + + const { table } = useDataTable({ + data: templates, + columns, + pageCount: 1, + initialState: { + sorting: [{ id: "createdAt", desc: true }], + }, + getRowId: (row) => row.id, + shallow: false, + clearOnDefault: true, + }) + + return ( + <> + + { + if (!open) { + setDeletingTemplate(null) + } + }} + open={Boolean(deletingTemplate)} + templateId={deletingTemplate?.id ?? ""} + workspaceId={workspaceId} + /> + + ) +} diff --git a/apps/builder/src/features/templates/components/workspace-picker.tsx b/apps/builder/src/features/templates/components/workspace-picker.tsx new file mode 100644 index 000000000..0f8039b83 --- /dev/null +++ b/apps/builder/src/features/templates/components/workspace-picker.tsx @@ -0,0 +1,89 @@ +"use client" + +import { Button } from "@chatbotx.io/ui/components/ui/button" +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@chatbotx.io/ui/components/ui/select" +import { useRouter } from "next/navigation" +import { useTranslations } from "next-intl" +import { useAction } from "next-safe-action/hooks" +import { useState } from "react" +import { toast } from "sonner" +import { installTemplateAction } from "../actions/install-template.action" + +type WorkspaceOption = { + id: string + name: string +} + +type WorkspacePickerProps = { + shareToken: string + workspaces: WorkspaceOption[] +} + +/** + * The install action returns only `{installationId}` — it never means the + * install already finished — so on success this only toasts "started" and + * routes to the installs status page, never "installed". + */ +export function WorkspacePicker({ + shareToken, + workspaces, +}: WorkspacePickerProps) { + const t = useTranslations("templatesPublicPage") + const router = useRouter() + const [selectedWorkspaceId, setSelectedWorkspaceId] = useState( + workspaces[0]?.id, + ) + + const { execute, isPending } = useAction( + installTemplateAction.bind(null, selectedWorkspaceId ?? ""), + { + onSuccess: () => { + toast.success(t("installStarted")) + if (selectedWorkspaceId) { + router.push(`/space/${selectedWorkspaceId}/templates/installs`) + } + }, + onError: ({ error }) => { + if (error.serverError) { + toast.error(error.serverError) + } + }, + }, + ) + + return ( +
+ + +
+ ) +} diff --git a/apps/builder/src/features/templates/lib/selection.ts b/apps/builder/src/features/templates/lib/selection.ts new file mode 100644 index 000000000..1bfb28a71 --- /dev/null +++ b/apps/builder/src/features/templates/lib/selection.ts @@ -0,0 +1,33 @@ +import type { TemplateCategory } from "@chatbotx.io/database/partials" + +/** + * `"all"` stays a sentinel in the form — it is expanded server-side at save + * time (see `buildTemplateSnapshot`), never materialized on the client. The + * client only ever has the currently-loaded page, so resolving "all" here + * would silently under-select under pagination. + */ +export type CategorySelectionState = + | { mode: "all" } + | { mode: "ids"; ids: string[] } + +export type TemplateSelectionFormState = Partial< + Record +> + +export const EMPTY_SELECTION: CategorySelectionState = { + mode: "ids", + ids: [], +} + +export const selectionCount = ( + selection: CategorySelectionState | undefined, + totalHint?: number, +): number => { + if (!selection) { + return 0 + } + if (selection.mode === "all") { + return totalHint ?? 0 + } + return selection.ids.length +} diff --git a/apps/builder/src/features/templates/queries/list-selectable-resources.ts b/apps/builder/src/features/templates/queries/list-selectable-resources.ts new file mode 100644 index 000000000..0a9bca668 --- /dev/null +++ b/apps/builder/src/features/templates/queries/list-selectable-resources.ts @@ -0,0 +1,180 @@ +import { db, relationsFilterToSQL } from "@chatbotx.io/database/client" +import type { TemplateCategory } from "@chatbotx.io/database/partials" +import { + customFieldModel, + flowModel, + tagModel, +} from "@chatbotx.io/database/schema" +import { likeContains } from "@chatbotx.io/database/utils" + +const PAGE_SIZE = 100 +const ALL_IDS_CAP = 1000 + +export type SelectableResourceItem = { + id: string + name: string + folderName?: string +} + +export type ListSelectableResourcesResult = { + items: SelectableResourceItem[] + nextCursor: string | null + total: number + allIds?: string[] +} + +/** + * One unified query for the template picker's category tabs, so the picker + * depends on a single seam rather than each category's own incompatible + * list-query signature. Search is server-side `ilike` (never client-side + * `.toLowerCase()`, which is locale-broken for Vietnamese names). Returns + * `allIds` alongside page 1 whenever `total <= ALL_IDS_CAP`, so a + * `mode:"all"` -> uncheck-one-row downgrade on the client can be exact + * instead of guessing at what "all" means. + * + * Only `flows`/`tags`/`customFields` are wired so far — every other + * category returns an empty page rather than throwing, so the picker UI + * can ship incrementally as each category's snapshot collector lands. + */ +export const listSelectableResources = async (input: { + workspaceId: string + category: TemplateCategory + keyword?: string | null + cursor?: string | null + limit?: number | null +}): Promise => { + const limit = input.limit ?? PAGE_SIZE + const offset = input.cursor ? Number.parseInt(input.cursor, 10) || 0 : 0 + + switch (input.category) { + case "flows": + return await listFlows(input.workspaceId, input.keyword, offset, limit) + case "tags": + return await listTags(input.workspaceId, input.keyword, offset, limit) + case "customFields": + return await listCustomFields( + input.workspaceId, + input.keyword, + offset, + limit, + ) + default: + return { items: [], nextCursor: null, total: 0 } + } +} + +const buildAllIds = async ( + offset: number, + total: number, + findAllIds: () => Promise, +): Promise => + offset === 0 && total <= ALL_IDS_CAP ? await findAllIds() : undefined + +const listFlows = async ( + workspaceId: string, + keyword: string | null | undefined, + offset: number, + limit: number, +): Promise => { + const where = { + workspaceId, + name: keyword ? { ilike: likeContains(keyword) } : undefined, + } + + const [rows, total] = await Promise.all([ + db.query.flowModel.findMany({ + where, + columns: { id: true, name: true }, + limit, + offset, + orderBy: { name: "asc" }, + }), + db.$count(flowModel, relationsFilterToSQL(flowModel, where)), + ]) + + const allIds = await buildAllIds(offset, total, async () => + (await db.query.flowModel.findMany({ where, columns: { id: true } })).map( + (row) => row.id, + ), + ) + + return { + items: rows.map((row) => ({ id: row.id, name: row.name })), + nextCursor: offset + rows.length < total ? String(offset + limit) : null, + total, + allIds, + } +} + +const listTags = async ( + workspaceId: string, + keyword: string | null | undefined, + offset: number, + limit: number, +): Promise => { + const where = { + workspaceId, + deletedAt: { isNull: true as const }, + name: keyword ? { ilike: likeContains(keyword) } : undefined, + } + + const [rows, total] = await Promise.all([ + db.query.tagModel.findMany({ + where, + columns: { id: true, name: true }, + limit, + offset, + orderBy: { name: "asc" }, + }), + db.$count(tagModel, relationsFilterToSQL(tagModel, where)), + ]) + + const allIds = await buildAllIds(offset, total, async () => + (await db.query.tagModel.findMany({ where, columns: { id: true } })).map( + (row) => row.id, + ), + ) + + return { + items: rows.map((row) => ({ id: row.id, name: row.name })), + nextCursor: offset + rows.length < total ? String(offset + limit) : null, + total, + allIds, + } +} + +const listCustomFields = async ( + workspaceId: string, + keyword: string | null | undefined, + offset: number, + limit: number, +): Promise => { + const where = { + workspaceId, + name: keyword ? { ilike: likeContains(keyword) } : undefined, + } + + const [rows, total] = await Promise.all([ + db.query.customFieldModel.findMany({ + where, + columns: { id: true, name: true }, + limit, + offset, + orderBy: { name: "asc" }, + }), + db.$count(customFieldModel, relationsFilterToSQL(customFieldModel, where)), + ]) + + const allIds = await buildAllIds(offset, total, async () => + ( + await db.query.customFieldModel.findMany({ where, columns: { id: true } }) + ).map((row) => row.id), + ) + + return { + items: rows.map((row) => ({ id: row.id, name: row.name })), + nextCursor: offset + rows.length < total ? String(offset + limit) : null, + total, + allIds, + } +} diff --git a/apps/builder/src/features/templates/schemas/mutation.ts b/apps/builder/src/features/templates/schemas/mutation.ts new file mode 100644 index 000000000..f10c3c370 --- /dev/null +++ b/apps/builder/src/features/templates/schemas/mutation.ts @@ -0,0 +1,50 @@ +import { + templatePermissionsSchema, + templateSelectionSchema, +} from "@chatbotx.io/database/partials" +import { zodBigintAsString } from "@chatbotx.io/utils" +import { z } from "zod" + +const optionalUrl = z + .union([z.literal("").transform(() => null), z.url(), z.null()]) + .optional() + +const optionalText = (max: number) => + z + .union([ + z.literal("").transform(() => null), + z.string().trim().max(max), + z.null(), + ]) + .optional() + +const optionalPath = optionalText(500) + +export const saveTemplateRequest = z.object({ + templateId: zodBigintAsString().optional(), + name: z.string().trim().min(1).max(255), + description: optionalText(2000), + imageUrl: optionalPath, + publisherName: optionalText(255), + youtubeVideoId: optionalText(64), + testLink: optionalUrl, + selection: templateSelectionSchema, + defaultPermissions: templatePermissionsSchema, + createInstallFolder: z.boolean(), + defaultAutoUpdate: z.boolean(), +}) +export type SaveTemplateRequest = z.infer + +export const deleteTemplateRequest = z.object({ + templateId: zodBigintAsString(), +}) + +export const updateShareSettingsRequest = z.object({ + templateId: zodBigintAsString(), + shareEnabled: z.boolean(), + shareExpiresAt: z.string().datetime().nullable().optional(), +}) + +export const installTemplateRequest = z.object({ + shareToken: z.string().trim().min(1), +}) diff --git a/apps/builder/src/features/tools/tools-list.tsx b/apps/builder/src/features/tools/tools-list.tsx index 6aad6ad27..bbb8820ec 100644 --- a/apps/builder/src/features/tools/tools-list.tsx +++ b/apps/builder/src/features/tools/tools-list.tsx @@ -76,6 +76,7 @@ const TOOLS_CONFIG = [ labelKey: "templates.title", descriptionKey: "templates.description", icon: CopyIcon, + getLink: (id: string) => `/space/${id}/templates`, }, { id: "appointment", diff --git a/apps/builder/src/proxy.ts b/apps/builder/src/proxy.ts index 7b893cf56..939e709f2 100644 --- a/apps/builder/src/proxy.ts +++ b/apps/builder/src/proxy.ts @@ -23,6 +23,10 @@ const publicRoutes = [ "/extensions", "/booking", "/portal/redeem", + // Trailing slash is deliberate: `isPublicRoute` below is a bare + // unanchored `startsWith`, so "/t" (no slash) would also match + // "/templates" and make the authenticated template list world-readable. + "/t/", ] const signinPath = "/auth/sign-in" diff --git a/apps/builder/src/routers/index.ts b/apps/builder/src/routers/index.ts index 53b99e4b0..a8ae99d23 100644 --- a/apps/builder/src/routers/index.ts +++ b/apps/builder/src/routers/index.ts @@ -275,6 +275,11 @@ export const router = { webhooksAPI: lazy(() => import("@/features/webhooks/api").then((m) => ({ default: m.webhooksAPI })), ), + templatesAPI: lazy(() => + import("@/features/templates/api").then((m) => ({ + default: m.templatesAPI, + })), + ), analyticsRoutes: authorizedAPI // @ts-expect-error .use(workspaceAuthorizedMidddleware, (input) => input.workspaceId) diff --git a/apps/worker/src/default/handlers/install-template.ts b/apps/worker/src/default/handlers/install-template.ts new file mode 100644 index 000000000..29d673279 --- /dev/null +++ b/apps/worker/src/default/handlers/install-template.ts @@ -0,0 +1,48 @@ +import { templateInstallService, templateService } from "@chatbotx.io/business" +import { parseTemplateExport } from "@chatbotx.io/flow-config" +import { normalizeError } from "universal-error-normalizer" +import { logger } from "../../lib/logger" + +/** + * Not under `handlers/imports/` — a share-link install has its own + * `TemplateInstallation` status surface, never touching the `Import` table + * (`Import.fileId` is `notNull()` with `onDelete: "restrict"`, and a + * share-link install has no file). + */ +export async function installTemplate(data: { + installationId: string + workspaceId: string +}) { + const { installationId, workspaceId } = data + + try { + const { payload, templateName, createInstallFolder } = + await templateService.findInstallationByIdOrFail({ + installationId, + workspaceId, + }) + // Re-validate the stored payload on every install — never trust a + // stored jsonb blob across a format change, even though it was already + // validated once at save time. + const parsed = parseTemplateExport(payload) + if (!parsed.ok) { + throw new Error( + `Template payload failed validation at install time: ${parsed.reason}`, + ) + } + + await templateInstallService.run({ + installationId, + workspaceId, + payload: parsed.data, + templateName, + createInstallFolder, + }) + } catch (error) { + logger.error( + { err: normalizeError(error), installationId, workspaceId }, + "Template install failed", + ) + throw error + } +} diff --git a/apps/worker/src/default/worker.ts b/apps/worker/src/default/worker.ts index 4d182121e..3fae58415 100644 --- a/apps/worker/src/default/worker.ts +++ b/apps/worker/src/default/worker.ts @@ -14,6 +14,7 @@ import { resolveWorkspaceId } from "../lib/resolve-workspace-id" import { handleBulkTagContacts } from "./handlers/bulk-tag-contacts" import { loopableExportContacts } from "./handlers/export-contacts" import { exportCoupons } from "./handlers/export-coupons" +import { installTemplate } from "./handlers/install-template" import { checkMetaCatalogSync } from "./handlers/meta-catalog/check" import { importMetaCatalogProducts } from "./handlers/meta-catalog/import-products" import { submitMetaCatalogSync } from "./handlers/meta-catalog/submit" @@ -117,6 +118,12 @@ async function startDefaultWorker() { } await sendAppointmentReminder(job.data.data) return + case DefaultJobAction.installTemplate: + if (await isBlockedJob(job.data.data)) { + return + } + await installTemplate(job.data.data) + return default: logger.warn(`Unknown job name: ${job.name}`) return diff --git a/packages/business/__tests__/template-folder-manifest.test.ts b/packages/business/__tests__/template-folder-manifest.test.ts new file mode 100644 index 000000000..b443cdfa8 --- /dev/null +++ b/packages/business/__tests__/template-folder-manifest.test.ts @@ -0,0 +1,127 @@ +// @vitest-environment node + +import { afterEach, describe, expect, test, vi } from "vitest" + +const { mockCreateId, mockInsert, mockFindFirst } = vi.hoisted(() => { + const mockInsertValues = vi.fn(() => ({ + returning: vi.fn().mockResolvedValue([{ id: "created-folder-id" }]), + })) + const mockInsert = vi.fn(() => ({ values: mockInsertValues })) + + return { + mockCreateId: vi.fn(() => "created-folder-id"), + mockInsert, + mockInsertValues, + mockFindFirst: vi.fn(), + } +}) + +const folderModel = { table: "folder" } + +vi.mock("@chatbotx.io/database/partials", () => ({ + rootFolderId: "0", +})) + +vi.mock("@chatbotx.io/database/schema", () => ({ + folderModel, +})) + +vi.mock("@chatbotx.io/utils", () => ({ + createId: mockCreateId, +})) + +const { resolveFolderManifest } = await import( + "../src/template/adapters/manifests/folders" +) + +const buildContext = () => ({ + tx: { + query: { folderModel: { findFirst: mockFindFirst } }, + insert: mockInsert, + } as never, + workspaceId: "ws-1", + installationId: "install-1", + idMaps: {}, + track: vi.fn(), + warn: vi.fn(), +}) + +describe("resolveFolderManifest", () => { + afterEach(() => { + vi.clearAllMocks() + }) + + test("keys find-or-create on (name, folderType) — same name, different folderType never collide", async () => { + // Inbound "VIP" already exists; outbound "VIP" does not. + mockFindFirst.mockImplementation( + ({ where }: { where: { folderType: string } }) => + where.folderType === "automatedResponse" + ? { id: "existing-inbound-vip", paths: [] } + : undefined, + ) + + const ctx = buildContext() + await resolveFolderManifest( + ctx, + { + "src-inbound": { + name: "VIP", + folderType: "automatedResponse", + parentSourceId: null, + }, + "src-outbound": { + name: "VIP", + folderType: "outboundAutomatedResponse", + parentSourceId: null, + }, + }, + "keywords", + ) + + expect(ctx.idMaps.folder?.get("src-inbound")).toBe("existing-inbound-vip") + expect(ctx.idMaps.folder?.get("src-outbound")).toBe("created-folder-id") + + // The inbound lookup matched an existing row (wasExisting: true); the + // outbound lookup found nothing under its own folderType and created a + // new row (wasExisting: false) — proving the two "VIP" folders were + // never treated as the same row. + expect(ctx.track).toHaveBeenCalledWith( + expect.objectContaining({ + resourceId: "existing-inbound-vip", + wasExisting: true, + }), + ) + expect(ctx.track).toHaveBeenCalledWith( + expect.objectContaining({ + resourceId: "created-folder-id", + wasExisting: false, + }), + ) + }) + + test("resolves a child folder after its parent in the same pass set", async () => { + mockFindFirst.mockResolvedValue(undefined) + + const ctx = buildContext() + await resolveFolderManifest( + ctx, + { + "src-child": { + name: "Child", + folderType: "flow", + parentSourceId: "src-parent", + }, + "src-parent": { + name: "Parent", + folderType: "flow", + parentSourceId: null, + }, + }, + "flows", + ) + + expect(ctx.idMaps.folder?.get("src-parent")).toBeDefined() + expect(ctx.idMaps.folder?.get("src-child")).toBeDefined() + expect(ctx.warn).not.toHaveBeenCalled() + }) +}) diff --git a/packages/business/__tests__/template-install-order.test.ts b/packages/business/__tests__/template-install-order.test.ts new file mode 100644 index 000000000..ca3e07b6c --- /dev/null +++ b/packages/business/__tests__/template-install-order.test.ts @@ -0,0 +1,35 @@ +// @vitest-environment node + +import { describe, expect, test } from "vitest" + +describe("template adapter install order", () => { + test("TEMPLATE_INSTALL_ORDER is a valid topological order of the adapter dependency graph", async () => { + // Importing the module runs `assertInstallOrderMatches` at load time — + // a throw here means the hand-written order and the adapters' + // declared providesKinds/consumesKinds/deferredKinds have diverged. + await expect( + import("../src/template/adapters/index"), + ).resolves.toBeDefined() + }) + + test("every registered adapter appears in TEMPLATE_INSTALL_ORDER exactly once", async () => { + const { templateAdapterRegistry, TEMPLATE_INSTALL_ORDER } = await import( + "../src/template/adapters/registry" + ) + const registered = Object.keys(templateAdapterRegistry).sort() + const ordered = [...TEMPLATE_INSTALL_ORDER].sort() + expect(ordered).toEqual(registered) + }) + + test("topoSortCategories produces an order consistent with declared dependencies", async () => { + const { templateAdapterRegistry } = await import( + "../src/template/adapters/registry" + ) + const { topoSortCategories } = await import( + "../src/template/adapters/install-order" + ) + const sorted = topoSortCategories(templateAdapterRegistry) + expect(sorted).toBeDefined() + expect(sorted).toHaveLength(Object.keys(templateAdapterRegistry).length) + }) +}) diff --git a/packages/business/__tests__/template-keywords-adapter.test.ts b/packages/business/__tests__/template-keywords-adapter.test.ts new file mode 100644 index 000000000..c67bb5989 --- /dev/null +++ b/packages/business/__tests__/template-keywords-adapter.test.ts @@ -0,0 +1,89 @@ +// @vitest-environment node + +import { afterEach, describe, expect, test, vi } from "vitest" + +const { mockCreate } = vi.hoisted(() => ({ + mockCreate: vi.fn(), +})) + +vi.mock("../src/automated-response/service", () => ({ + automatedResponseService: { create: mockCreate }, +})) + +const { keywordsAdapter } = await import("../src/template/adapters/keywords") + +const buildContext = (idMaps: Record> = {}) => ({ + tx: {} as never, + workspaceId: "ws-1", + installationId: "install-1", + idMaps, + track: vi.fn(), + warn: vi.fn(), +}) + +describe("keywordsAdapter", () => { + afterEach(() => { + vi.clearAllMocks() + }) + + test("resolves an inbound keyword into its inbound-scoped folder, not an outbound folder of the same name", async () => { + mockCreate.mockResolvedValue({ id: "created-keyword-id" }) + + const ctx = buildContext({ + folder: new Map([ + ["src-inbound-folder", "target-inbound-folder"], + ["src-outbound-folder", "target-outbound-folder"], + ]), + flow: new Map([["src-flow", "target-flow"]]), + }) + + await keywordsAdapter.insert(ctx, [ + { + sourceId: "src-keyword", + type: "inbound", + text: "Welcome!", + keywords: ["hi", "hello"], + flowId: "src-flow", + folderId: "src-inbound-folder", + }, + ]) + + expect(mockCreate).toHaveBeenCalledWith( + "ws-1", + expect.objectContaining({ + type: "inbound", + folderId: "target-inbound-folder", + flowId: "target-flow", + }), + ctx.tx, + ) + }) + + test("warns and nulls the folder reference when the folder never resolved", async () => { + mockCreate.mockResolvedValue({ id: "created-keyword-id" }) + const ctx = buildContext({}) + + await keywordsAdapter.insert(ctx, [ + { + sourceId: "src-keyword", + type: "outbound", + text: null, + keywords: ["promo"], + flowId: null, + folderId: "src-missing-folder", + }, + ]) + + expect(ctx.warn).toHaveBeenCalledWith( + expect.objectContaining({ + entityKind: "folder", + value: "src-missing-folder", + }), + ) + expect(mockCreate).toHaveBeenCalledWith( + "ws-1", + expect.objectContaining({ folderId: null }), + ctx.tx, + ) + }) +}) diff --git a/packages/business/__tests__/template-share-token.test.ts b/packages/business/__tests__/template-share-token.test.ts new file mode 100644 index 000000000..87e6c6dac --- /dev/null +++ b/packages/business/__tests__/template-share-token.test.ts @@ -0,0 +1,19 @@ +import { describe, expect, test } from "vitest" +import { generateShareToken } from "../src/template/share-token" + +const URL_SAFE_TOKEN_PATTERN = /^[A-Za-z0-9_-]+$/ + +describe("generateShareToken", () => { + test("produces a URL-safe, sufficiently long token", () => { + const token = generateShareToken() + expect(token.length).toBeGreaterThanOrEqual(32) + expect(token).toMatch(URL_SAFE_TOKEN_PATTERN) + }) + + test("produces distinct tokens across calls", () => { + const tokens = new Set( + Array.from({ length: 50 }, () => generateShareToken()), + ) + expect(tokens.size).toBe(50) + }) +}) diff --git a/packages/business/src/index.ts b/packages/business/src/index.ts index 51d454b6d..c28aaa447 100644 --- a/packages/business/src/index.ts +++ b/packages/business/src/index.ts @@ -77,6 +77,7 @@ export * from "./reflink" export * from "./smart-delay" export * from "./spreadsheet" export * from "./tag" +export * from "./template" export * from "./trigger" export * from "./types" export * from "./user" diff --git a/packages/business/src/integration-webchat/index.ts b/packages/business/src/integration-webchat/index.ts index 06861aae9..5c5f45959 100644 --- a/packages/business/src/integration-webchat/index.ts +++ b/packages/business/src/integration-webchat/index.ts @@ -1 +1,2 @@ export * from "./schema" +export * from "./service" diff --git a/packages/business/src/integration-webchat/service.ts b/packages/business/src/integration-webchat/service.ts new file mode 100644 index 000000000..db2e63735 --- /dev/null +++ b/packages/business/src/integration-webchat/service.ts @@ -0,0 +1,86 @@ +import type { DatabaseClient } from "@chatbotx.io/database/client" +import { integrationWebchatModel } from "@chatbotx.io/database/schema" +import type { IntegrationWebchatModel } from "@chatbotx.io/database/types" +import { createId } from "@chatbotx.io/utils" +import { inboxService } from "../inbox/service" + +export type CreateWebchatRequest = { + name: string + auth: Record + enable: boolean + authorizedDomains: string[] + conversationStarters: unknown[] + persistentMenus: unknown[] + brandColor: string + hideHeader: boolean + showLogo: boolean + hideMessageInput: boolean + customCss: string | null + welcomeFlowId?: string | null +} + +class IntegrationWebchatService { + /** + * Provisions a new Inbox + IntegrationWebchat row together, mirroring + * `createWebchatAction` (`apps/builder/src/features/integration-webchat/ + * actions/create-webchat.action.ts`) — a pre-minted id doubles as both the + * IntegrationWebchat row id and the Inbox's `sourceId`. Webchat is not + * linked to an external platform, so unlike other channels there is no + * real external id to dedup on; the self-referential id keeps `Inbox`'s + * `(workspaceId, channel, sourceId)` unique constraint satisfied. + * + * Callers installing from a template MUST catch + * `channelLimitReachedException` specifically (thrown by + * `inboxService.create` when the target workspace's channel quota is + * exhausted) and degrade to a per-webchat warn+skip — never let it abort + * the whole install transaction. + */ + async create( + props: { + workspaceId: string + ownerId: string + data: CreateWebchatRequest + }, + tx: DatabaseClient, + ): Promise { + const { workspaceId, ownerId, data } = props + const webchatId = createId() + + const { inbox } = await inboxService.create({ + tx, + ownerId, + data: { + id: webchatId, + workspaceId, + channel: "webchat", + name: data.name, + sourceId: webchatId, + }, + }) + + const [created] = await tx + .insert(integrationWebchatModel) + .values({ + id: webchatId, + workspaceId, + inboxId: inbox.id, + auth: data.auth, + name: data.name, + enable: data.enable, + authorizedDomains: data.authorizedDomains, + conversationStarters: data.conversationStarters as never, + persistentMenus: data.persistentMenus as never, + brandColor: data.brandColor, + hideHeader: data.hideHeader, + showLogo: data.showLogo, + hideMessageInput: data.hideMessageInput, + customCss: data.customCss, + welcomeFlowId: data.welcomeFlowId ?? null, + }) + .returning() + + return created + } +} + +export const integrationWebchatService = new IntegrationWebchatService() diff --git a/packages/business/src/template/adapters/ai-agents.ts b/packages/business/src/template/adapters/ai-agents.ts new file mode 100644 index 000000000..b17f5e0f8 --- /dev/null +++ b/packages/business/src/template/adapters/ai-agents.ts @@ -0,0 +1,142 @@ +import { aiAgentModel } from "@chatbotx.io/database/schema" +import { remapReferences } from "@chatbotx.io/flow-config" +import { createId } from "@chatbotx.io/utils" +import type { + PatchTask, + ResourceAdapter, + TemplateInstallContext, +} from "./types" + +type AIAgentModelConfig = + | { provider: string; model: string } + | { kind: "openaiCompatible"; integrationId: string; model: string } + +type TemplateAIAgentEntry = { + sourceId: string + name: string + prompt: string | null + messages: Array<{ role: string; content: string }> + models: AIAgentModelConfig[] + temperature: number + maxOutputTokens: number + // `fn:` / `file:` / `mcp:` tokens, rewritten + // via the generic prefixed-token remapper — see `reference-fields.ts`. + tools: string[] + isDefault: boolean + isRichResponse: boolean + webSearchAuthorizedDomains?: string[] | null +} + +/** + * AIAgents insert directly against `aiAgentModel` (bypassing + * `aiAgentService.create`, which mints its own id internally and does not + * return the created row) so this adapter can mint the id up front and + * track it immediately, mirroring `flowService.insertFlowWithDraft`. + * + * `tools` is remapped through the generic prefixed-token rules + * (`fn:`/`file:`/`mcp:`) against whatever of `aiFunction`/`aiFile`/ + * `aiMcpServer` has already been resolved. AIFunctions insert earlier in + * Phase 1, so `fn:` tokens resolve directly; `aiFile`/`aiMcpServer` are not + * yet modeled as template categories, so those tokens are left unresolved + * and reported as warnings (never corrupted — the prefix allowlist is + * exact-key gated, so free text is never touched). + * + * `models[].integrationId` (the `openaiCompatible` variant) is dropped and + * warned about, same treatment as the calendar's `externalConnectionId` — + * an installed template should never silently point at the source + * workspace's credential. + */ +export const aiAgentsAdapter: ResourceAdapter = { + category: "aiAgents", + providesKinds: ["aiAgent"], + consumesKinds: ["aiFunction", "aiFile", "aiMcpServer"], + deferredKinds: [], + + async insert( + ctx: TemplateInstallContext, + entries: readonly (Record & { sourceId: string })[], + ): Promise { + if (!ctx.idMaps.aiAgent) { + ctx.idMaps.aiAgent = new Map() + } + const idMap = ctx.idMaps.aiAgent + + for (const rawEntry of entries) { + const entry = rawEntry as unknown as TemplateAIAgentEntry + const remappedTools = remapReferences( + { tools: entry.tools }, + ctx.idMaps, + { + kinds: ["aiFunction", "aiFile", "aiMcpServer"], + onUnresolved: (ref) => + ctx.warn({ + category: "aiAgents", + entityKind: ref.entityKind, + path: `aiAgents.${entry.sourceId}.tools`, + value: ref.value, + }), + }, + ) + + const models = entry.models.flatMap((model) => + keepInstallableModel(ctx, entry.sourceId, model), + ) + + const id = createId() + await ctx.tx.insert(aiAgentModel).values({ + id, + workspaceId: ctx.workspaceId, + name: entry.name, + prompt: entry.prompt, + messages: entry.messages, + models, + temperature: entry.temperature, + maxOutputTokens: entry.maxOutputTokens, + tools: remappedTools.tools, + // Never carry `isDefault` across workspaces — the target workspace + // already has its own default agent (or none), and blindly + // installing a second `isDefault: true` row would race the unique + // "one default per workspace" invariant `aiAgentService.create` + // otherwise enforces by clearing the flag first. + isDefault: false, + isRichResponse: entry.isRichResponse, + webSearchAuthorizedDomains: entry.webSearchAuthorizedDomains ?? [], + }) + + idMap.set(entry.sourceId, id) + ctx.track({ + category: "aiAgents", + resourceKind: "aiAgent", + resourceId: id, + sourceResourceId: entry.sourceId, + wasExisting: false, + }) + } + + return [] satisfies PatchTask[] + }, +} + +/** + * Drops (rather than corrupts) an `openaiCompatible` model entry — its + * `integrationId` points at a credential in the *source* workspace, which + * the target workspace never has. Writing an empty/garbage id would pass + * validation and fail invisibly at inference time, so the entry is skipped + * and warned about instead. + */ +const keepInstallableModel = ( + ctx: TemplateInstallContext, + sourceId: string, + model: AIAgentModelConfig, +): AIAgentModelConfig[] => { + if (!("kind" in model) || model.kind !== "openaiCompatible") { + return [model] + } + ctx.warn({ + category: "aiAgents", + entityKind: "integration", + path: `aiAgents.${sourceId}.models.integrationId`, + value: model.integrationId, + }) + return [] +} diff --git a/packages/business/src/template/adapters/ai-functions.ts b/packages/business/src/template/adapters/ai-functions.ts new file mode 100644 index 000000000..d4b458cbd --- /dev/null +++ b/packages/business/src/template/adapters/ai-functions.ts @@ -0,0 +1,100 @@ +import { eq } from "@chatbotx.io/database/client" +import { aiFunctionModel } from "@chatbotx.io/database/schema" +import { aiFunctionService } from "../../ai-function/service" +import type { + PatchTask, + ResourceAdapter, + TemplateInstallContext, +} from "./types" + +type TemplateAIFunctionEntry = { + sourceId: string + name: string + purpose?: string | null + dataCollect: Array<{ from: string; to: string }> + outputMessage?: string | null + // Points at a `resources.flows` sourceId — flows insert *after* + // aiFunctions in Phase 1 (per install ordering), so this is always + // deferred to Phase 2, never resolved at insert time. + triggerFlowId?: string | null +} + +/** + * AIFunctions insert with `triggerFlowId: null` — flows are inserted later + * in Phase 1 (`products -> settings -> aiFunctions -> aiAgents -> calendars + * -> webchats -> flows -> ...`), so the target flow id can never be known + * yet. The returned `PatchTask` fixes it up (a single-column update, so + * every other field written at insert time is left untouched) once + * `idMaps.flow` is complete. + */ +export const aiFunctionsAdapter: ResourceAdapter = { + category: "aiFunctions", + providesKinds: ["aiFunction"], + consumesKinds: ["flow"], + deferredKinds: ["flow"], + + async insert( + ctx: TemplateInstallContext, + entries: readonly (Record & { sourceId: string })[], + ): Promise { + if (!ctx.idMaps.aiFunction) { + ctx.idMaps.aiFunction = new Map() + } + const idMap = ctx.idMaps.aiFunction + const pendingTriggerFlowBySourceId = new Map() + + for (const rawEntry of entries) { + const entry = rawEntry as unknown as TemplateAIFunctionEntry + const [created] = await aiFunctionService.create( + ctx.workspaceId, + { + name: entry.name, + purpose: entry.purpose, + dataCollect: entry.dataCollect, + outputMessage: entry.outputMessage, + triggerFlowId: null, + }, + ctx.tx, + ) + + idMap.set(entry.sourceId, created.id) + if (entry.triggerFlowId) { + pendingTriggerFlowBySourceId.set(created.id, entry.triggerFlowId) + } + ctx.track({ + category: "aiFunctions", + resourceKind: "aiFunction", + resourceId: created.id, + sourceResourceId: entry.sourceId, + wasExisting: false, + }) + } + + return [ + { + category: "aiFunctions", + apply: async (patchCtx) => { + for (const [ + aiFunctionId, + flowSourceId, + ] of pendingTriggerFlowBySourceId) { + const targetFlowId = patchCtx.idMaps.flow?.get(flowSourceId) + if (!targetFlowId) { + patchCtx.warn({ + category: "aiFunctions", + entityKind: "flow", + path: `aiFunctions.${aiFunctionId}.triggerFlowId`, + value: flowSourceId, + }) + continue + } + await patchCtx.tx + .update(aiFunctionModel) + .set({ triggerFlowId: targetFlowId }) + .where(eq(aiFunctionModel.id, aiFunctionId)) + } + }, + }, + ] + }, +} diff --git a/packages/business/src/template/adapters/calendars.ts b/packages/business/src/template/adapters/calendars.ts new file mode 100644 index 000000000..dc71ea1c6 --- /dev/null +++ b/packages/business/src/template/adapters/calendars.ts @@ -0,0 +1,244 @@ +import type { + AppointmentLocationType, + AppointmentReminderTimingUnit, + AppointmentScheduleWindowType, +} from "@chatbotx.io/database/partials" +import { appointmentCalendarRepository } from "@chatbotx.io/database/repositories" +import { createId } from "@chatbotx.io/utils" +import type { + PatchTask, + ResourceAdapter, + TemplateInstallContext, +} from "./types" + +type TemplateCalendarAvailability = { + weekday: number + startMinute: number + endMinute: number +} + +type TemplateCalendarReminder = { + // Points at a `resources.flows` sourceId — flows insert *after* calendars + // in Phase 1, so this is always deferred to Phase 2. NOT NULL on the row + // (invariant: `AppointmentCalendarReminder.flowId` can't dangle) — a + // reminder whose flow never resolves is skipped, not written with a + // placeholder. + flowId: string + timingValue: number + timingUnit: AppointmentReminderTimingUnit +} + +type TemplateCalendarEntry = { + sourceId: string + name: string + description: string | null + timezone: string + locationType: AppointmentLocationType + locationDetail: string | null + durationMinutes: number + bufferAfterMinutes: number | null + scheduleWindowType: AppointmentScheduleWindowType + scheduleWindowConfig: Record + maxAppointmentsPerUser: number | null + dailyLimitEnabled: boolean + maxPerDay: number | null + allowGroupMeeting: boolean + maxPerSlot: number | null + confirmationMessage: string | null + // Both point at `resources.flows` sourceIds — nullable columns, so unlike + // reminders these are simply left `null` if the flow never resolves. + confirmationFlowId: string | null + cancellationFlowId: string | null + // Source-workspace external calendar connection — never carried over + // (same treatment as AI agent `openaiCompatible.integrationId`): dropped + // and warned about, never written. + externalConnectionId?: string | null + availability: TemplateCalendarAvailability[] + reminders: TemplateCalendarReminder[] +} + +/** + * Calendars insert with a freshly minted `publicLinkSlug` (globally unique — + * never carry the source slug over) and `active: false`, mirroring + * `appointmentCalendarService.duplicate`. `externalConnectionId` is dropped. + * `confirmationFlowId`/`cancellationFlowId`/reminders all point at flows, + * which insert later in Phase 1 — deferred to the returned `PatchTask`. + */ +export const calendarsAdapter: ResourceAdapter = { + category: "calendars", + providesKinds: ["calendar"], + consumesKinds: ["flow"], + deferredKinds: ["flow"], + + async insert( + ctx: TemplateInstallContext, + entries: readonly (Record & { sourceId: string })[], + ): Promise { + if (!ctx.idMaps.calendar) { + ctx.idMaps.calendar = new Map() + } + const idMap = ctx.idMaps.calendar + const pendingFlowRefs: Array<{ + calendarId: string + confirmationFlowSourceId: string | null + cancellationFlowSourceId: string | null + reminders: TemplateCalendarReminder[] + }> = [] + + for (const rawEntry of entries) { + const entry = rawEntry as unknown as TemplateCalendarEntry + if (entry.externalConnectionId) { + ctx.warn({ + category: "calendars", + entityKind: "integration", + path: `calendars.${entry.sourceId}.externalConnectionId`, + value: entry.externalConnectionId, + }) + } + + const created = await appointmentCalendarRepository.create( + { + workspaceId: ctx.workspaceId, + name: entry.name, + timezone: entry.timezone, + locationType: entry.locationType, + publicLinkSlug: createId().toString(), + }, + ctx.tx, + ) + await appointmentCalendarRepository.update( + { + workspaceId: ctx.workspaceId, + id: created.id, + description: entry.description, + durationMinutes: entry.durationMinutes, + bufferAfterMinutes: entry.bufferAfterMinutes, + locationDetail: entry.locationDetail, + scheduleWindowType: entry.scheduleWindowType, + scheduleWindowConfig: entry.scheduleWindowConfig, + maxAppointmentsPerUser: entry.maxAppointmentsPerUser, + dailyLimitEnabled: entry.dailyLimitEnabled, + maxPerDay: entry.maxPerDay, + allowGroupMeeting: entry.allowGroupMeeting, + maxPerSlot: entry.maxPerSlot, + confirmationMessage: entry.confirmationMessage, + confirmationFlowId: null, + cancellationFlowId: null, + externalConnectionId: null, + active: false, + }, + ctx.tx, + ) + await appointmentCalendarRepository.replaceAvailability( + { calendarId: created.id, availability: entry.availability }, + ctx.tx, + ) + + idMap.set(entry.sourceId, created.id) + pendingFlowRefs.push({ + calendarId: created.id, + confirmationFlowSourceId: entry.confirmationFlowId, + cancellationFlowSourceId: entry.cancellationFlowId, + reminders: entry.reminders, + }) + ctx.track({ + category: "calendars", + resourceKind: "calendar", + resourceId: created.id, + sourceResourceId: entry.sourceId, + wasExisting: false, + }) + } + + return [ + { + category: "calendars", + apply: async (patchCtx) => { + for (const pending of pendingFlowRefs) { + await patchCalendarFlowRefs(patchCtx, pending) + } + }, + }, + ] + }, +} + +const resolveFlowRef = ( + ctx: TemplateInstallContext, + calendarId: string, + field: string, + flowSourceId: string | null, +): string | null => { + if (!flowSourceId) { + return null + } + const targetId = ctx.idMaps.flow?.get(flowSourceId) + if (!targetId) { + ctx.warn({ + category: "calendars", + entityKind: "flow", + path: `calendars.${calendarId}.${field}`, + value: flowSourceId, + }) + return null + } + return targetId +} + +const patchCalendarFlowRefs = async ( + ctx: TemplateInstallContext, + pending: { + calendarId: string + confirmationFlowSourceId: string | null + cancellationFlowSourceId: string | null + reminders: TemplateCalendarReminder[] + }, +): Promise => { + const confirmationFlowId = resolveFlowRef( + ctx, + pending.calendarId, + "confirmationFlowId", + pending.confirmationFlowSourceId, + ) + const cancellationFlowId = resolveFlowRef( + ctx, + pending.calendarId, + "cancellationFlowId", + pending.cancellationFlowSourceId, + ) + await appointmentCalendarRepository.update( + { + workspaceId: ctx.workspaceId, + id: pending.calendarId, + confirmationFlowId, + cancellationFlowId, + }, + ctx.tx, + ) + + const resolvedReminders = pending.reminders.flatMap((reminder) => { + const targetFlowId = ctx.idMaps.flow?.get(reminder.flowId) + if (!targetFlowId) { + ctx.warn({ + category: "calendars", + entityKind: "flow", + path: `calendars.${pending.calendarId}.reminders.flowId`, + value: reminder.flowId, + }) + return [] + } + return [ + { + flowId: targetFlowId, + timingValue: reminder.timingValue, + timingUnit: reminder.timingUnit, + }, + ] + }) + if (resolvedReminders.length > 0) { + await appointmentCalendarRepository.replaceReminders( + { calendarId: pending.calendarId, reminders: resolvedReminders }, + ctx.tx, + ) + } +} diff --git a/packages/business/src/template/adapters/entry-point-links.ts b/packages/business/src/template/adapters/entry-point-links.ts new file mode 100644 index 000000000..55f6108ac --- /dev/null +++ b/packages/business/src/template/adapters/entry-point-links.ts @@ -0,0 +1,115 @@ +import type { QrStyles, ReflinkType } from "@chatbotx.io/database/partials" +import { reflinkModel } from "@chatbotx.io/database/schema" +import { createId } from "@chatbotx.io/utils" +import { insertWithNameRetry } from "./naming" +import type { + PatchTask, + ResourceAdapter, + TemplateInstallContext, +} from "./types" + +type TemplateEntryPointLinkEntry = { + sourceId: string + name: string + type: ReflinkType + // NOT NULL on the row. Per the save-time snapshot rule, any flow a Reflink + // points at is auto-included in `resources.flows`, so by the time + // entryPointLinks insert (after flows, in Phase 1) this is always + // resolvable — an unresolved case is a save-time bug, not an expected + // runtime path, but is still warned + skipped rather than throwing and + // aborting the whole install. + flowId: string + customFieldId: string | null + qrStyles: QrStyles | null +} + +/** + * `Reflink(workspaceId, name)` is a real unique constraint, so a name + * collision with an existing entry-point link in the target workspace is + * handled via the shared retry-on-conflict suffixer rather than a + * TOCTUO-racy pre-check. + */ +export const entryPointLinksAdapter: ResourceAdapter = { + category: "entryPointLinks", + providesKinds: [], + consumesKinds: ["flow", "customField"], + deferredKinds: [], + + async insert( + ctx: TemplateInstallContext, + entries: readonly (Record & { sourceId: string })[], + ): Promise { + for (const rawEntry of entries) { + const entry = rawEntry as unknown as TemplateEntryPointLinkEntry + const flowId = ctx.idMaps.flow?.get(entry.flowId) + if (!flowId) { + ctx.warn({ + category: "entryPointLinks", + entityKind: "flow", + path: `entryPointLinks.${entry.sourceId}.flowId`, + value: entry.flowId, + }) + continue + } + const customFieldId = resolveCustomFieldRef(ctx, entry) + + const created = await insertWithNameRetry( + entry.name, + (candidateName) => + ctx.tx + .insert(reflinkModel) + .values({ + id: createId(), + workspaceId: ctx.workspaceId, + name: candidateName, + type: entry.type, + flowId, + customFieldId, + qrStyles: entry.qrStyles, + }) + .returning() + .then(([row]) => row), + (lastAttemptedName) => + ctx.warn({ + category: "entryPointLinks", + entityKind: "name", + path: `entryPointLinks.${entry.sourceId}.name`, + value: lastAttemptedName, + }), + ) + if (!created) { + continue + } + + ctx.track({ + category: "entryPointLinks", + resourceKind: "reflink", + resourceId: created.id, + sourceResourceId: entry.sourceId, + wasExisting: false, + }) + } + + return [] satisfies PatchTask[] + }, +} + +const resolveCustomFieldRef = ( + ctx: TemplateInstallContext, + entry: TemplateEntryPointLinkEntry, +): string | null => { + if (!entry.customFieldId) { + return null + } + const targetId = ctx.idMaps.customField?.get(entry.customFieldId) + if (!targetId) { + ctx.warn({ + category: "entryPointLinks", + entityKind: "customField", + path: `entryPointLinks.${entry.sourceId}.customFieldId`, + value: entry.customFieldId, + }) + return null + } + return targetId +} diff --git a/packages/business/src/template/adapters/fb-comment-automations.ts b/packages/business/src/template/adapters/fb-comment-automations.ts new file mode 100644 index 000000000..6cd1fd520 --- /dev/null +++ b/packages/business/src/template/adapters/fb-comment-automations.ts @@ -0,0 +1,155 @@ +import { fbCommentAutomationModel } from "@chatbotx.io/database/schema" +import { createId } from "@chatbotx.io/utils" +import type { + PatchTask, + ResourceAdapter, + TemplateInstallContext, +} from "./types" + +type TemplateFBCommentPost = { + type: "published" | "ads" | "reels" | "postIds" | "all" + // External Facebook post ids — copied verbatim, never remapped. Sibling + // of `privateReply.value`/`publicReply.value`/`includeKeywords.value`, + // which is exactly why this adapter resolves the reply fields explicitly + // rather than through the generic key-name-driven remapper (a bare + // `value` key is too ambiguous across these sibling shapes to key a + // reference rule on safely). + value: string[] +} + +type TemplateFBCommentReply = { + type: "AIAgent" | "text" | "flow" | "none" + // A `resources.flows`/`aiAgents` sourceId when type is `flow`/`AIAgent`; + // arbitrary reply text when type is `text`; unused when type is `none`. + value: string | null +} + +type TemplateFBCommentEntry = { + sourceId: string + name: string + type: string + isActive: boolean + startTime: string | null + endTime: string | null + post: TemplateFBCommentPost + privateReply: TemplateFBCommentReply + publicReply: TemplateFBCommentReply + includeKeywords: unknown + excludeKeywords: string[] + options: unknown + hideComments: unknown + replyAfter: unknown + folderId: string | null +} + +const resolveReplyValue = ( + ctx: TemplateInstallContext, + entry: TemplateFBCommentEntry, + field: "privateReply" | "publicReply", + reply: TemplateFBCommentReply, +): TemplateFBCommentReply => { + if (reply.type === "text" || reply.type === "none" || !reply.value) { + return reply + } + + const entityKind = reply.type === "flow" ? "flow" : "aiAgent" + const targetId = ctx.idMaps[entityKind]?.get(reply.value) + if (!targetId) { + ctx.warn({ + category: "fbCommentAutomations", + entityKind, + path: `fbCommentAutomations.${entry.sourceId}.${field}.value`, + value: reply.value, + }) + return { ...reply, value: null } + } + return { ...reply, value: targetId } +} + +const resolveFolderRef = ( + ctx: TemplateInstallContext, + entry: TemplateFBCommentEntry, +): string | null => { + if (!entry.folderId) { + return null + } + const targetId = ctx.idMaps.folder?.get(entry.folderId) + if (!targetId) { + ctx.warn({ + category: "fbCommentAutomations", + entityKind: "folder", + path: `fbCommentAutomations.${entry.sourceId}.folderId`, + value: entry.folderId, + }) + return null + } + return targetId +} + +/** + * `post.value`/`excludeKeywords` hold external Facebook post ids and plain + * keyword strings respectively — copied verbatim. `privateReply`/ + * `publicReply` are the two discriminated-union reply configs, each + * resolved explicitly (`flow` -> `idMaps.flow`, `AIAgent` -> `idMaps.aiAgent`, + * `text`/`none` passed through) rather than through the generic remapper. + */ +export const fbCommentAutomationsAdapter: ResourceAdapter = { + category: "fbCommentAutomations", + providesKinds: [], + consumesKinds: ["flow", "aiAgent", "folder"], + deferredKinds: [], + + async insert( + ctx: TemplateInstallContext, + entries: readonly (Record & { sourceId: string })[], + ): Promise { + for (const rawEntry of entries) { + const entry = rawEntry as unknown as TemplateFBCommentEntry + const privateReply = resolveReplyValue( + ctx, + entry, + "privateReply", + entry.privateReply, + ) + const publicReply = resolveReplyValue( + ctx, + entry, + "publicReply", + entry.publicReply, + ) + const folderId = resolveFolderRef(ctx, entry) + + const [created] = await ctx.tx + .insert(fbCommentAutomationModel) + .values({ + id: createId(), + workspaceId: ctx.workspaceId, + name: entry.name, + type: entry.type as never, + isActive: entry.isActive, + startTime: entry.startTime, + endTime: entry.endTime, + folderId, + post: entry.post, + privateReply, + publicReply, + includeKeywords: entry.includeKeywords as never, + excludeKeywords: entry.excludeKeywords, + options: entry.options as never, + hideComments: entry.hideComments as never, + replyAfter: entry.replyAfter as never, + }) + .returning() + + ctx.track({ + category: "fbCommentAutomations", + resourceKind: "fbCommentAutomation", + resourceId: created.id, + sourceResourceId: entry.sourceId, + wasExisting: false, + }) + } + + return [] satisfies PatchTask[] + }, +} diff --git a/packages/business/src/template/adapters/flows.ts b/packages/business/src/template/adapters/flows.ts new file mode 100644 index 000000000..d74849baf --- /dev/null +++ b/packages/business/src/template/adapters/flows.ts @@ -0,0 +1,177 @@ +import { eq } from "@chatbotx.io/database/client" +import { rootFolderId } from "@chatbotx.io/database/partials" +import { flowVersionModel } from "@chatbotx.io/database/schema" +import type { TemplateFlowEntry } from "@chatbotx.io/flow-config" +import { remapFlowGraphReferences } from "@chatbotx.io/flow-config" +import { flowService } from "../../flow" +import { flowVersionService } from "../../flow-version" +import type { + PatchTask, + ResourceAdapter, + TemplateInstallContext, +} from "./types" + +const FLOW_INSERT_KINDS = [ + "customField", + "sequence", + "aiAgent", + "integration", + "calendar", + "questionnaire", + "couponTopic", + "inbox", + "messengerPersona", + "spreadsheet", + "tag", + "product", + "webhook", + "aiFunction", + "aiFile", + "aiMcpServer", +] + +// `trigger` cannot be in `FLOW_INSERT_KINDS`: `triggers` inserts *after* +// flows in Phase 1 (a trigger's own actions can reference a flow), so a +// flow -> trigger reference (e.g. `Condition.sourceId` with +// `sourceType: "trigger"`) would create a real dependency cycle between the +// `flows` and `triggers` categories if resolved eagerly. Deferred to the +// same Phase-2 patch task as `flow`/`flowNode`. +const FLOW_DEFERRED_KINDS = ["flow", "flowNode", "trigger"] + +/** + * Flows adapter — reuses `flowService.createFromImport` verbatim, exactly as + * single-flow import does. Its safety property (node ids reused as-is is + * safe because every nodeId-keyed table also scopes by a freshly-minted + * flowId) holds identically here, so there is zero new flow-insert code. + * + * Flows insert after every other Phase-1 category because every flow -> X + * reference is either a manifest kind (already resolved in Phase R) or a + * nullable/jsonb soft reference — never a NOT NULL FK — so a flow can always + * be inserted even when some of its own references (to categories inserted + * later in Phase 1, or to other flows in this same template) are not yet + * resolvable. + * + * `flow`/`flowNode` are the two *deferred* kinds: a flow may reference + * another flow that is also part of this template but has not been created + * yet at the point this flow inserts. Since node ids are reused verbatim, + * the `flowNode` idMap is the identity map once every referenced flow + * exists. The returned `PatchTask` re-runs the remap restricted to + * `["flow", "flowNode"]` against every flow's *own* draft version, once all + * flows in this install have a target id — then writes the result straight + * onto the draft row (never-published flows have no separate published + * version to patch). + */ +export const flowsAdapter: ResourceAdapter = { + category: "flows", + providesKinds: ["flow"], + consumesKinds: [...FLOW_INSERT_KINDS, ...FLOW_DEFERRED_KINDS], + deferredKinds: FLOW_DEFERRED_KINDS, + + async insert( + ctx: TemplateInstallContext, + entries: readonly (Record & { sourceId: string })[], + ): Promise { + if (!ctx.idMaps.flow) { + ctx.idMaps.flow = new Map() + } + const flowIdMap = ctx.idMaps.flow + const insertedFlowIds: string[] = [] + + for (const rawEntry of entries) { + const entry = rawEntry as unknown as TemplateFlowEntry + const remapped = remapFlowGraphReferences( + { nodes: entry.nodes, edges: entry.edges }, + ctx.idMaps, + { + kinds: FLOW_INSERT_KINDS, + onUnresolved: (ref) => + ctx.warn({ + category: "flows", + entityKind: ref.entityKind, + path: `flows.${entry.sourceId}.${ref.path}`, + value: ref.value, + }), + }, + ) + + const requestedFolderId = resolveFolderReference(ctx, entry) + + const flowId = await flowService.createFromImport({ + workspaceId: ctx.workspaceId, + name: entry.name, + active: entry.active, + enableInInbox: entry.enableInInbox, + startNodeId: entry.startNodeId, + nodes: remapped.nodes, + edges: remapped.edges, + folderId: requestedFolderId, + tx: ctx.tx, + }) + + flowIdMap.set(entry.sourceId, flowId) + insertedFlowIds.push(flowId) + ctx.track({ + category: "flows", + resourceKind: "flow", + resourceId: flowId, + sourceResourceId: entry.sourceId, + wasExisting: false, + }) + } + + return [ + { + category: "flows", + apply: async (patchCtx) => { + for (const flowId of insertedFlowIds) { + const draft = await flowVersionService.findDraft( + { flowId, workspaceId: patchCtx.workspaceId }, + patchCtx.tx, + ) + if (!draft) { + continue + } + const patched = remapFlowGraphReferences( + { nodes: draft.nodes, edges: draft.edges }, + patchCtx.idMaps, + { + kinds: FLOW_DEFERRED_KINDS, + onUnresolved: (ref) => + patchCtx.warn({ + category: "flows", + entityKind: ref.entityKind, + path: `flows.${flowId}.${ref.path}`, + value: ref.value, + }), + }, + ) + await patchCtx.tx + .update(flowVersionModel) + .set({ nodes: patched.nodes, edges: patched.edges }) + .where(eq(flowVersionModel.id, draft.id)) + } + }, + }, + ] + }, +} + +const resolveFolderReference = ( + ctx: TemplateInstallContext, + entry: TemplateFlowEntry, +): string | null => { + if (!entry.folderId || entry.folderId === rootFolderId) { + return null + } + const targetId = ctx.idMaps.folder?.get(entry.folderId) + if (!targetId) { + ctx.warn({ + category: "flows", + entityKind: "folder", + path: `flows.${entry.sourceId}.folderId`, + value: entry.folderId, + }) + return null + } + return targetId +} diff --git a/packages/business/src/template/adapters/index.ts b/packages/business/src/template/adapters/index.ts new file mode 100644 index 000000000..d4bfcf2c2 --- /dev/null +++ b/packages/business/src/template/adapters/index.ts @@ -0,0 +1,12 @@ +import { assertInstallOrderMatches } from "./install-order" +import { TEMPLATE_INSTALL_ORDER } from "./registry" + +// Run once at module load: a forgotten `deferredKinds` entry, or an adapter +// moved without updating the hand-written `TEMPLATE_INSTALL_ORDER`, fails +// loudly here instead of silently writing a dangling reference at install +// time. +assertInstallOrderMatches(TEMPLATE_INSTALL_ORDER) + +export * from "./install-order" +export * from "./registry" +export * from "./types" diff --git a/packages/business/src/template/adapters/install-order.ts b/packages/business/src/template/adapters/install-order.ts new file mode 100644 index 000000000..cf8b82537 --- /dev/null +++ b/packages/business/src/template/adapters/install-order.ts @@ -0,0 +1,150 @@ +import type { TemplateCategory } from "@chatbotx.io/database/partials" +import { templateAdapterRegistry } from "./registry" + +/** + * Kinds resolved entirely in Phase R (manifests), before any Phase-1 + * adapter runs. Never gate topo order among Phase-1 categories — an + * adapter's `consumesKinds` entry for one of these is always already + * satisfied by the time Phase 1 starts. + */ +const PHASE_R_KINDS = new Set([ + "customField", + "tag", + "productCategory", + "folder", +]) + +/** + * Topologically sorts Phase-1 categories by `providesKinds` / + * (`consumesKinds` minus `deferredKinds` minus Phase-R kinds). A category + * whose non-deferred dependency is never provided by any adapter (e.g. + * `aiFile`/`aiMcpServer`, which have no Phase-1 category) is treated as + * satisfied trivially — it can only ever be a warning at insert time, never + * a blocked install. + * + * Returns `undefined` if the remaining graph contains a genuine cycle + * (impossible today given `deferredKinds` breaks every known cycle) rather + * than throwing, so `assertInstallOrderMatches` can produce one clear error + * message for either failure mode. + */ +export const topoSortCategories = ( + registry: Partial< + Record< + TemplateCategory, + { + providesKinds: readonly string[] + consumesKinds: readonly string[] + deferredKinds: readonly string[] + } + > + >, +): TemplateCategory[] | undefined => { + const categories = Object.keys(registry) as TemplateCategory[] + const providedBy = new Map() + for (const category of categories) { + for (const kind of registry[category]?.providesKinds ?? []) { + providedBy.set(kind, category) + } + } + + const dependenciesOf = (category: TemplateCategory): TemplateCategory[] => { + const adapter = registry[category] + if (!adapter) { + return [] + } + const deferred = new Set(adapter.deferredKinds) + return adapter.consumesKinds + .filter((kind) => !(deferred.has(kind) || PHASE_R_KINDS.has(kind))) + .flatMap((kind) => { + const provider = providedBy.get(kind) + return provider && provider !== category ? [provider] : [] + }) + } + + const sorted: TemplateCategory[] = [] + const visited = new Set() + const visiting = new Set() + + const visit = (category: TemplateCategory): boolean => { + if (visited.has(category)) { + return true + } + if (visiting.has(category)) { + return false + } + visiting.add(category) + for (const dependency of dependenciesOf(category)) { + if (!visit(dependency)) { + return false + } + } + visiting.delete(category) + visited.add(category) + sorted.push(category) + return true + } + + for (const category of categories) { + if (!visit(category)) { + return + } + } + return sorted +} + +/** + * Asserts the hand-written `TEMPLATE_INSTALL_ORDER` is a valid topological + * order of the adapter dependency graph — every dependency appears before + * its dependents. Run at module load (see `registry.ts`) so a forgotten + * `deferredKinds` entry, or an adapter moved without updating the + * hand-written order, fails loudly at boot instead of writing a dangling + * reference at install time. + */ +export const assertInstallOrderMatches = ( + order: readonly TemplateCategory[], +): void => { + const sorted = topoSortCategories(templateAdapterRegistry) + if (!sorted) { + throw new Error( + "Template adapter dependency graph contains a cycle not broken by any deferredKinds entry.", + ) + } + + const positionOf = new Map(order.map((category, index) => [category, index])) + for (const category of order) { + const adapter = + templateAdapterRegistry[category as keyof typeof templateAdapterRegistry] + if (!adapter) { + continue + } + const deferred = new Set(adapter.deferredKinds) + for (const kind of adapter.consumesKinds) { + if (deferred.has(kind) || PHASE_R_KINDS.has(kind)) { + continue + } + const providerEntry = Object.entries(templateAdapterRegistry).find( + ([, providerAdapter]) => providerAdapter.providesKinds.includes(kind), + ) + if (!providerEntry) { + continue + } + const [providerCategory] = providerEntry + if (providerCategory === category) { + continue + } + const providerPosition = positionOf.get( + providerCategory as TemplateCategory, + ) + const consumerPosition = positionOf.get(category) + if ( + providerPosition !== undefined && + consumerPosition !== undefined && + providerPosition > consumerPosition + ) { + throw new Error( + `TEMPLATE_INSTALL_ORDER is invalid: "${category}" consumes "${kind}" (non-deferred) but is ordered before its provider "${providerCategory}".`, + ) + } + } + } +} diff --git a/packages/business/src/template/adapters/keywords.ts b/packages/business/src/template/adapters/keywords.ts new file mode 100644 index 000000000..6fb566ffc --- /dev/null +++ b/packages/business/src/template/adapters/keywords.ts @@ -0,0 +1,105 @@ +import type { AutomatedResponseType } from "@chatbotx.io/database/partials" +import { automatedResponseService } from "../../automated-response/service" +import type { + PatchTask, + ResourceAdapter, + TemplateInstallContext, +} from "./types" + +type TemplateKeywordEntry = { + sourceId: string + type: AutomatedResponseType + text: string | null + keywords: string[] + // Points at a `resources.flows` sourceId — flows insert *before* keywords + // in Phase 1, so this resolves directly (no deferral needed). + flowId: string | null + // Points at a `manifests.folders` sourceId, resolved via `idMaps.folder`. + // The folder manifest entry MUST have been keyed on `(name, folderType)` + // matching this row's own `type` (`automatedResponseFolderTypeByType`) — + // see `adapters/manifests/folders.ts` for the invariant this depends on. + folderId: string | null +} + +/** + * Keywords (`AutomatedResponse`) insert after flows, so `flowId` resolves + * directly. `folderId` resolves against the folder manifest — this is the + * category most exposed to the "one table, two FolderTypes" bug: an + * inbound keyword whose `folderId` sourceId was captured against an + * `automatedResponse`-typed folder must land in that same folder, never in + * the `outboundAutomatedResponse`-typed folder of the same name. + */ +export const keywordsAdapter: ResourceAdapter = { + category: "keywords", + providesKinds: [], + consumesKinds: ["flow", "folder"], + deferredKinds: [], + + async insert( + ctx: TemplateInstallContext, + entries: readonly (Record & { sourceId: string })[], + ): Promise { + for (const rawEntry of entries) { + const entry = rawEntry as unknown as TemplateKeywordEntry + const flowId = resolveReference( + ctx, + "flow", + entry.sourceId, + "flowId", + entry.flowId, + ) + const folderId = resolveReference( + ctx, + "folder", + entry.sourceId, + "folderId", + entry.folderId, + ) + + const created = await automatedResponseService.create( + ctx.workspaceId, + { + type: entry.type, + text: entry.text, + flowId, + folderId, + keywords: entry.keywords, + }, + ctx.tx, + ) + + ctx.track({ + category: "keywords", + resourceKind: "automatedResponse", + resourceId: created.id, + sourceResourceId: entry.sourceId, + wasExisting: false, + }) + } + + return [] satisfies PatchTask[] + }, +} + +const resolveReference = ( + ctx: TemplateInstallContext, + entityKind: string, + sourceId: string, + field: string, + refSourceId: string | null, +): string | null => { + if (!refSourceId) { + return null + } + const targetId = ctx.idMaps[entityKind]?.get(refSourceId) + if (!targetId) { + ctx.warn({ + category: "keywords", + entityKind, + path: `keywords.${sourceId}.${field}`, + value: refSourceId, + }) + return null + } + return targetId +} diff --git a/packages/business/src/template/adapters/manifests/custom-fields.ts b/packages/business/src/template/adapters/manifests/custom-fields.ts new file mode 100644 index 000000000..846777295 --- /dev/null +++ b/packages/business/src/template/adapters/manifests/custom-fields.ts @@ -0,0 +1,54 @@ +import type { TemplateCustomFieldManifestEntry } from "@chatbotx.io/flow-config" +import { customFieldResolutionKey } from "@chatbotx.io/utils/custom-field" +import { customFieldService } from "../../../custom-field/service" +import type { TemplateInstallContext } from "../types" + +/** + * Find-or-create custom fields from the template's manifest, reusing + * `customFieldService.resolveByNameAndType` verbatim — the same + * find-or-create-by-(name,type) semantics `flow/service.ts` already relies + * on for single-flow import, so there is exactly one implementation of "does + * a custom field with this name/type already exist in this workspace". + */ +export const resolveCustomFieldManifest = async ( + ctx: TemplateInstallContext, + manifest: Readonly>, +): Promise => { + const entries = Object.entries(manifest) + if (entries.length === 0) { + return + } + + const { idMap: resolvedByKey, createdIds } = + await customFieldService.resolveByNameAndType({ + workspaceId: ctx.workspaceId, + fields: entries.map(([, field]) => field), + tx: ctx.tx, + }) + const createdIdSet = new Set(createdIds) + + if (!ctx.idMaps.customField) { + ctx.idMaps.customField = new Map() + } + const idMap = ctx.idMaps.customField + for (const [sourceId, field] of entries) { + const targetId = resolvedByKey.get(customFieldResolutionKey(field)) + if (!targetId) { + ctx.warn({ + category: "customFields", + entityKind: "customField", + path: `manifests.customFields.${sourceId}`, + value: sourceId, + }) + continue + } + idMap.set(sourceId, targetId) + ctx.track({ + category: "customFields", + resourceKind: "customField", + resourceId: targetId, + sourceResourceId: sourceId, + wasExisting: !createdIdSet.has(targetId), + }) + } +} diff --git a/packages/business/src/template/adapters/manifests/folders.ts b/packages/business/src/template/adapters/manifests/folders.ts new file mode 100644 index 000000000..0e30db1f8 --- /dev/null +++ b/packages/business/src/template/adapters/manifests/folders.ts @@ -0,0 +1,154 @@ +import type { TemplateCategory } from "@chatbotx.io/database/partials" +import { rootFolderId } from "@chatbotx.io/database/partials" +import { folderModel } from "@chatbotx.io/database/schema" +import type { FolderModel } from "@chatbotx.io/database/types" +import type { TemplateFolderManifestEntry } from "@chatbotx.io/flow-config" +import { createId } from "@chatbotx.io/utils" +import type { TemplateInstallContext } from "../types" + +/** + * Find-or-create folders from the template's folder manifest, keyed on + * `(name, folderType)` — NEVER name alone. `AutomatedResponse` (Keywords) is + * one table serving two `FolderType`s (`automatedResponse` for inbound, + * `outboundAutomatedResponse` for outbound); a name-only key would collapse + * the two namespaces and silently land inbound keywords in an outbound + * folder. See `packages/business/src/folder/service.ts` `changeFolder` for + * the sibling enforcement of this same invariant. + * + * Resolves parents before children by repeatedly draining entries whose + * `parentSourceId` is already resolved (or null), so a manifest ordered + * arbitrarily still produces correct `paths`. + */ +export const resolveFolderManifest = async ( + ctx: TemplateInstallContext, + manifest: Readonly>, + /** + * Provenance category for warnings/tracking on rows this call creates. + * Folders are shared infrastructure used by several categories (flow, + * keywords, trigger, ...) — the caller, not this module, knows which + * category a given manifest entry actually belongs to. + */ + category: TemplateCategory, +): Promise => { + const entries = Object.entries(manifest) + if (entries.length === 0) { + return + } + + if (!ctx.idMaps.folder) { + ctx.idMaps.folder = new Map() + } + const idMap = ctx.idMaps.folder + const remaining = new Map(entries) + + // Bounded by entries.length: each successful iteration resolves at least + // one entry, so a cycle in parentSourceId simply leaves the cycle + // unresolved (skipped, not looped forever) rather than hanging. + for (let pass = 0; pass < entries.length && remaining.size > 0; pass++) { + const resolvedThisPass: string[] = [] + + for (const [sourceId, entry] of remaining) { + const parentTargetId = resolveParentTargetId(entry.parentSourceId, idMap) + if (parentTargetId === "unresolved") { + continue + } + + const targetId = await findOrCreateFolder( + ctx, + entry, + parentTargetId, + category, + ) + idMap.set(sourceId, targetId) + resolvedThisPass.push(sourceId) + } + + for (const sourceId of resolvedThisPass) { + remaining.delete(sourceId) + } + if (resolvedThisPass.length === 0) { + break + } + } + + for (const [sourceId, entry] of remaining) { + ctx.warn({ + category, + entityKind: "folder", + path: `manifests.folders.${sourceId}`, + value: entry.parentSourceId ?? "", + }) + } +} + +const resolveParentTargetId = ( + parentSourceId: string | null, + idMap: Map, +): string | null | "unresolved" => { + if (!parentSourceId || parentSourceId === rootFolderId) { + return null + } + const resolved = idMap.get(parentSourceId) + return resolved ?? "unresolved" +} + +const findOrCreateFolder = async ( + ctx: TemplateInstallContext, + entry: TemplateFolderManifestEntry, + parentTargetId: string | null, + category: TemplateCategory, +): Promise => { + const existing = await ctx.tx.query.folderModel.findFirst({ + where: { + workspaceId: ctx.workspaceId, + folderType: entry.folderType as FolderModel["folderType"], + name: entry.name, + parentId: parentTargetId ?? { isNull: true as const }, + }, + }) + if (existing) { + ctx.track({ + category, + resourceKind: "folder", + resourceId: existing.id, + sourceResourceId: existing.id, + wasExisting: true, + }) + return existing.id + } + + const paths = parentTargetId + ? await resolveParentPaths(ctx, parentTargetId) + : [] + + const [created] = await ctx.tx + .insert(folderModel) + .values({ + id: createId(), + workspaceId: ctx.workspaceId, + name: entry.name, + folderType: entry.folderType as FolderModel["folderType"], + parentId: parentTargetId, + paths, + }) + .returning() + + ctx.track({ + category, + resourceKind: "folder", + resourceId: created.id, + sourceResourceId: created.id, + wasExisting: false, + }) + return created.id +} + +const resolveParentPaths = async ( + ctx: TemplateInstallContext, + parentId: string, +): Promise => { + const parent = await ctx.tx.query.folderModel.findFirst({ + where: { id: parentId }, + }) + return parent ? [...parent.paths, parent.id] : [] +} diff --git a/packages/business/src/template/adapters/manifests/product-categories.ts b/packages/business/src/template/adapters/manifests/product-categories.ts new file mode 100644 index 000000000..4bd2b9b4a --- /dev/null +++ b/packages/business/src/template/adapters/manifests/product-categories.ts @@ -0,0 +1,115 @@ +import { productCategoryRepository } from "@chatbotx.io/database/repositories" +import type { TemplateProductCategoryManifestEntry } from "@chatbotx.io/flow-config" +import type { TemplateInstallContext } from "../types" + +const normalizeName = (name: string): string => name.trim() + +/** + * Find-or-create product categories from the template's manifest, resolving + * parents before children (same drain-loop shape as the folder manifest, + * since `productCategoryService.resolveByNames` is top-level-only and does + * not support a parent chain). Match is case-insensitive on + * `(workspaceId, parentId, name)`, mirroring the DB's own + * `nullsNotDistinct` unique constraint on that triple. + */ +export const resolveProductCategoryManifest = async ( + ctx: TemplateInstallContext, + manifest: Readonly>, +): Promise => { + const entries = Object.entries(manifest) + if (entries.length === 0) { + return + } + + if (!ctx.idMaps.productCategory) { + ctx.idMaps.productCategory = new Map() + } + const idMap = ctx.idMaps.productCategory + const remaining = new Map(entries) + + for (let pass = 0; pass < entries.length && remaining.size > 0; pass++) { + const resolvedThisPass: string[] = [] + + for (const [sourceId, entry] of remaining) { + const parentTargetId = resolveParentTargetId(entry.parentSourceId, idMap) + if (parentTargetId === "unresolved") { + continue + } + + const targetId = await findOrCreateProductCategory( + ctx, + entry, + parentTargetId, + ) + idMap.set(sourceId, targetId) + resolvedThisPass.push(sourceId) + } + + for (const sourceId of resolvedThisPass) { + remaining.delete(sourceId) + } + if (resolvedThisPass.length === 0) { + break + } + } + + for (const [sourceId, entry] of remaining) { + ctx.warn({ + category: "productCategories", + entityKind: "productCategory", + path: `manifests.productCategories.${sourceId}`, + value: entry.parentSourceId ?? "", + }) + } +} + +const resolveParentTargetId = ( + parentSourceId: string | null, + idMap: Map, +): string | null | "unresolved" => { + if (!parentSourceId) { + return null + } + const resolved = idMap.get(parentSourceId) + return resolved ?? "unresolved" +} + +const findOrCreateProductCategory = async ( + ctx: TemplateInstallContext, + entry: TemplateProductCategoryManifestEntry, + parentTargetId: string | null, +): Promise => { + const name = normalizeName(entry.name) + const allCategories = await productCategoryRepository.list( + ctx.workspaceId, + ctx.tx, + ) + const existing = allCategories.find( + (row) => + row.parentId === parentTargetId && + normalizeName(row.name).toLowerCase() === name.toLowerCase(), + ) + if (existing) { + ctx.track({ + category: "productCategories", + resourceKind: "productCategory", + resourceId: existing.id, + sourceResourceId: existing.id, + wasExisting: true, + }) + return existing.id + } + + const created = await productCategoryRepository.create( + { workspaceId: ctx.workspaceId, name, parentId: parentTargetId }, + ctx.tx, + ) + ctx.track({ + category: "productCategories", + resourceKind: "productCategory", + resourceId: created.id, + sourceResourceId: created.id, + wasExisting: false, + }) + return created.id +} diff --git a/packages/business/src/template/adapters/manifests/tags.ts b/packages/business/src/template/adapters/manifests/tags.ts new file mode 100644 index 000000000..718e0c1a3 --- /dev/null +++ b/packages/business/src/template/adapters/manifests/tags.ts @@ -0,0 +1,68 @@ +import type { TemplateTagManifestEntry } from "@chatbotx.io/flow-config" +import { tagService } from "../../../tag/service" +import type { TemplateInstallContext } from "../types" + +/** + * Find-or-create tags from the template's manifest, reusing + * `tagService.upsertByNames` verbatim for the actual find-or-create so there + * is exactly one implementation of "does a tag with this name already exist + * in this workspace". Queries existing tags first (rather than trusting + * `upsertByNames`'s uniform return) purely to know which names were + * pre-existing for accurate `wasExisting` provenance. + */ +export const resolveTagManifest = async ( + ctx: TemplateInstallContext, + manifest: Readonly>, +): Promise => { + const entries = Object.entries(manifest) + if (entries.length === 0) { + return + } + + const names = entries.map(([, entry]) => entry.name.trim()) + const existingByName = new Map( + ( + await ctx.tx.query.tagModel.findMany({ + where: { + workspaceId: ctx.workspaceId, + deletedAt: { isNull: true as const }, + name: { in: names }, + }, + columns: { id: true, name: true }, + }) + ).map((row) => [row.name, row.id]), + ) + + const resolved = await tagService.upsertByNames({ + workspaceId: ctx.workspaceId, + names, + tx: ctx.tx, + }) + const resolvedByName = new Map(resolved.map((row) => [row.name, row.id])) + + if (!ctx.idMaps.tag) { + ctx.idMaps.tag = new Map() + } + const idMap = ctx.idMaps.tag + for (const [sourceId, entry] of entries) { + const name = entry.name.trim() + const targetId = resolvedByName.get(name) + if (!targetId) { + ctx.warn({ + category: "tags", + entityKind: "tag", + path: `manifests.tags.${sourceId}`, + value: sourceId, + }) + continue + } + idMap.set(sourceId, targetId) + ctx.track({ + category: "tags", + resourceKind: "tag", + resourceId: targetId, + sourceResourceId: sourceId, + wasExisting: existingByName.has(name), + }) + } +} diff --git a/packages/business/src/template/adapters/naming.ts b/packages/business/src/template/adapters/naming.ts new file mode 100644 index 000000000..ebb20a949 --- /dev/null +++ b/packages/business/src/template/adapters/naming.ts @@ -0,0 +1,38 @@ +import { isUniqueViolationError } from "@chatbotx.io/database/client" + +const MAX_RETRY_ATTEMPTS = 20 + +/** + * Retries `insert` with a numeric suffix appended to whatever name field + * `insert` closes over, on a unique-constraint violation. A pre-query + * ("does this name already exist?") is TOCTOU-racy against a concurrent + * insert from the same install transaction or another install running at + * the same time — catching the real constraint violation is the only sound + * check. Bounded by `MAX_RETRY_ATTEMPTS`; exhausting it warns and skips + * rather than looping forever, since a template installing hundreds of + * same-named resources is not a case worth optimizing for. + */ +export const insertWithNameRetry = async ( + name: string, + insert: (candidateName: string) => Promise, + onGiveUp: (lastAttemptedName: string) => void, +): Promise => { + for (let attempt = 0; attempt < MAX_RETRY_ATTEMPTS; attempt++) { + const candidateName = attempt === 0 ? name : `${name} (${attempt + 1})` + try { + return await insert(candidateName) + } catch (error) { + if ( + !isUniqueViolationError(error) || + attempt === MAX_RETRY_ATTEMPTS - 1 + ) { + if (isUniqueViolationError(error)) { + onGiveUp(candidateName) + return + } + throw error + } + } + } + return +} diff --git a/packages/business/src/template/adapters/products.ts b/packages/business/src/template/adapters/products.ts new file mode 100644 index 000000000..f74b22b0e --- /dev/null +++ b/packages/business/src/template/adapters/products.ts @@ -0,0 +1,144 @@ +import type { ProductImageInput } from "../../product/service" +import { + type ProductWriteData, + productAddonService, + productService, +} from "../../product/service" +import type { + PatchTask, + ResourceAdapter, + TemplateInstallContext, +} from "./types" + +type TemplateProductAddon = { + name: string + maxSelections: number + addonProductIds: string[] +} + +type TemplateProductVariant = { + combination: Record + price: number + isEnabled: boolean +} + +type TemplateProductVariantOption = { + name: string + values: string[] + position: number +} + +type TemplateProductEntry = Omit & { + sourceId: string + images?: ProductImageInput[] + variantOptions?: TemplateProductVariantOption[] + variants?: TemplateProductVariant[] + addons?: TemplateProductAddon[] +} + +/** + * Products insert without their addons — `ProductAddon.addonProductIds` can + * point at a sibling product from this same template that has not been + * created yet (a within-category cyclic reference, the same shape as + * cross-flow jumps in `flows.ts`). Category/subcategory refs are resolved + * eagerly since `productCategories` is a Phase-R manifest, always available + * before Phase 1 starts. + */ +export const productsAdapter: ResourceAdapter = { + category: "products", + providesKinds: ["product"], + consumesKinds: ["productCategory", "product"], + deferredKinds: ["product"], + + async insert( + ctx: TemplateInstallContext, + entries: readonly (Record & { sourceId: string })[], + ): Promise { + if (!ctx.idMaps.product) { + ctx.idMaps.product = new Map() + } + const productIdMap = ctx.idMaps.product + const pendingAddonsByProductId = new Map() + + for (const rawEntry of entries) { + const entry = rawEntry as unknown as TemplateProductEntry + const categoryId = resolveCategoryReference(ctx, entry.categoryId) + const subcategoryId = resolveCategoryReference(ctx, entry.subcategoryId) + + const product = await productService.create({ + data: { + ...entry, + workspaceId: ctx.workspaceId, + categoryId, + subcategoryId, + }, + tx: ctx.tx, + }) + + productIdMap.set(entry.sourceId, product.id) + if (entry.addons && entry.addons.length > 0) { + pendingAddonsByProductId.set(product.id, entry.addons) + } + ctx.track({ + category: "products", + resourceKind: "product", + resourceId: product.id, + sourceResourceId: entry.sourceId, + wasExisting: false, + }) + } + + return [ + { + category: "products", + apply: async (patchCtx) => { + for (const [productId, addons] of pendingAddonsByProductId) { + const resolvedAddons = addons.flatMap((addon) => { + const addonProductIds = addon.addonProductIds.flatMap( + (sourceId) => { + const targetId = patchCtx.idMaps.product?.get(sourceId) + if (!targetId) { + patchCtx.warn({ + category: "products", + entityKind: "product", + path: `products.${productId}.addons.addonProductIds`, + value: sourceId, + }) + return [] + } + return [targetId] + }, + ) + return [{ ...addon, addonProductIds }] + }) + await productAddonService.createBulk({ + productId, + addons: resolvedAddons, + tx: patchCtx.tx, + }) + } + }, + }, + ] + }, +} + +const resolveCategoryReference = ( + ctx: TemplateInstallContext, + sourceId: string | null | undefined, +): string | null => { + if (!sourceId) { + return null + } + const targetId = ctx.idMaps.productCategory?.get(sourceId) + if (!targetId) { + ctx.warn({ + category: "products", + entityKind: "productCategory", + path: "products.categoryId", + value: sourceId, + }) + return null + } + return targetId +} diff --git a/packages/business/src/template/adapters/registry.ts b/packages/business/src/template/adapters/registry.ts new file mode 100644 index 000000000..b7b73d022 --- /dev/null +++ b/packages/business/src/template/adapters/registry.ts @@ -0,0 +1,87 @@ +import type { TemplateCategory } from "@chatbotx.io/database/partials" +import { aiAgentsAdapter } from "./ai-agents" +import { aiFunctionsAdapter } from "./ai-functions" +import { calendarsAdapter } from "./calendars" +import { entryPointLinksAdapter } from "./entry-point-links" +import { fbCommentAutomationsAdapter } from "./fb-comment-automations" +import { flowsAdapter } from "./flows" +import { keywordsAdapter } from "./keywords" +import { productsAdapter } from "./products" +import { settingsAdapter } from "./settings" +import { triggersAdapter } from "./triggers" +import type { ResourceAdapter } from "./types" +import { webchatsAdapter } from "./webchats" + +/** + * Every install-time resource adapter, keyed by category. `satisfies + * Record` makes a category added to + * `templateCategories` (`packages/database/src/partials/template.ts`) + * without a matching adapter here a compile error, the same guard + * `packages/imports/src/registry.ts` uses for `ImportType`. + * + * `customFields`/`tags`/`productCategories` are Phase-R manifest kinds + * (`adapters/manifests/*`), not Phase-1 resource adapters — they resolve + * before any adapter here runs and never appear in this registry. + */ +export const templateAdapterRegistry = { + products: productsAdapter, + settings: settingsAdapter, + aiFunctions: aiFunctionsAdapter, + aiAgents: aiAgentsAdapter, + calendars: calendarsAdapter, + webchats: webchatsAdapter, + flows: flowsAdapter, + keywords: keywordsAdapter, + entryPointLinks: entryPointLinksAdapter, + triggers: triggersAdapter, + fbCommentAutomations: fbCommentAutomationsAdapter, +} satisfies Partial> + +/** + * Install order, hand-written to match the plan's dependency analysis + * (`docs`/plan: products -> settings -> aiFunctions -> aiAgents -> + * calendars -> webchats -> flows -> keywords -> entryPointLinks -> triggers + * -> fbCommentAutomations). Asserted against a topo-sort of + * `consumesKinds \ deferredKinds` in `install-order.ts` so a forgotten + * `deferredKinds` entry fails loudly at module load instead of silently + * writing a dangling reference. + */ +export const TEMPLATE_INSTALL_ORDER: readonly TemplateCategory[] = [ + "products", + "settings", + "aiFunctions", + "aiAgents", + "calendars", + "webchats", + "flows", + "keywords", + "entryPointLinks", + "triggers", + "fbCommentAutomations", +] + +// Compile-time-adjacent guard: every category actually registered above +// must appear exactly once in the hand-written order, and vice versa. +const registeredCategories = new Set( + Object.keys(templateAdapterRegistry) as TemplateCategory[], +) +const orderedCategories = new Set(TEMPLATE_INSTALL_ORDER) +if ( + registeredCategories.size !== orderedCategories.size || + ![...registeredCategories].every((category) => + orderedCategories.has(category), + ) +) { + throw new Error( + "templateAdapterRegistry and TEMPLATE_INSTALL_ORDER have diverged — every registered category must appear exactly once in TEMPLATE_INSTALL_ORDER.", + ) +} + +export const getTemplateAdapter = ( + category: TemplateCategory, +): ResourceAdapter | undefined => + ( + templateAdapterRegistry as Partial< + Record + > + )[category] diff --git a/packages/business/src/template/adapters/settings.ts b/packages/business/src/template/adapters/settings.ts new file mode 100644 index 000000000..128403c25 --- /dev/null +++ b/packages/business/src/template/adapters/settings.ts @@ -0,0 +1,113 @@ +import { savedReplyModel } from "@chatbotx.io/database/schema" +import { createId } from "@chatbotx.io/utils" +import { botFieldService } from "../../bot-field/service" +import type { + PatchTask, + ResourceAdapter, + TemplateInstallContext, +} from "./types" + +type TemplateSavedReplyEntry = { + sourceId: string + shortcut: string + text: string +} + +type TemplateBotFieldEntry = { + sourceId: string + name: string + type: string + value: string | null + description: string | null + // Bot fields share the `customField` folder namespace (see + // `botFieldService.create`'s `folderType: "customField"` scoping), so + // this resolves against `idMaps.folder`, keyed the same way `customField` + // folders are in the manifest. + folderId: string | null +} + +/** + * `settings` bundles two unrelated tables (`SavedReply`, `BotField`) under + * one template category, per the plan's "Settings subset" — `CustomField`/ + * `Tag` participate only via their Phase-R manifests, `SystemField` is + * excluded entirely (no `workspaceId`, a global table). + */ +export const settingsAdapter: ResourceAdapter = { + category: "settings", + providesKinds: [], + consumesKinds: ["folder"], + deferredKinds: [], + + async insert( + ctx: TemplateInstallContext, + entries: readonly (Record & { sourceId: string })[], + ): Promise { + for (const rawEntry of entries) { + const entry = rawEntry as unknown as + | (TemplateSavedReplyEntry & { kind: "savedReply" }) + | (TemplateBotFieldEntry & { kind: "botField" }) + + if (entry.kind === "savedReply") { + const [created] = await ctx.tx + .insert(savedReplyModel) + .values({ + id: createId(), + workspaceId: ctx.workspaceId, + shortcut: entry.shortcut, + text: entry.text, + }) + .returning() + ctx.track({ + category: "settings", + resourceKind: "savedReply", + resourceId: created.id, + sourceResourceId: entry.sourceId, + wasExisting: false, + }) + continue + } + + const folderId = resolveFolderRef(ctx, entry) + const created = await botFieldService.create({ + workspaceId: ctx.workspaceId, + data: { + name: entry.name, + type: entry.type as never, + value: entry.value, + description: entry.description, + folderId, + }, + tx: ctx.tx, + }) + ctx.track({ + category: "settings", + resourceKind: "botField", + resourceId: created.id, + sourceResourceId: entry.sourceId, + wasExisting: false, + }) + } + + return [] satisfies PatchTask[] + }, +} + +const resolveFolderRef = ( + ctx: TemplateInstallContext, + entry: TemplateBotFieldEntry, +): string | null => { + if (!entry.folderId) { + return null + } + const targetId = ctx.idMaps.folder?.get(entry.folderId) + if (!targetId) { + ctx.warn({ + category: "settings", + entityKind: "folder", + path: `settings.botFields.${entry.sourceId}.folderId`, + value: entry.folderId, + }) + return null + } + return targetId +} diff --git a/packages/business/src/template/adapters/triggers.ts b/packages/business/src/template/adapters/triggers.ts new file mode 100644 index 000000000..6148c1f82 --- /dev/null +++ b/packages/business/src/template/adapters/triggers.ts @@ -0,0 +1,135 @@ +import { triggerModel } from "@chatbotx.io/database/schema" +import { remapReferences } from "@chatbotx.io/flow-config" +import { createId } from "@chatbotx.io/utils" +import { insertWithNameRetry } from "./naming" +import type { + PatchTask, + ResourceAdapter, + TemplateInstallContext, +} from "./types" + +type TemplateTriggerEntry = { + sourceId: string + name: string + active: boolean + // Arbitrary jsonb action-step configs — the same reference-remapping + // surface as flow steps. `Condition.sourceId` (discriminated by a sibling + // `sourceType` of `trigger`/`webhook`) lives inside these, handled by the + // generic remapper's `DISCRIMINATED_REFERENCE_FIELDS` rule. + actions: unknown[] + folderId: string | null +} + +const TRIGGER_REMAP_KINDS = [ + "customField", + "sequence", + "aiAgent", + "integration", + "calendar", + "questionnaire", + "couponTopic", + "inbox", + "messengerPersona", + "spreadsheet", + "tag", + "flow", + "webhook", + "trigger", +] + +/** + * `Trigger(workspaceId, name)` has a real unique constraint, so a name + * collision is handled via the shared retry-on-conflict suffixer, same as + * entry-point links. `actions` are remapped through the generic engine + * (every kind currently resolvable by the time triggers insert, since + * triggers are the last Phase-1 category before fbCommentAutomations). + */ +export const triggersAdapter: ResourceAdapter = { + category: "triggers", + providesKinds: ["trigger"], + consumesKinds: [...TRIGGER_REMAP_KINDS, "folder"], + deferredKinds: [], + + async insert( + ctx: TemplateInstallContext, + entries: readonly (Record & { sourceId: string })[], + ): Promise { + if (!ctx.idMaps.trigger) { + ctx.idMaps.trigger = new Map() + } + const idMap = ctx.idMaps.trigger + + for (const rawEntry of entries) { + const entry = rawEntry as unknown as TemplateTriggerEntry + const remappedActions = remapReferences(entry.actions, ctx.idMaps, { + kinds: TRIGGER_REMAP_KINDS, + onUnresolved: (ref) => + ctx.warn({ + category: "triggers", + entityKind: ref.entityKind, + path: `triggers.${entry.sourceId}.actions.${ref.path}`, + value: ref.value, + }), + }) + const folderId = resolveFolderRef(ctx, entry) + + const created = await insertWithNameRetry( + entry.name, + (candidateName) => + ctx.tx + .insert(triggerModel) + .values({ + id: createId(), + workspaceId: ctx.workspaceId, + name: candidateName, + active: entry.active, + actions: remappedActions, + folderId, + }) + .returning() + .then(([row]) => row), + (lastAttemptedName) => + ctx.warn({ + category: "triggers", + entityKind: "name", + path: `triggers.${entry.sourceId}.name`, + value: lastAttemptedName, + }), + ) + if (!created) { + continue + } + + idMap.set(entry.sourceId, created.id) + ctx.track({ + category: "triggers", + resourceKind: "trigger", + resourceId: created.id, + sourceResourceId: entry.sourceId, + wasExisting: false, + }) + } + + return [] satisfies PatchTask[] + }, +} + +const resolveFolderRef = ( + ctx: TemplateInstallContext, + entry: TemplateTriggerEntry, +): string | null => { + if (!entry.folderId) { + return null + } + const targetId = ctx.idMaps.folder?.get(entry.folderId) + if (!targetId) { + ctx.warn({ + category: "triggers", + entityKind: "folder", + path: `triggers.${entry.sourceId}.folderId`, + value: entry.folderId, + }) + return null + } + return targetId +} diff --git a/packages/business/src/template/adapters/types.ts b/packages/business/src/template/adapters/types.ts new file mode 100644 index 000000000..14a453337 --- /dev/null +++ b/packages/business/src/template/adapters/types.ts @@ -0,0 +1,69 @@ +import type { DatabaseClient } from "@chatbotx.io/database/client" +import type { TemplateCategory } from "@chatbotx.io/database/partials" +import type { ReferenceIdMaps } from "@chatbotx.io/flow-config" + +/** + * A reference an adapter could not resolve at insert time. Surfaced to the + * installation's `warnings` column — never thrown, since an unresolvable + * reference should degrade the install to `partial`, not abort it. + */ +export type TemplateInstallWarning = { + category: TemplateCategory + entityKind: string + path: string + value: string +} + +/** + * A deferred fix-up, drained after every category has been inserted (Phase + * 2). Exists because the dependency graph between categories is genuinely + * cyclic (Flow -> AIAgent -> AIFunction -> Flow), so some references cannot + * be resolved at the moment their owning row is first inserted. + */ +export type PatchTask = { + category: TemplateCategory + apply: (ctx: TemplateInstallContext) => Promise +} + +/** + * Mutable state threaded through one install's three phases. `idMaps` + * accumulates sourceId -> targetId per entity kind as each category (or + * manifest) resolves its rows, so later categories can remap references + * into earlier ones (e.g. a flow referencing a customField created in + * Phase R). + */ +export type TemplateInstallContext = { + tx: DatabaseClient + workspaceId: string + installationId: string + idMaps: Record> + track: (entry: { + category: TemplateCategory + resourceKind: string + resourceId: string + sourceResourceId: string + wasExisting: boolean + }) => void + warn: (warning: TemplateInstallWarning) => void +} + +/** + * One category's install behavior. `providesKinds`/`consumesKinds` drive the + * install-order assertion in `install-order.ts`; `deferredKinds` marks which + * of `consumesKinds` this adapter is allowed to leave unresolved at insert + * time (fixed up later via the `PatchTask`s returned from `insert`). + */ +export type ResourceAdapter = { + readonly category: TemplateCategory + readonly providesKinds: readonly string[] + readonly consumesKinds: readonly string[] + readonly deferredKinds: readonly string[] + insert: ( + ctx: TemplateInstallContext, + entries: readonly (Record & { sourceId: string })[], + ) => Promise +} + +export const idMapsSnapshot = ( + idMaps: Record>, +): ReferenceIdMaps => idMaps diff --git a/packages/business/src/template/adapters/webchats.ts b/packages/business/src/template/adapters/webchats.ts new file mode 100644 index 000000000..b04b063af --- /dev/null +++ b/packages/business/src/template/adapters/webchats.ts @@ -0,0 +1,145 @@ +import { eq } from "@chatbotx.io/database/client" +import { integrationWebchatModel } from "@chatbotx.io/database/schema" +import { ChatbotXException } from "../../errors" +import { + type CreateWebchatRequest, + integrationWebchatService, +} from "../../integration-webchat/service" +import type { + PatchTask, + ResourceAdapter, + TemplateInstallContext, +} from "./types" + +type TemplateWebchatEntry = { + sourceId: string + name: string + auth?: Record + enable: boolean + authorizedDomains: string[] + conversationStarters: unknown[] + persistentMenus: unknown[] + brandColor: string + hideHeader: boolean + showLogo: boolean + hideMessageInput: boolean + customCss: string | null + // Points at a `resources.flows` sourceId — flows insert *after* webchats + // in Phase 1, so this is always deferred to Phase 2. + welcomeFlowId?: string | null +} + +const isChannelLimitReached = (error: unknown): boolean => + error instanceof ChatbotXException && error.code === "channelLimitReached" + +/** + * Webchats provision a brand-new Inbox per row, which consumes channel + * quota (`inboxService.create` -> `quotaEnforcementService.tryConsume`). + * Unlike every other adapter, a single quota-exhausted webchat must NOT + * abort the whole install — this is the one place a per-resource DB error + * is caught and downgraded to a warning rather than left to propagate and + * roll back the install transaction. Any other error still propagates. + * + * `welcomeFlowId` is always deferred (webchats insert before flows in Phase + * 1) and patched once `idMaps.flow` is complete. + */ +export const webchatsAdapter: ResourceAdapter = { + category: "webchats", + providesKinds: [], + consumesKinds: ["flow"], + deferredKinds: ["flow"], + + async insert( + ctx: TemplateInstallContext, + entries: readonly (Record & { sourceId: string })[], + ): Promise { + if (entries.length === 0) { + return [] + } + + const workspace = await ctx.tx.query.workspaceModel.findFirst({ + where: { id: ctx.workspaceId }, + columns: { ownerId: true }, + }) + if (!workspace) { + return [] + } + + const pendingWelcomeFlowBySourceId = new Map() + + for (const rawEntry of entries) { + const entry = rawEntry as unknown as TemplateWebchatEntry + const data: CreateWebchatRequest = { + name: entry.name, + auth: entry.auth ?? {}, + enable: entry.enable, + authorizedDomains: entry.authorizedDomains, + conversationStarters: entry.conversationStarters, + persistentMenus: entry.persistentMenus, + brandColor: entry.brandColor, + hideHeader: entry.hideHeader, + showLogo: entry.showLogo, + hideMessageInput: entry.hideMessageInput, + customCss: entry.customCss, + welcomeFlowId: null, + } + + let created: Awaited> + try { + created = await integrationWebchatService.create( + { workspaceId: ctx.workspaceId, ownerId: workspace.ownerId, data }, + ctx.tx, + ) + } catch (error) { + if (!isChannelLimitReached(error)) { + throw error + } + ctx.warn({ + category: "webchats", + entityKind: "quota", + path: `webchats.${entry.sourceId}`, + value: "channelLimitReached", + }) + continue + } + + if (entry.welcomeFlowId) { + pendingWelcomeFlowBySourceId.set(created.id, entry.welcomeFlowId) + } + ctx.track({ + category: "webchats", + resourceKind: "integrationWebchat", + resourceId: created.id, + sourceResourceId: entry.sourceId, + wasExisting: false, + }) + } + + return [ + { + category: "webchats", + apply: async (patchCtx) => { + for (const [ + webchatId, + flowSourceId, + ] of pendingWelcomeFlowBySourceId) { + const targetFlowId = patchCtx.idMaps.flow?.get(flowSourceId) + if (!targetFlowId) { + patchCtx.warn({ + category: "webchats", + entityKind: "flow", + path: `webchats.${webchatId}.welcomeFlowId`, + value: flowSourceId, + }) + continue + } + await patchCtx.tx + .update(integrationWebchatModel) + .set({ welcomeFlowId: targetFlowId }) + .where(eq(integrationWebchatModel.id, webchatId)) + } + }, + }, + ] + }, +} diff --git a/packages/business/src/template/index.ts b/packages/business/src/template/index.ts new file mode 100644 index 000000000..9a6b335a6 --- /dev/null +++ b/packages/business/src/template/index.ts @@ -0,0 +1,15 @@ +export { templateInstallService } from "./install.service" +export { + assertDeletable, + templateAllowDeleteViolationException, +} from "./installed-resource.service" +export { + type PublicTemplateProjection, + templateCrossTenantInstallException, + templateService, + templateShareDisabledException, +} from "./service" +export { + templatePayloadTooLargeException, + templateSaveValidationException, +} from "./snapshot.service" diff --git a/packages/business/src/template/install.service.ts b/packages/business/src/template/install.service.ts new file mode 100644 index 000000000..2d30ef821 --- /dev/null +++ b/packages/business/src/template/install.service.ts @@ -0,0 +1,396 @@ +import { type DatabaseClient, db, eq } from "@chatbotx.io/database/client" +import type { + FolderType, + TemplateCategory, +} from "@chatbotx.io/database/partials" +import { + templateInstallationModel, + templateInstalledResourceModel, +} from "@chatbotx.io/database/schema" +import type { + TemplateExport, + TemplateFolderManifestEntry, +} from "@chatbotx.io/flow-config" +import { createId } from "@chatbotx.io/utils" +import { automatedResponseService } from "../automated-response/service" +import { customFieldService } from "../custom-field/service" +import { toPublicErrorMessage } from "../errors" +import { folderService } from "../folder" +import { resolveCustomFieldManifest } from "./adapters/manifests/custom-fields" +import { resolveFolderManifest } from "./adapters/manifests/folders" +import { resolveProductCategoryManifest } from "./adapters/manifests/product-categories" +import { resolveTagManifest } from "./adapters/manifests/tags" +import { + TEMPLATE_INSTALL_ORDER, + templateAdapterRegistry, +} from "./adapters/registry" +import type { + PatchTask, + TemplateInstallContext, + TemplateInstallWarning, +} from "./adapters/types" + +const MAX_STORED_WARNINGS = 200 + +type TrackedResource = { + category: TemplateCategory + resourceKind: string + resourceId: string + sourceResourceId: string + wasExisting: boolean +} + +/** + * Every folder-manifest entry is annotated with the category it actually + * belongs to, so `resolveFolderManifest`'s provenance/warnings land on the + * right category rather than a hardcoded one — see `manifests/folders.ts`. + */ +type FolderManifestByCategory = Partial< + Record +> + +const groupFoldersByCategory = ( + folders: TemplateExport["manifests"]["folders"], +): FolderManifestByCategory => { + const grouped: FolderManifestByCategory = {} + for (const [sourceId, entry] of Object.entries(folders)) { + const category = folderTypeToCategory(entry.folderType) + const bucket = grouped[category] ?? {} + bucket[sourceId] = entry + grouped[category] = bucket + } + return grouped +} + +/** + * Maps a folder's `folderType` back to the template category that owns it, + * for provenance/warning attribution only — install ordering for folders + * themselves is unaffected (all folders resolve in Phase R, before any + * category-specific ordering applies). + */ +const folderTypeToCategory = (folderType: string): TemplateCategory => { + switch (folderType) { + case "automatedResponse": + case "outboundAutomatedResponse": + return "keywords" + case "trigger": + return "triggers" + case "customField": + return "settings" + default: + return "flows" + } +} + +/** + * Flattens `resources.settings.{savedReplies,botFields}` into one array with + * an injected `kind` discriminator, matching `settingsAdapter`'s expected + * entry shape — the only category whose stored resources aren't already a + * flat array of `{sourceId, ...}` rows. + */ +const flattenSettingsEntries = ( + settings: TemplateExport["resources"]["settings"], +): (Record & { sourceId: string })[] => [ + ...settings.savedReplies.map((entry) => ({ ...entry, kind: "savedReply" })), + ...settings.botFields.map((entry) => ({ ...entry, kind: "botField" })), +] + +const entriesForCategory = ( + resources: TemplateExport["resources"], + category: TemplateCategory, +): (Record & { sourceId: string })[] => { + if (category === "settings") { + return flattenSettingsEntries(resources.settings) + } + const value = resources[category as keyof typeof resources] + return Array.isArray(value) + ? (value as (Record & { sourceId: string })[]) + : [] +} + +/** + * Builds the mutable `TemplateInstallContext` shared across all three + * phases. `track`/`warn` are synchronous accumulators — no adapter awaits + * them — so the actual `TemplateInstalledResource` batch insert happens + * once, explicitly, after tracked rows accumulate (see `flushTracked` + * below) rather than as an unawaited per-call side effect racing the + * transaction commit. + */ +const createInstallContext = ( + tx: DatabaseClient, + installationId: string, + workspaceId: string, +): { + ctx: TemplateInstallContext + tracked: TrackedResource[] + warnings: TemplateInstallWarning[] + resourceCount: { value: number } +} => { + const tracked: TrackedResource[] = [] + const warnings: TemplateInstallWarning[] = [] + const resourceCount = { value: 0 } + + const ctx: TemplateInstallContext = { + tx, + workspaceId, + installationId, + idMaps: {}, + track: (entry) => { + tracked.push(entry) + resourceCount.value++ + }, + warn: (warning) => { + if (warnings.length < MAX_STORED_WARNINGS) { + warnings.push(warning) + } + }, + } + + return { ctx, tracked, warnings, resourceCount } +} + +const flushTracked = async ( + tx: DatabaseClient, + installationId: string, + workspaceId: string, + tracked: TrackedResource[], +): Promise => { + if (tracked.length === 0) { + return + } + await tx.insert(templateInstalledResourceModel).values( + tracked.map((entry) => ({ + id: createId(), + installationId, + workspaceId, + category: entry.category, + resourceKind: entry.resourceKind, + resourceId: entry.resourceId, + sourceResourceId: entry.sourceResourceId, + wasExisting: entry.wasExisting, + })), + ) + tracked.length = 0 +} + +type RunInstallResult = { + status: "completed" | "partial" + warnings: TemplateInstallWarning[] + resourceCount: number + installFolderId: string | null +} + +/** + * When the source template has `createInstallFolder` enabled, creates one + * root folder per distinct `FolderType` present in the manifest, pre-seeds + * `ctx.idMaps.folder` with each root's id under a synthetic sourceId, and + * rewrites every root-level entry (`parentSourceId: null`) to point at that + * synthetic sourceId — so `resolveFolderManifest` nests it under the new + * root without ever needing a fabricated manifest entry of its own. + * + * Threading the parent through at manifest-resolution time (rather than + * `folderService.changeFolder` after the fact) avoids the + * `automatedResponse`/`outboundAutomatedResponse` shared-table scoping trap + * documented on `FolderService.changeFolder` (AGENTS.md invariant #17). + * + * Returns the first created root folder id (for display on + * `TemplateInstallation.installFolderId`) — categories sharing one + * `FolderType` (e.g. Keywords' two automatedResponse variants) still nest + * under the same single root per type. + */ +const nestManifestUnderInstallFolders = async ( + ctx: TemplateInstallContext, + templateName: string, + folders: Readonly>, +): Promise<{ + folders: Record + installFolderId: string | null +}> => { + const folderTypesUsed = new Set( + Object.values(folders).map((entry) => entry.folderType), + ) + if (folderTypesUsed.size === 0) { + return { folders: { ...folders }, installFolderId: null } + } + + if (!ctx.idMaps.folder) { + ctx.idMaps.folder = new Map() + } + const idMap = ctx.idMaps.folder + + const rootSourceIdByFolderType = new Map() + let firstRootId: string | null = null + for (const folderType of folderTypesUsed) { + const root = await folderService.create({ + workspaceId: ctx.workspaceId, + data: { + name: templateName, + parentId: null, + folderType: folderType as FolderType, + }, + tx: ctx.tx, + }) + const rootSourceId = `__installRoot:${folderType}` + idMap.set(rootSourceId, root.id) + rootSourceIdByFolderType.set(folderType, rootSourceId) + firstRootId ??= root.id + } + + const nested = Object.fromEntries( + Object.entries(folders).map(([sourceId, entry]) => [ + sourceId, + entry.parentSourceId === null + ? { + ...entry, + parentSourceId: + rootSourceIdByFolderType.get(entry.folderType) ?? null, + } + : entry, + ]), + ) + + return { folders: nested, installFolderId: firstRootId } +} + +/** + * Phase R (manifests) -> Phase 1 (adapters, in `TEMPLATE_INSTALL_ORDER`) -> + * Phase 2 (drain every returned `PatchTask`) — all inside one transaction, + * with provenance rows written inside it. A partial install has no + * compensating-delete story across 15+ tables, so anything short of a full + * commit means the whole install rolls back; per-resource failures (a + * webchat's quota exhaustion, an unresolved reference) degrade to a + * `warnings` entry instead of throwing. + */ +const runInstall = async ( + tx: DatabaseClient, + input: { + installationId: string + workspaceId: string + payload: TemplateExport + templateName: string + createInstallFolder: boolean + }, +): Promise => { + const { ctx, tracked, warnings, resourceCount } = createInstallContext( + tx, + input.installationId, + input.workspaceId, + ) + + let installFolderId: string | null = null + let folderManifest = input.payload.manifests.folders + if (input.createInstallFolder) { + const nested = await nestManifestUnderInstallFolders( + ctx, + input.templateName, + folderManifest, + ) + folderManifest = nested.folders + installFolderId = nested.installFolderId + } + + const foldersByCategory = groupFoldersByCategory(folderManifest) + for (const [category, folders] of Object.entries(foldersByCategory)) { + await resolveFolderManifest(ctx, folders, category as TemplateCategory) + } + await resolveCustomFieldManifest(ctx, input.payload.manifests.customFields) + await resolveTagManifest(ctx, input.payload.manifests.tags) + await resolveProductCategoryManifest( + ctx, + input.payload.manifests.productCategories, + ) + await flushTracked(tx, input.installationId, input.workspaceId, tracked) + + const patchTasks: PatchTask[] = [] + for (const category of TEMPLATE_INSTALL_ORDER) { + const adapter = + templateAdapterRegistry[category as keyof typeof templateAdapterRegistry] + if (!adapter) { + continue + } + const entries = entriesForCategory(input.payload.resources, category) + if (entries.length === 0) { + continue + } + const tasks = await adapter.insert(ctx, entries) + patchTasks.push(...tasks) + await flushTracked(tx, input.installationId, input.workspaceId, tracked) + } + + for (const task of patchTasks) { + await task.apply(ctx) + } + await flushTracked(tx, input.installationId, input.workspaceId, tracked) + + return { + status: warnings.length > 0 ? "partial" : "completed", + warnings, + resourceCount: resourceCount.value, + installFolderId, + } +} + +/** + * Cache tags touched by an install, drained by the caller strictly after + * the transaction commits — invalidating inside `tx` risks repopulating + * Redis from an uncommitted read, exactly as `importFlowExport` documents. + */ +const invalidateAfterCommit = async (workspaceId: string): Promise => { + await Promise.all([ + customFieldService.invalidate({ workspaceId }), + automatedResponseService.invalidateCache(workspaceId), + ]) +} + +export const templateInstallService = { + /** + * Runs the full install inside one transaction; writes `status` ( + * `installing` -> `completed`/`partial`) before commit. On any thrown + * error the transaction rolls back entirely and `status: "failed"` is + * written in a SEPARATE transaction afterward (the `importService.fail` + * pattern) — a rolled-back transaction cannot itself carry the failure + * record. + */ + async run(input: { + installationId: string + workspaceId: string + payload: TemplateExport + templateName: string + createInstallFolder: boolean + }): Promise { + try { + await db.transaction(async (tx) => { + await tx + .update(templateInstallationModel) + .set({ status: "installing" }) + .where(eq(templateInstallationModel.id, input.installationId)) + + const outcome = await runInstall(tx, input) + + await tx + .update(templateInstallationModel) + .set({ + status: outcome.status, + warnings: outcome.warnings, + warningCount: outcome.warnings.length, + resourceCount: outcome.resourceCount, + installFolderId: outcome.installFolderId, + completedAt: new Date(), + }) + .where(eq(templateInstallationModel.id, input.installationId)) + }) + + await invalidateAfterCommit(input.workspaceId) + } catch (error) { + await db + .update(templateInstallationModel) + .set({ + status: "failed", + errorMessage: toPublicErrorMessage(error, "Template install failed"), + completedAt: new Date(), + }) + .where(eq(templateInstallationModel.id, input.installationId)) + throw error + } + }, +} diff --git a/packages/business/src/template/installed-resource.service.ts b/packages/business/src/template/installed-resource.service.ts new file mode 100644 index 000000000..ec25049b5 --- /dev/null +++ b/packages/business/src/template/installed-resource.service.ts @@ -0,0 +1,55 @@ +import { db } from "@chatbotx.io/database/client" +import { ChatbotXException } from "../errors" + +export const templateAllowDeleteViolationException = () => + new ChatbotXException( + "This resource was installed from a template that disallows deletion", + "templateAllowDeleteViolation", + ) + +/** + * Enforces `TemplateInstallation.permissions.allowDelete` for a category's + * delete path. Filters `wasExisting = false` — a find-or-create manifest + * match points at a row the installer already owned before the install + * (`wasExisting: true`), and locking that row against deletion would be + * hostile (it existed independently of this install). A `resourceId` that + * simply doesn't appear in `TemplateInstalledResource` is treated as + * already-gone, not blocked. + * + * Called from every affected category's own delete path — this function + * only decides yes/no, it never performs the delete itself. + */ +export const assertDeletable = async (input: { + workspaceId: string + resourceKind: string + resourceIds: readonly string[] +}): Promise => { + if (input.resourceIds.length === 0) { + return + } + + const rows = await db.query.templateInstalledResourceModel.findMany({ + where: { + workspaceId: input.workspaceId, + resourceKind: input.resourceKind, + resourceId: { in: [...input.resourceIds] }, + wasExisting: false, + }, + columns: { resourceId: true, installationId: true }, + }) + if (rows.length === 0) { + return + } + + const installationIds = [...new Set(rows.map((row) => row.installationId))] + const installations = await db.query.templateInstallationModel.findMany({ + where: { id: { in: installationIds } }, + columns: { id: true, permissions: true }, + }) + const blockingInstallation = installations.find( + (installation) => !installation.permissions.allowDelete, + ) + if (blockingInstallation) { + throw templateAllowDeleteViolationException() + } +} diff --git a/packages/business/src/template/service.ts b/packages/business/src/template/service.ts new file mode 100644 index 000000000..8a5023242 --- /dev/null +++ b/packages/business/src/template/service.ts @@ -0,0 +1,478 @@ +import { db, eq } from "@chatbotx.io/database/client" +import type { + TemplatePermissions, + TemplateSelection, +} from "@chatbotx.io/database/partials" +import { + templateInstallationModel, + templateModel, +} from "@chatbotx.io/database/schema" +import type { + TemplateInstallationModel, + TemplateModel, +} from "@chatbotx.io/database/types" +import { parseTemplateExport } from "@chatbotx.io/flow-config" +import { createId } from "@chatbotx.io/utils" +import { ChatbotXException, notFoundException } from "../errors" +import { workspaceService } from "../workspace" +import { generateShareToken } from "./share-token" +import { buildTemplateSnapshot } from "./snapshot.service" + +export const templateShareDisabledException = () => + new ChatbotXException( + "This share link is no longer available", + "templateShareDisabled", + ) + +export const templateCrossTenantInstallException = () => + new ChatbotXException( + "This template is not available for your workspace", + "templateCrossTenantInstall", + ) + +/** + * Explicit projection for the public share-token landing page — a + * hard-whitelisted column set, never a spread of the row. The page is + * internet-reachable with no session, so leaking `workspaceId`, internal + * resource ids, or anything not in this list would be a real information + * disclosure, not a cosmetic bug. + */ +export type PublicTemplateProjection = { + name: string + description: string | null + imageUrl: string | null + publisherName: string | null + youtubeVideoId: string | null + testLink: string | null + categoryCounts: TemplateModel["categoryCounts"] + tenantId: string +} + +const toPublicProjection = (row: TemplateModel): PublicTemplateProjection => ({ + name: row.name, + description: row.description, + imageUrl: row.imageUrl, + publisherName: row.publisherName, + youtubeVideoId: row.youtubeVideoId, + testLink: row.testLink, + categoryCounts: row.categoryCounts, + tenantId: row.tenantId, +}) + +class TemplateService { + async list(workspaceId: string): Promise { + return await db.query.templateModel.findMany({ + where: { workspaceId, deletedAt: { isNull: true as const } }, + orderBy: { createdAt: "desc" }, + }) + } + + async findByIdOrFail(input: { + workspaceId: string + templateId: string + }): Promise { + const row = await db.query.templateModel.findFirst({ + where: { + id: input.templateId, + workspaceId: input.workspaceId, + deletedAt: { isNull: true as const }, + }, + }) + if (!row) { + throw notFoundException("Template not found") + } + return row + } + + /** + * `updateAvailable` is derived, never stored: `autoUpdate` is on AND the + * live `Template.updatedAt` moved past the `sourceUpdatedAt` captured at + * install time. A template whose source row was deleted (`templateId` set + * null) can never show an update — there is nothing left to compare + * against or reinstall from. + */ + async listInstallations( + workspaceId: string, + ): Promise<(TemplateInstallationModel & { updateAvailable: boolean })[]> { + const installations = await db.query.templateInstallationModel.findMany({ + where: { workspaceId }, + orderBy: { createdAt: "desc" }, + with: { template: { columns: { updatedAt: true } } }, + }) + return installations.map(({ template, ...installation }) => ({ + ...installation, + updateAvailable: Boolean( + installation.autoUpdate && + template && + installation.sourceUpdatedAt && + template.updatedAt.getTime() > installation.sourceUpdatedAt.getTime(), + ), + })) + } + + /** + * Flips an installer's own override of the publisher's + * `defaultAutoUpdate` default — independent of the template-wide setting, + * mirroring how `allowEdit`/`allowDelete` are copied once at install time + * but never re-synced afterward. + */ + async updateInstallationAutoUpdate(input: { + workspaceId: string + installationId: string + autoUpdate: boolean + }): Promise { + const existing = await db.query.templateInstallationModel.findFirst({ + where: { id: input.installationId, workspaceId: input.workspaceId }, + }) + if (!existing) { + throw notFoundException("Template installation not found") + } + await db + .update(templateInstallationModel) + .set({ autoUpdate: input.autoUpdate }) + .where(eq(templateInstallationModel.id, input.installationId)) + } + + /** + * Re-runs the install pipeline against the *current* template payload for + * an existing installation row — resets status to `pending` and refreshes + * `sourceUpdatedAt` so `updateAvailable` clears once the re-install + * enqueues, mirroring `createInstallationRecord` but reusing the + * installation's own id instead of minting a new row. + */ + async prepareReinstall(input: { + workspaceId: string + installationId: string + }): Promise { + const existing = await db.query.templateInstallationModel.findFirst({ + where: { id: input.installationId, workspaceId: input.workspaceId }, + }) + if (!existing) { + throw notFoundException("Template installation not found") + } + if (!existing.templateId) { + throw new ChatbotXException( + "The source template for this installation is no longer available", + "templateInstallationSourceMissing", + ) + } + const template = await db.query.templateModel.findFirst({ + where: { id: existing.templateId }, + columns: { updatedAt: true }, + }) + if (!template) { + throw new ChatbotXException( + "The source template for this installation is no longer available", + "templateInstallationSourceMissing", + ) + } + const [updated] = await db + .update(templateInstallationModel) + .set({ + status: "pending", + sourceUpdatedAt: template.updatedAt, + errorMessage: null, + completedAt: null, + }) + .where(eq(templateInstallationModel.id, input.installationId)) + .returning() + return updated + } + + /** + * Resolves a template by share token only — NEVER by id, and every + * failure mode (bad token, disabled share, expired) collapses into the + * same generic "not available" outcome so the endpoint is never a + * token-existence oracle. Mirrors `/unsubscribe`'s single try/catch shape. + */ + async findPublicByShareToken( + shareToken: string, + ): Promise { + const row = await db.query.templateModel.findFirst({ + where: { shareToken, deletedAt: { isNull: true as const } }, + }) + if (!row?.shareEnabled) { + return + } + if (row.shareExpiresAt && row.shareExpiresAt.getTime() < Date.now()) { + return + } + return toPublicProjection(row) + } + + /** + * Resolves the selection to a concrete, validated snapshot payload and + * persists it. `mode:"all"` is expanded to the current row set — the + * stored payload is frozen from this point until the next save. + */ + async createOrUpdate(input: { + workspaceId: string + tenantId: string + createdBy: string + name: string + description?: string | null + imageUrl?: string | null + publisherName?: string | null + youtubeVideoId?: string | null + testLink?: string | null + selection: TemplateSelection + defaultPermissions: TemplatePermissions + createInstallFolder: boolean + defaultAutoUpdate: boolean + existingTemplateId?: string + }): Promise { + const { payload, categoryCounts } = await buildTemplateSnapshot({ + workspaceId: input.workspaceId, + tenantId: input.tenantId, + selection: input.selection, + }) + + if (input.existingTemplateId) { + const existing = await db.query.templateModel.findFirst({ + where: { + id: input.existingTemplateId, + workspaceId: input.workspaceId, + }, + }) + if (!existing) { + throw notFoundException("Template not found") + } + const [updated] = await db + .update(templateModel) + .set({ + name: input.name, + description: input.description, + imageUrl: input.imageUrl, + publisherName: input.publisherName, + youtubeVideoId: input.youtubeVideoId, + testLink: input.testLink, + selection: input.selection, + payload, + categoryCounts, + formatVersion: payload.formatVersion, + defaultPermissions: input.defaultPermissions, + createInstallFolder: input.createInstallFolder, + defaultAutoUpdate: input.defaultAutoUpdate, + }) + .where(eq(templateModel.id, existing.id)) + .returning() + return updated + } + + const [created] = await db + .insert(templateModel) + .values({ + id: createId(), + workspaceId: input.workspaceId, + tenantId: input.tenantId, + createdBy: input.createdBy, + name: input.name, + description: input.description, + imageUrl: input.imageUrl, + publisherName: input.publisherName, + youtubeVideoId: input.youtubeVideoId, + testLink: input.testLink, + selection: input.selection, + payload, + categoryCounts, + formatVersion: payload.formatVersion, + shareToken: generateShareToken(), + shareEnabled: false, + defaultPermissions: input.defaultPermissions, + createInstallFolder: input.createInstallFolder, + defaultAutoUpdate: input.defaultAutoUpdate, + }) + .returning() + return created + } + + async updateShareSettings(input: { + workspaceId: string + templateId: string + shareEnabled: boolean + shareExpiresAt?: Date | null + }): Promise { + const existing = await this.findByIdOrFail({ + workspaceId: input.workspaceId, + templateId: input.templateId, + }) + const [updated] = await db + .update(templateModel) + .set({ + shareEnabled: input.shareEnabled, + shareExpiresAt: input.shareExpiresAt, + }) + .where(eq(templateModel.id, existing.id)) + .returning() + return updated + } + + /** + * Resolves the template by `shareToken`, enforces the same-tenant gate + * against the *target* workspace's `Workspace.tenantId` (never the + * template's own `workspaceId`, and never a request-derived tenant + * context), and re-validates the stored payload with + * `parseTemplateExport` before enqueuing the install — never trust a + * stored jsonb blob across a format change. + * + * This is an authorization check performed here in the service, not + * merely a UI filter on the workspace picker. + */ + async assertInstallable(input: { + shareToken: string + targetWorkspaceId: string + }): Promise<{ template: TemplateModel }> { + const template = await db.query.templateModel.findFirst({ + where: { + shareToken: input.shareToken, + deletedAt: { isNull: true as const }, + }, + }) + if (!template?.shareEnabled) { + throw templateShareDisabledException() + } + if ( + template.shareExpiresAt && + template.shareExpiresAt.getTime() < Date.now() + ) { + throw templateShareDisabledException() + } + + const targetWorkspace = await workspaceService.findOrFail({ + where: { id: input.targetWorkspaceId }, + }) + if (targetWorkspace.tenantId !== template.tenantId) { + throw templateCrossTenantInstallException() + } + + const parsed = parseTemplateExport(template.payload) + if (!parsed.ok) { + throw new ChatbotXException( + `This template's saved data is no longer compatible: ${parsed.reason}`, + "templatePayloadIncompatible", + ) + } + + return { template } + } + + /** + * Inserts the `TemplateInstallation` tracking row with `status: "pending"` + * — always called before enqueueing the worker job, so the caller has a + * row to mark failed if the enqueue itself throws (`markInstallationFailed`). + */ + async createInstallationRecord(input: { + workspaceId: string + installedBy: string + template: TemplateModel + }): Promise { + const [installation] = await db + .insert(templateInstallationModel) + .values({ + id: createId(), + workspaceId: input.workspaceId, + templateId: input.template.id, + templateName: input.template.name, + sourceWorkspaceId: input.template.workspaceId, + formatVersion: input.template.formatVersion, + status: "pending", + permissions: input.template.defaultPermissions, + autoUpdate: input.template.defaultAutoUpdate, + sourceUpdatedAt: input.template.updatedAt, + installedBy: input.installedBy, + }) + .returning() + return installation + } + + /** + * Marks a `TemplateInstallation` failed without ever running the install + * — used only when enqueueing the worker job itself throws, so the row + * is never left stuck at `pending` forever (the `importService.fail` + * precedent, `import/service.ts`). + */ + async markInstallationFailed(input: { + installationId: string + errorMessage: string + }): Promise { + await db + .update(templateInstallationModel) + .set({ + status: "failed", + errorMessage: input.errorMessage, + completedAt: new Date(), + }) + .where(eq(templateInstallationModel.id, input.installationId)) + } + + /** + * Fetches the installation row plus the payload it should install from. + * `TemplateInstallation` has no payload column of its own — the payload + * lives only on `Template`, fetched here via `templateId`. `templateId` + * is `set null` (not cascade) specifically so provenance survives the + * source template being deleted; if that has already happened by the + * time this worker job runs, the install fails with a clear error rather + * than silently reading nothing. + */ + async findInstallationByIdOrFail(input: { + installationId: string + workspaceId: string + }): Promise<{ + installation: TemplateInstallationModel + payload: TemplateModel["payload"] + templateName: string + createInstallFolder: boolean + }> { + const installation = await db.query.templateInstallationModel.findFirst({ + where: { id: input.installationId, workspaceId: input.workspaceId }, + }) + if (!installation) { + throw notFoundException("Template installation not found") + } + if (!installation.templateId) { + throw new ChatbotXException( + "The source template for this installation is no longer available", + "templateInstallationSourceMissing", + ) + } + const template = await db.query.templateModel.findFirst({ + where: { id: installation.templateId }, + columns: { payload: true, name: true, createInstallFolder: true }, + }) + if (!template) { + throw new ChatbotXException( + "The source template for this installation is no longer available", + "templateInstallationSourceMissing", + ) + } + return { + installation, + payload: template.payload, + templateName: template.name, + createInstallFolder: template.createInstallFolder, + } + } + + /** + * Soft-deletes a template. `TemplateInstallation.templateId` is `set + * null` (not cascade), so past installs' provenance and `allowDelete` + * enforcement survive this unaffected. + */ + async softDelete(input: { + workspaceId: string + templateId: string + }): Promise { + const existing = await db.query.templateModel.findFirst({ + where: { id: input.templateId, workspaceId: input.workspaceId }, + }) + if (!existing) { + throw notFoundException("Template not found") + } + await db + .update(templateModel) + .set({ deletedAt: new Date() }) + .where(eq(templateModel.id, input.templateId)) + } +} + +export const templateService = new TemplateService() diff --git a/packages/business/src/template/share-token.ts b/packages/business/src/template/share-token.ts new file mode 100644 index 000000000..d11f17e9d --- /dev/null +++ b/packages/business/src/template/share-token.ts @@ -0,0 +1,45 @@ +const SHARE_TOKEN_BYTES = 32 + +const BASE64URL_ALPHABET = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" + +/** + * Manual base64url encode over raw bytes using arithmetic (no bitwise + * operators, per lint policy; no `Buffer`, since that's a Node global not + * guaranteed in the Edge Runtime that `packages/business`'s barrel is + * traced into — see `__tests__/edge-safe-import-graph.test.ts`). + */ +const toBase64Url = (bytes: Uint8Array): string => { + let result = "" + for (let index = 0; index < bytes.length; index += 3) { + const byte1 = bytes[index] + const byte2 = bytes[index + 1] ?? 0 + const byte3 = bytes[index + 2] ?? 0 + const hasByte2 = index + 1 < bytes.length + const hasByte3 = index + 2 < bytes.length + + const combined = byte1 * 65_536 + byte2 * 256 + byte3 + + result += BASE64URL_ALPHABET[Math.floor(combined / 262_144) % 64] + result += BASE64URL_ALPHABET[Math.floor(combined / 4096) % 64] + if (hasByte2) { + result += BASE64URL_ALPHABET[Math.floor(combined / 64) % 64] + } + if (hasByte3) { + result += BASE64URL_ALPHABET[combined % 64] + } + } + return result +} + +/** + * High-entropy share token — NEVER the row's own snowflake id, which is + * enumerable (sequential, time-ordered) and would let a share link be + * guessed. 32 random bytes via the Web Crypto API, which — unlike + * `node:crypto` — is available in both Node and the Edge Runtime. + */ +export const generateShareToken = (): string => { + const bytes = new Uint8Array(SHARE_TOKEN_BYTES) + crypto.getRandomValues(bytes) + return toBase64Url(bytes) +} diff --git a/packages/business/src/template/snapshot.service.ts b/packages/business/src/template/snapshot.service.ts new file mode 100644 index 000000000..29341b0cf --- /dev/null +++ b/packages/business/src/template/snapshot.service.ts @@ -0,0 +1,351 @@ +import { db } from "@chatbotx.io/database/client" +import type { + TemplateCategoryCounts, + TemplateSelection, +} from "@chatbotx.io/database/partials" +import { templateCategories } from "@chatbotx.io/database/partials" +import type { + CustomFieldModel, + FlowModel, + TagModel, +} from "@chatbotx.io/database/types" +import { + type FlowExportedFlow, + parseTemplateExport, + TEMPLATE_EXPORT_FORMAT_VERSION, + type TemplateExport, +} from "@chatbotx.io/flow-config" +import { ChatbotXException } from "../errors" +import { flowVersionService } from "../flow-version" + +const MAX_PAYLOAD_RESOURCES = 200 + +export const templateSaveValidationException = () => + new ChatbotXException( + "One or more selected resources could not be found in this workspace", + "templateSaveInvalidSelection", + ) + +export const templatePayloadTooLargeException = () => + new ChatbotXException( + "This template selection is too large to save", + "templatePayloadTooLarge", + ) + +/** + * Deduplicates then verifies every id belongs to `workspaceId` — the save + * action receives arbitrary id arrays for every category, so this is the + * one gate standing between a crafted request and smuggling another + * workspace's resources into a shareable template. Modeled on + * `ensureAllFlowIdsExists` (`apps/builder/src/features/flows/queries/ + * index.ts`), including its count-vs-length comparison — hence the + * mandatory dedupe first, since that comparison throws a false negative on + * duplicate ids. + */ +const assertIdsBelongToWorkspace = async ( + workspaceId: string, + ids: readonly string[], + findExisting: ( + workspaceId: string, + uniqueIds: string[], + ) => Promise<{ id: string }[]>, +): Promise => { + const uniqueIds = [...new Set(ids)] + if (uniqueIds.length === 0) { + return + } + const rows = await findExisting(workspaceId, uniqueIds) + if (rows.length !== uniqueIds.length) { + throw templateSaveValidationException() + } +} + +const resolveFlowIds = async ( + workspaceId: string, + uniqueIds: string[], +): Promise<{ id: string }[]> => + await db.query.flowModel.findMany({ + where: { workspaceId, id: { in: uniqueIds } }, + columns: { id: true }, + }) + +const resolveTagIds = async ( + workspaceId: string, + uniqueIds: string[], +): Promise<{ id: string }[]> => + await db.query.tagModel.findMany({ + where: { workspaceId, id: { in: uniqueIds } }, + columns: { id: true }, + }) + +const resolveCustomFieldIds = async ( + workspaceId: string, + uniqueIds: string[], +): Promise<{ id: string }[]> => + await db.query.customFieldModel.findMany({ + where: { workspaceId, id: { in: uniqueIds } }, + columns: { id: true }, + }) + +/** + * `mode:"all"` is expanded server-side to the current row set at save time + * — the client only ever has page 1, so materializing on the client would + * silently under-select under pagination. Concrete category ID resolvers + * (`resolveSelectionIds`) live per-category below; a category without one + * yet resolves to an empty list rather than throwing, so unfinished + * categories degrade to "nothing selected" instead of blocking every save. + */ +const resolveSelectionIds = async ( + workspaceId: string, + category: string, + selection: NonNullable, +): Promise => { + if (selection.mode === "ids") { + return [...new Set(selection.ids)] + } + // mode: "all" — resolve to every current row of this category. + switch (category) { + case "flows": { + const rows = await db.query.flowModel.findMany({ + where: { workspaceId }, + columns: { id: true }, + }) + return rows.map((row) => row.id) + } + case "tags": { + const rows = await db.query.tagModel.findMany({ + where: { workspaceId, deletedAt: { isNull: true as const } }, + columns: { id: true }, + }) + return rows.map((row) => row.id) + } + case "customFields": { + const rows = await db.query.customFieldModel.findMany({ + where: { workspaceId }, + columns: { id: true }, + }) + return rows.map((row) => row.id) + } + default: + // TODO(template): wire the remaining categories (products, + // aiFunctions, aiAgents, calendars, webchats, keywords, + // entryPointLinks, triggers, fbCommentAutomations, settings) as their + // own `mode:"all"` resolvers once each feature's existing list query + // has been reviewed for the right ownership/soft-delete filters. + return [] + } +} + +/** + * Builds one `flows` resource entry in the shape `flowsAdapter` expects, + * reusing the workspace's *draft* version — falls back from published per + * the plan's deviation from single-flow export ("blocking a template on one + * unpublished flow is hostile"). + */ +const buildFlowExportEntry = async ( + workspaceId: string, + flow: Pick< + FlowModel, + "id" | "name" | "active" | "enableInInbox" | "folderId" + >, +) => { + const published = await flowVersionService.findPublished({ + flowId: flow.id, + workspaceId, + }) + const draft = await flowVersionService.findDraft({ + flowId: flow.id, + workspaceId, + }) + const version = published ?? draft + if (!version) { + return + } + return { + sourceId: flow.id, + name: flow.name, + active: flow.active, + enableInInbox: flow.enableInInbox, + startNodeId: version.startNodeId, + // `FlowVersionModel.nodes`/`edges` are typed loosely at the jsonb + // boundary (`{id: string; [x: string]: unknown}[]`) even though they are + // only ever written as validated `FlowVersionSchema[]`/`EdgeSchema[]` + // rows. `parseTemplateExport` re-validates the full envelope below, so + // this narrowing is checked before the snapshot is ever persisted. + nodes: version.nodes as FlowExportedFlow["nodes"], + edges: version.edges as FlowExportedFlow["edges"], + folderId: flow.folderId, + } +} + +const buildTagManifestEntries = ( + tags: Pick[], +): Record => + Object.fromEntries(tags.map((tag) => [tag.id, { name: tag.name }])) + +const buildCustomFieldManifestEntries = ( + fields: Pick[], +): Record => + Object.fromEntries( + fields.map((field) => [field.id, { name: field.name, type: field.type }]), + ) + +type BuildSnapshotInput = { + workspaceId: string + tenantId: string + selection: TemplateSelection +} + +type BuildSnapshotResult = { + payload: TemplateExport + categoryCounts: TemplateCategoryCounts +} + +/** + * Resolves a selection to a concrete, validated snapshot envelope: + * 1. Verify every explicitly-selected id belongs to the acting workspace. + * 2. Expand any `mode:"all"` category to the current row set. + * 3. Build the `flows`/manifest entries. + * 4. Validate the assembled envelope with `parseTemplateExport` before the + * caller persists it — the same discipline the flow export route uses, + * validating with `flowExportSchema.parse` before serializing. + * + * Caps total resource count at `MAX_PAYLOAD_RESOURCES` — the payload lives + * in a jsonb column rather than S3, so this is the only guard against an + * unbounded template. + */ +export const buildTemplateSnapshot = async ( + input: BuildSnapshotInput, +): Promise => { + const { workspaceId, tenantId, selection } = input + + // Step 1: validate explicit id selections against the acting workspace + // before resolving anything else. + const flowSelection = selection.flows + if (flowSelection?.mode === "ids") { + await assertIdsBelongToWorkspace( + workspaceId, + flowSelection.ids, + resolveFlowIds, + ) + } + const tagSelection = selection.tags + if (tagSelection?.mode === "ids") { + await assertIdsBelongToWorkspace( + workspaceId, + tagSelection.ids, + resolveTagIds, + ) + } + const customFieldSelection = selection.customFields + if (customFieldSelection?.mode === "ids") { + await assertIdsBelongToWorkspace( + workspaceId, + customFieldSelection.ids, + resolveCustomFieldIds, + ) + } + + // Step 2: expand mode:"all" and resolve every category to a concrete id + // list. + const flowIds = flowSelection + ? await resolveSelectionIds(workspaceId, "flows", flowSelection) + : [] + const tagIds = tagSelection + ? await resolveSelectionIds(workspaceId, "tags", tagSelection) + : [] + const customFieldIds = customFieldSelection + ? await resolveSelectionIds( + workspaceId, + "customFields", + customFieldSelection, + ) + : [] + + const totalResources = flowIds.length + tagIds.length + customFieldIds.length + if (totalResources > MAX_PAYLOAD_RESOURCES) { + throw templatePayloadTooLargeException() + } + + // Step 3: build entries. + const flowRows = + flowIds.length > 0 + ? await db.query.flowModel.findMany({ + where: { workspaceId, id: { in: flowIds } }, + columns: { + id: true, + name: true, + active: true, + enableInInbox: true, + folderId: true, + }, + }) + : [] + const flowEntries = ( + await Promise.all( + flowRows.map((flow) => buildFlowExportEntry(workspaceId, flow)), + ) + ).filter((entry): entry is NonNullable => Boolean(entry)) + + const tagRows = + tagIds.length > 0 + ? await db.query.tagModel.findMany({ + where: { workspaceId, id: { in: tagIds } }, + columns: { id: true, name: true }, + }) + : [] + const customFieldRows = + customFieldIds.length > 0 + ? await db.query.customFieldModel.findMany({ + where: { workspaceId, id: { in: customFieldIds } }, + columns: { id: true, name: true, type: true }, + }) + : [] + + const payload: TemplateExport = { + formatVersion: TEMPLATE_EXPORT_FORMAT_VERSION, + exportedAt: new Date().toISOString(), + source: { workspaceId, tenantId }, + manifests: { + customFields: buildCustomFieldManifestEntries(customFieldRows), + tags: buildTagManifestEntries(tagRows), + productCategories: {}, + folders: {}, + }, + resources: { + flows: flowEntries, + products: [], + aiFunctions: [], + aiAgents: [], + calendars: [], + webchats: [], + keywords: [], + entryPointLinks: [], + triggers: [], + fbCommentAutomations: [], + settings: { savedReplies: [], botFields: [] }, + }, + } + + const parsed = parseTemplateExport(payload) + if (!parsed.ok) { + throw new ChatbotXException( + `Template snapshot failed validation: ${parsed.reason}`, + "templateSnapshotInvalid", + ) + } + + const countByCategory: Partial> = { + flows: flowEntries.length, + tags: tagRows.length, + customFields: customFieldRows.length, + } + const categoryCounts = Object.fromEntries( + templateCategories.options.map((category) => [ + category, + countByCategory[category] ?? 0, + ]), + ) as TemplateCategoryCounts + + return { payload: parsed.data, categoryCounts } +} diff --git a/packages/database/drizzle/20260817114301_add_template/migration.sql b/packages/database/drizzle/20260817114301_add_template/migration.sql new file mode 100644 index 000000000..5ad7ed73b --- /dev/null +++ b/packages/database/drizzle/20260817114301_add_template/migration.sql @@ -0,0 +1,75 @@ +CREATE TYPE "templateInstallationStatus" AS ENUM('pending', 'installing', 'completed', 'partial', 'failed');--> statement-breakpoint +CREATE TYPE "templateResourceCategory" AS ENUM('flows', 'customFields', 'tags', 'products', 'productCategories', 'aiFunctions', 'aiAgents', 'calendars', 'webchats', 'keywords', 'entryPointLinks', 'triggers', 'fbCommentAutomations', 'settings');--> statement-breakpoint +CREATE TABLE "Template" ( + "id" bigint PRIMARY KEY, + "createdAt" timestamp(6) with time zone DEFAULT now() NOT NULL, + "updatedAt" timestamp(6) with time zone DEFAULT now() NOT NULL, + "workspaceId" bigint NOT NULL, + "tenantId" bigint NOT NULL, + "name" text NOT NULL, + "description" text, + "imageUrl" text, + "publisherName" text, + "youtubeVideoId" text, + "testLink" text, + "selection" jsonb NOT NULL, + "payload" jsonb NOT NULL, + "categoryCounts" jsonb NOT NULL, + "formatVersion" integer NOT NULL, + "shareToken" text NOT NULL, + "shareEnabled" boolean DEFAULT false NOT NULL, + "shareExpiresAt" timestamp(6) with time zone, + "defaultPermissions" jsonb NOT NULL, + "installCount" integer DEFAULT 0 NOT NULL, + "createdBy" bigint, + "deletedAt" timestamp(6) with time zone +); +--> statement-breakpoint +CREATE TABLE "TemplateInstallation" ( + "id" bigint PRIMARY KEY, + "createdAt" timestamp(6) with time zone DEFAULT now() NOT NULL, + "updatedAt" timestamp(6) with time zone DEFAULT now() NOT NULL, + "workspaceId" bigint NOT NULL, + "templateId" bigint, + "templateName" text NOT NULL, + "sourceWorkspaceId" bigint NOT NULL, + "formatVersion" integer NOT NULL, + "status" "templateInstallationStatus" DEFAULT 'pending'::"templateInstallationStatus" NOT NULL, + "permissions" jsonb NOT NULL, + "warnings" jsonb DEFAULT '[]' NOT NULL, + "warningCount" integer DEFAULT 0 NOT NULL, + "errorMessage" text, + "resourceCount" integer DEFAULT 0 NOT NULL, + "installedBy" bigint, + "completedAt" timestamp(6) with time zone +); +--> statement-breakpoint +CREATE TABLE "TemplateInstalledResource" ( + "id" bigint PRIMARY KEY, + "createdAt" timestamp(6) with time zone DEFAULT now() NOT NULL, + "updatedAt" timestamp(6) with time zone DEFAULT now() NOT NULL, + "installationId" bigint NOT NULL, + "workspaceId" bigint NOT NULL, + "category" "templateResourceCategory" NOT NULL, + "resourceKind" text NOT NULL, + "resourceId" bigint NOT NULL, + "sourceResourceId" text NOT NULL, + "wasExisting" boolean DEFAULT false NOT NULL +); +--> statement-breakpoint +CREATE INDEX "Template_workspaceId_idx" ON "Template" ("workspaceId");--> statement-breakpoint +CREATE INDEX "Template_tenantId_idx" ON "Template" ("tenantId");--> statement-breakpoint +CREATE UNIQUE INDEX "Template_shareToken_key" ON "Template" ("shareToken");--> statement-breakpoint +CREATE INDEX "TemplateInstallation_workspaceId_idx" ON "TemplateInstallation" ("workspaceId");--> statement-breakpoint +CREATE INDEX "TemplateInstallation_templateId_idx" ON "TemplateInstallation" ("templateId");--> statement-breakpoint +CREATE INDEX "TemplateInstallation_workspaceId_status_idx" ON "TemplateInstallation" ("workspaceId","status");--> statement-breakpoint +CREATE INDEX "TemplateInstalledResource_installationId_idx" ON "TemplateInstalledResource" ("installationId");--> statement-breakpoint +CREATE INDEX "TemplateInstalledResource_workspaceId_resourceKind_resourceId_idx" ON "TemplateInstalledResource" ("workspaceId","resourceKind","resourceId");--> statement-breakpoint +ALTER TABLE "Template" ADD CONSTRAINT "Template_workspaceId_Workspace_id_fkey" FOREIGN KEY ("workspaceId") REFERENCES "Workspace"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint +ALTER TABLE "Template" ADD CONSTRAINT "Template_tenantId_Tenant_id_fkey" FOREIGN KEY ("tenantId") REFERENCES "Tenant"("id") ON DELETE RESTRICT ON UPDATE CASCADE;--> statement-breakpoint +ALTER TABLE "Template" ADD CONSTRAINT "Template_createdBy_User_id_fkey" FOREIGN KEY ("createdBy") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;--> statement-breakpoint +ALTER TABLE "TemplateInstallation" ADD CONSTRAINT "TemplateInstallation_workspaceId_Workspace_id_fkey" FOREIGN KEY ("workspaceId") REFERENCES "Workspace"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint +ALTER TABLE "TemplateInstallation" ADD CONSTRAINT "TemplateInstallation_templateId_Template_id_fkey" FOREIGN KEY ("templateId") REFERENCES "Template"("id") ON DELETE SET NULL ON UPDATE CASCADE;--> statement-breakpoint +ALTER TABLE "TemplateInstallation" ADD CONSTRAINT "TemplateInstallation_installedBy_User_id_fkey" FOREIGN KEY ("installedBy") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;--> statement-breakpoint +ALTER TABLE "TemplateInstalledResource" ADD CONSTRAINT "TemplateInstalledResource_a0BqwWeO96EB_fkey" FOREIGN KEY ("installationId") REFERENCES "TemplateInstallation"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint +ALTER TABLE "TemplateInstalledResource" ADD CONSTRAINT "TemplateInstalledResource_workspaceId_Workspace_id_fkey" FOREIGN KEY ("workspaceId") REFERENCES "Workspace"("id") ON DELETE CASCADE ON UPDATE CASCADE; \ No newline at end of file diff --git a/packages/database/drizzle/20260817114301_add_template/snapshot.json b/packages/database/drizzle/20260817114301_add_template/snapshot.json new file mode 100644 index 000000000..667ed39d0 --- /dev/null +++ b/packages/database/drizzle/20260817114301_add_template/snapshot.json @@ -0,0 +1,37168 @@ +{ + "version": "8", + "dialect": "postgres", + "id": "5ef38b2c-9ffd-4fd9-96c7-a5e4971026cb", + "prevIds": ["c6c81c93-f885-4d75-a258-b2279580dd1e"], + "ddl": [ + { + "values": [ + "pending", + "sent", + "failed", + "skipped_no_scope", + "skipped_region" + ], + "name": "adsConversionCapiStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["automatic", "rule"], + "name": "adsConversionEventSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["whatsapp", "facebook"], + "name": "adsConversionChannel", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["lead", "purchase"], + "name": "adsConversionEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "success", "error", "processing"], + "name": "aiConversationEmbeddingStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "processing", "success", "error"], + "name": "aiConversationSourceStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["document", "image", "url", "web_search"], + "name": "aiConversationSourceType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "success", "error", "processing"], + "name": "aiEmbeddingStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["automated_response", "ai_agent", "flow", "none"], + "name": "analyticsBotResponseType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["success", "fallback"], + "name": "analyticsBotResult", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["flow", "agent", "fallback"], + "name": "analyticsBotRouteType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "message:sent", + "message:delivered", + "message:seen", + "message:failed", + "flow:clicked" + ], + "name": "analyticsBroadcastEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["contact_created", "contact_deleted", "contact_blocked"], + "name": "analyticsContactEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["bot", "human"], + "name": "analyticsContactSenderType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "conversation_created", + "conversation_assigned", + "conversation_unassigned", + "conversation_transferred_to_human", + "conversation_transferred_to_bot", + "conversation_followed", + "conversation_unfollowed", + "conversation_archived", + "conversation_unarchived" + ], + "name": "analyticsConversationEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["message_human_sent", "message_bot_sent"], + "name": "analyticsMessageEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["processing", "ingested", "failed"], + "name": "analyticsStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "synced", "failed"], + "name": "appointmentExternalSyncStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["inPerson", "phoneCall", "onlineMeeting"], + "name": "appointmentLocationTypeSnapshot", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["scheduled", "cancelled"], + "name": "appointmentStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["inPerson", "phoneCall", "onlineMeeting"], + "name": "appointmentLocationType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["rollingDays", "dateRange", "specificDay", "anyFutureDate"], + "name": "appointmentScheduleWindowType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["minutes", "hours", "days"], + "name": "appointmentReminderTimingUnit", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "sent", "cancelled", "failed"], + "name": "appointmentReminderDispatchStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["image", "video", "audio", "gif", "file"], + "name": "fileType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["inbound", "outbound"], + "name": "automatedResponseType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["now", "future"], + "name": "broadcastScheduleType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["scheduled", "sent", "sending", "cancelled"], + "name": "broadcastStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["whatsapp", "messenger", "instagram"], + "name": "coexistChannel", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["contacts", "messages"], + "name": "coexistMessengerSyncPhase", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["init", "running", "succeeded", "failed", "partial"], + "name": "coexistRunStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["male", "female", "unknown"], + "name": "gender", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "text", + "location", + "refLink", + "image", + "video", + "audio", + "gif", + "file" + ], + "name": "lastUserInputType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "scheduled", "completed", "failed", "canceled"], + "name": "ContactOnSmartDelayStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["waitNode", "followUp"], + "name": "ContactOnSmartDelayType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["active", "archived"], + "name": "couponTopicStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "shortText", + "email", + "phoneNumber", + "number", + "date", + "datetime", + "boolean", + "longText" + ], + "name": "customFieldType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["messenger", "instagram", "instagramFacebook"], + "name": "fbCommentAutomationType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["import", "generic", "export"], + "name": "fileContextType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "uploaded", "failed"], + "name": "fileStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "tag", + "flow", + "customField", + "automatedResponse", + "trigger", + "webhook", + "sequence", + "emailTopic", + "fbComment", + "igComment", + "igStory", + "outboundAutomatedResponse" + ], + "name": "folderType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["instagram", "instagramFacebook"], + "name": "igStoryAutomationType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["csv", "xlsx", "xls", "json"], + "name": "importFormat", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "processing", "completed", "failed"], + "name": "importStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["contacts", "coupons", "products", "flow"], + "name": "importType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["oauth", "fbe"], + "name": "metaCatalogAuthMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["active", "invalid"], + "name": "metaCatalogConnectionStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["idle", "queued", "running", "succeeded", "partial", "failed"], + "name": "metaCatalogImportStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending_verification", "registered", "failed"], + "name": "whatsappRegistrationStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["text", "location", "refLink"], + "name": "contentType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["message", "comment"], + "name": "messageKind", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["incoming", "outgoing", "activity"], + "name": "messageType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["bot", "contact", "system", "user", "api"], + "name": "senderType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "processing", "completed", "failed"], + "name": "MessageCleanupStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["push", "import"], + "name": "metaCatalogItemDirection", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["all", "category", "selected"], + "name": "metaCatalogSyncScope", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["queued", "running", "succeeded", "partial", "failed"], + "name": "metaCatalogSyncStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["dont_track", "track"], + "name": "inventoryPolicy", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "text", + "number", + "email", + "phone", + "multipleChoice", + "date", + "datetime", + "image", + "file", + "location", + "websiteLink" + ], + "name": "questionnaireQuestionType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["inProgress", "completed", "cancelled", "failed", "timeout"], + "name": "questionnaireSubmissionStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["refLink", "qrCode"], + "name": "ReflinkType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["me"], + "name": "SystemFieldType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "installing", "completed", "partial", "failed"], + "name": "templateInstallationStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flows", + "customFields", + "tags", + "products", + "productCategories", + "aiFunctions", + "aiAgents", + "calendars", + "webchats", + "keywords", + "entryPointLinks", + "triggers", + "fbCommentAutomations", + "settings" + ], + "name": "templateResourceCategory", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["owner", "agent"], + "name": "workspaceMemberRole", + "entityType": "enums", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessageShard", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ShardTimeRange", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AdsConversionEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AdsConversionRule", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIAgent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIAssistant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIConversationEmbedding", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIConversationSource", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIEmbedding", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIFile", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIFunction", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIMCPServer", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AITrigger", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AITriggerToIntegrationOpenai", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsBotMessageEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsBroadcastEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsContactEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsConversationEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsFlowNodeEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsMessageEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsSequenceEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsEmailTopic", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsManifestStatus", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Appointment", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentCalendar", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentCalendarAvailability", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentCalendarReminder", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentReminderDispatch", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Attachment", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Account", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Invitation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Jwk", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Session", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "User", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Verification", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AutomatedResponse", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "BotField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Broadcast", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CoexistSyncRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Contact", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactActiveHourly", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactActiveMonthly", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactCustomField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactInbox", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactNote", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactOnBroadcast", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactOnSequence", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactOnSmartDelay", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactToTag", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactToTagChannel", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Conversation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ConversationParticipant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Coupon", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CouponTopic", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CustomField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "EmailTopic", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AuditLog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CustomDomain", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Tenant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TenantHelpItem", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "UserQuota", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceUsage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ErrorLog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ExternalWebhook", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FacebookLeadAdsAutomation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FacebookLeadAdsLead", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FBCommentAutomation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FBCommentAutomationReply", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "File", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Flow", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowAnalyticsSession", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowNodeStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowVersion", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Folder", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IgStoryAutomation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Import", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Inbox", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboxContactStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboxTeam", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboxTeamMember", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationActiveCampaign", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Integration", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationClaude", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationDeepseek", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationDrip", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationFacebookAds", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGemini", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGetResponse", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGoogleCalendar", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGoogleSheet", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationInstagram", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationKlaviyo", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMailchimp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMailerLite", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMessenger", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMetaCatalog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMoosend", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOpenai", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOpenaiCompatible", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOpenrouter", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOutlookCalendar", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationSendGrid", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationSmtp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationTelegram", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationTiktok", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationWebchat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationWhatsapp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationZalo", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MagicLink", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MagicLinkStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Message", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessageCleanup", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessengerMessageTemplate", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MetaCapiEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MetaCatalogItem", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MetaCatalogSyncRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "PlatformCredential", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Product", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductAddon", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductCategory", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductVariant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductVariantOption", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "QuestionnaireAnswer", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Questionnaire", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "QuestionnaireQuestion", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "QuestionnaireSubmission", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "RefLinkStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Reflink", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SavedReply", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Sequence", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SequenceDispatch", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SequenceStep", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Spreadsheet", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SystemField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Tag", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TagChannel", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Template", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TemplateInstallation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TemplateInstalledResource", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Trigger", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Condition", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TriggerContactHistory", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TriggerExecution", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TriggerStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "UserPersistentMenu", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Webhook", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WebhookExecution", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappCoexistStaging", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappFlow", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappMessageTemplate", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappSignupSession", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Workspace", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceMac", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceMember", + "entityType": "tables", + "schema": "public" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "5432", + "generated": null, + "identity": null, + "name": "port", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "database", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credentialRef", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "'disable'", + "generated": null, + "identity": null, + "name": "sslMode", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isMain", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shardKey", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "readHost", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "readPort", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shardId", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionEventSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ctwaClid", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceEventId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionCapiStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "capiStatus", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiSentAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "adsConversionChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationFacebookAdsId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "adsConversionEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "trigger", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "markAs", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "messages", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isDefault", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isRichResponse", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "tools", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "webSearchAuthorizedDomains", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "models", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "aiTriggerIds", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "attachmentIds", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chunkIndex", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "vector(1536)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "embedding", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "aiConversationEmbeddingStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attachmentId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "aiConversationSourceType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceType", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "aiConversationSourceStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceKey", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentHash", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "summary", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "vector(1536)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "embedding", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "aiEmbeddingStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiFileId", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purpose", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dataCollect", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outputMessage", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerFlowId", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "availableTools", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "selectedTools", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "questions", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finalMessage", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiTriggerId", + "entityType": "columns", + "schema": "public", + "table": "AITriggerToIntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationOpenaiId", + "entityType": "columns", + "schema": "public", + "table": "AITriggerToIntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasResponse", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "analyticsBotResponseType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "analyticsBotRouteType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "routeType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "analyticsBotResult", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "result", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiProvider", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "analyticsBroadcastEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "batchId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "analyticsContactEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "analyticsContactSenderType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "analyticsConversationEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromAssignee", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "toAssignee", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "analyticsId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "buttonId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "analyticsMessageEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "analyticsContactSenderType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstSeenAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSeenAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seenCount", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstClickedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastClickedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clickCount", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "objectKey", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "analyticsStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ingestedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inviteeTimezone", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "appointmentStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'scheduled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "appointmentLocationTypeSnapshot", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationType", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationDetail", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "appointmentExternalSyncStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalSyncStatus", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "30", + "generated": null, + "identity": null, + "name": "durationMinutes", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bufferAfterMinutes", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "appointmentLocationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationType", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationDetail", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "appointmentScheduleWindowType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'rollingDays'", + "generated": null, + "identity": null, + "name": "scheduleWindowType", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "scheduleWindowConfig", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxAppointmentsPerUser", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "dailyLimitEnabled", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxPerDay", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowGroupMeeting", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxPerSlot", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "confirmationMessage", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "confirmationFlowId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancellationFlowId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalConnectionId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicLinkSlug", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "weekday", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startMinute", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endMinute", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timingValue", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "appointmentReminderTimingUnit", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timingUnit", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appointmentId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reminderConfigId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "appointmentReminderDispatchStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "jobId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sentAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedReason", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageCreatedAt", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "fileType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileType", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "width", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "height", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnailPath", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originPath", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "providerId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accessToken", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accessTokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refreshToken", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refreshTokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idToken", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "password", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "invitedBy", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicKey", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "privateKey", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ipAddress", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "emailVerified", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isAnonymous", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "mustChangePassword", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifier", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "keywords", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "automatedResponseType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'inbound'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "customFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateData", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "broadcastStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "broadcastScheduleType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schedulesType", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schedulesAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactFilter", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subaction", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactCount", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistRunStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'init'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerSource", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastHeartbeatAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalScan", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentScan", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentPageNumber", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedContactCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedMessageCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentError", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastPhase", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastChunkOrder", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "syncProgress", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistMessengerSyncPhase", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'contacts'", + "generated": null, + "identity": null, + "name": "messengerSyncPhase", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "avatar", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumber", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "emailVerified", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "emailOptIn", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstName", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastName", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "CASE\n WHEN \"firstName\" IS NULL AND \"lastName\" IS NULL THEN NULL\n WHEN \"firstName\" IS NULL THEN \"lastName\"\n WHEN \"lastName\" IS NULL THEN \"firstName\"\n ELSE \"firstName\" || ' ' || \"lastName\"\n END", + "type": "stored" + }, + "identity": null, + "name": "fullName", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "gender", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "gender", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastReadAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ref", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "city", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "location", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locale", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subscribedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastSubscribedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "blockedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hourBucket", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceMacId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originalContactId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "personaId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactLastReadAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstInteractionAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastIncomingMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastOutboundMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referral", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastCommentMessageId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastCommentMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "consecutiveFailedReply", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastInputFailure", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastErrorLog", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastBtnTitle", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUserInput", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "lastUserInputType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUserInputType", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webchatParentUrl", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdById", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "sent", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "case when \"seenAt\" is null then false when \"deliveredAt\" is null then false else \"seenAt\" >= \"deliveredAt\" end", + "type": "stored" + }, + "identity": null, + "name": "isRead", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "enrolledAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextRunAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastStepId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextStepId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockOwner", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appointmentId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "ContactOnSmartDelayType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "ContactOnSmartDelayStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagChannelId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "botEnabled", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botResumeAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "archivedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "additionalAttributes", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactLastReadAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agentLastReadAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiContextLastMessageId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastActivityAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "followed", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedUserId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedInboxTeamId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastStep", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminRepliedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactRepliedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicId", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuedContactId", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuedAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "usedAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "couponTopicStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasEverHadCoupon", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdById", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "customFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "showInInbox", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sendsTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "deliveredsTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seensTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clicksTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "domain", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verifiedAt", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfHostnameId", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfOwnershipValue", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfAcmeValue", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disabledReason", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brandName", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logoLightPath", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logoDarkPath", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "faviconPath", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customCss", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customJs", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "theme", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storageUrl", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "policyUrl", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "termsOfServiceUrl", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "signupEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "forgotPasswordEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "magicLinkEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountCredentialsEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hiddenChannels", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "icon", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactsLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "contactsUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspacesLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "workspacesUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelsLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "channelsUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "teamMembersLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "teamMembersUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "macLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botMessagesLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "monthlyBotMessagesLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "monthlyBotMessagesUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "monthlyBotMessagesPeriodStart", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesTopUpGranted", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "whiteLabel", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "ssoSaml", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "saasMode", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "planName", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "planStatus", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "selectedTrialPlanId", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelsTornDownAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "syncedAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "contactsUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "channelsUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "teamMembersUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "syncedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "httpCode", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'make'", + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "event", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageName", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formName", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "fieldMapping", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "leadsHandledCount", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leadgenId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "fbCommentAutomationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'messenger'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "repliesCount", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "post", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"text\",\"value\":\"\"}'", + "generated": null, + "identity": null, + "name": "privateReply", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"none\",\"value\":null}'", + "generated": null, + "identity": null, + "name": "publicReply", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "includeKeywords", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "excludeKeywords", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"replyToNewContactsOnly\":false,\"replyOncePerUserPerPost\":false,\"likeUserComment\":false,\"replyToUsersWhoCommentedOnOtherPosts\":true,\"ignoreCommentReplies\":true,\"trackUserTags\":false}'", + "generated": null, + "identity": null, + "name": "options", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"all\":false,\"hasPhoneNumber\":false,\"hasImage\":false,\"hasVideo\":false,\"hasLink\":false,\"hasKeywords\":false,\"keywords\":[],\"showCommentsAfter\":\"none\"}'", + "generated": null, + "identity": null, + "name": "hideComments", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"immediately\",\"value\":0}'", + "generated": null, + "identity": null, + "name": "replyAfter", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "fileContextType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contextType", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subType", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileName", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileSize", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "fileStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "meta", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadedAt", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enableInInbox", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentVersionId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "draftVersionId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "analyticsId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "buttonId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refType", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "nodes", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "edges", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isDraft", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isLatest", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startNodeId", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "folderType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderType", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isTrash", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "paths", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "igStoryAutomationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "repliesCount", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "story", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"none\",\"value\":null}'", + "generated": null, + "identity": null, + "name": "reply", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "includeKeywords", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "importType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "importFormat", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "format", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "importStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "meta", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "processedCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "errorSample", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'connected'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "InboxContactStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalContacts", + "entityType": "columns", + "schema": "public", + "table": "InboxContactStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboxContactStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxTeamId", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationType", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'primary'", + "generated": null, + "identity": null, + "name": "providerCalendarId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userInfo", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "igId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "username", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'instagram'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userInfo", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "personas", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "personaId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "syncTagEnabledAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogName", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAuth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "metaCatalogAuthMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'oauth'", + "generated": null, + "identity": null, + "name": "authMode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "metaCatalogConnectionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "metaCatalogImportStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'idle'", + "generated": null, + "identity": null, + "name": "importStatus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importTotalCount", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedCount", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importFailedCount", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "importError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastImportedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'VND'", + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeUrl", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReplyVoice", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "voice", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiAssistantId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiAgentId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "baseURL", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultModel", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "preset", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'primary'", + "generated": null, + "identity": null, + "name": "providerCalendarId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromAddress", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enable", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "authorizedDomains", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brandColor", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hideHeader", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "showLogo", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hideMessageInput", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customCss", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumberId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "displayPhoneNumber", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isCoexist", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "platformType", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "historyDeclined", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "whatsappRegistrationStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending_verification'", + "generated": null, + "identity": null, + "name": "registrationStatus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "registrationError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verificationCodeRequestedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "oaId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fallbackFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "syncTagEnabledAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linkId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentAttributes", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "messageType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageType", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "contentType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentType", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "senderType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "messageKind", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'message'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attributes", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendError", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationIds", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sinceTime", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "MessageCleanupStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'POSITIONAL'", + "generated": null, + "identity": null, + "name": "parameterFormat", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "components", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventName", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentCategory", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentName", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceKey", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "capiStatus", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiSentAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiError", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMetaCatalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "metaCatalogItemDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'push'", + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retailerId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedFingerprint", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMetaCatalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "metaCatalogSyncStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'queued'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "metaCatalogItemDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'push'", + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "metaCatalogSyncScope", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'all'", + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "selectedProductIds", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "handles", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionLeaseId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "succeededCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "itemErrors", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "skippedItems", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "pollAttempt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicConfig", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "livemode", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "usePlatformCredential", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isVerified", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verifiedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUsedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortDescription", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "longDescription", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "taxes", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "discount", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'USD'", + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productUrl", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sku", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "inventoryPolicy", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'dont_track'", + "generated": null, + "identity": null, + "name": "inventoryPolicy", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "inventoryQuantity", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowOutOfStockPurchase", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "images", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "tags", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendor", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subcategoryId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isSearchable", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowSpecialRequest", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isAddonOnly", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "maxSelections", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "addonProductIds", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "combination", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isEnabled", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "values", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionIdSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionTitleSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionTypeSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "labelSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pointsEarned", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "attemptCount", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "answeredAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enableScore", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enableRetryMessages", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enableCustomFieldMapping", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerFlowId", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionnaireId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "questionnaireQuestionType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "orderNo", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "point", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retryMessage", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "systemFieldKey", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "config", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionnaireId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "questionnaireSubmissionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'inProgress'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "totalPoints", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentQuestionId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentQuestionSentAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastAnsweredMessageId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linkId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "ReflinkType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'refLink'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "qrStyles", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortcut", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "subscribers", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "messages", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "runAtMs", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "bucket", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idempotencyKey", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockOwner", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "enrollmentId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "case when \"seenAt\" is null then false when \"deliveredAt\" is null then false else \"seenAt\" >= \"deliveredAt\" end", + "type": "stored" + }, + "identity": null, + "name": "isRead", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "order", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delayDays", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "delayMinutes", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delayUnit", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "specificDateTime", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "anytime", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendTimeStart", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendTimeEnd", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "'[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"]'", + "generated": null, + "identity": null, + "name": "sendDays", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "spreadsheetId", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "SystemFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelType", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalLabelId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publisherName", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "youtubeVideoId", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "testLink", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "selection", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryCounts", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formatVersion", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shareToken", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "shareEnabled", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shareExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultPermissions", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "installCount", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateName", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceWorkspaceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formatVersion", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "templateInstallationStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "warnings", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "warningCount", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "resourceCount", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installedBy", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installationId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "templateResourceCategory", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resourceKind", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resourceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceResourceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "wasExisting", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "actions", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webhookId", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "operator", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstEnteredAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "executedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalContacts", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successCount", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failureCount", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalExecutions", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "menus", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "executedAt", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webhookId", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumberId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payloadHash", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "categories", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "validationErrors", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "completedCount", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "screens", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "components", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAccessToken", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "apiVersion", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "candidatePhoneNumberIds", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "consumedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultReply", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "targetCountry", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'en'", + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'UTC'", + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'#016DFF'", + "generated": null, + "identity": null, + "name": "brandColor", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "developmentMode", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "smartResponseDelaySeconds", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logo", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scheduledDeletionAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macCount", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "workspaceMemberRole", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notificationChannels", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notificationTypes", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "isActive", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageShard_isActive_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageShard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "shardKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageShard_shardKey_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageShard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "startTime", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "endTime", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ShardTimeRange_time_lookup_idx", + "entityType": "indexes", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "shardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ShardTimeRange_shardId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspace_integration_source_sourceEventId_key", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_adId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "enabled", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionRule_workspaceId_channel_enabled_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_sourceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "chunkIndex", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_sourceId_chunkIndex_key", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "embedding", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "vector_cosine_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "hnsw", + "concurrently": false, + "name": "AIConversationEmbedding_embedding_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_lookup_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_workspaceId_sourceType_sourceKey_key", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "messageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_messageId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIEmbedding_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "aiProvider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_aiProvider_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "hasResponse", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "result", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_hasResponse_result_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBroadcastEvent_workspaceId_broadcastId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adminId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_adminId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsConversationEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "toAssignee", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsConversationEvent_workspaceId_toAssignee_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsFlowNodeEvent_workspaceId_flowId_analyticsId_nodeId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "buttonId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsFlowNodeEvent_workspaceId_flowId_analyticsId_nodeId_buttonId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adminId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_adminId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "senderType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_senderType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsSequenceEvent_workspaceId_sequenceId_stepId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_token_key", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_topicId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_workspaceId_topicId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "objectKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsManifestStatus_objectKey_key", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "startAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_workspaceId_startAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "startAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_calendarId_status_startAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_contactId_calendarId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "publicLinkSlug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_publicLinkSlug_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendarAvailability_calendarId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "timingValue", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "timingUnit", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendarReminder_dedupe_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "jobId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_jobId_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sendAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_status_sendAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "appointmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_appointmentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "messageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "messageCreatedAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_message_idx", + "entityType": "indexes", + "schema": "public", + "table": "Attachment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_workspaceId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Attachment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Attachment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "providerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "accountId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Account_providerId_accountId_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Account" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Invitation_code_key", + "entityType": "indexes", + "schema": "public", + "table": "Invitation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Session_token_key", + "entityType": "indexes", + "schema": "public", + "table": "Session" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "User_email_tenant_key", + "entityType": "indexes", + "schema": "public", + "table": "User" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "User_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "User" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomatedResponse_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BotField_workspaceId_type_name_key", + "entityType": "indexes", + "schema": "public", + "table": "BotField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_channel_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "schedulesAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_schedulesAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_workspace_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastHeartbeatAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('init', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "\"startedAt\" DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('succeeded', 'partial')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_resume_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "status = 'init'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_init_uq", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "broadcastSubscribedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_broadcast_subscribed_at", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_created_at", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "firstName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_firstName_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lastName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_lastName_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_email_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumber", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_phoneNumber_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactCustomField_contactId_customFieldId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactCustomField_customFieldId_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastIncomingMessageAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_contactId_lastIncomingMessageAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastOutboundMessageAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_contactId_lastOutboundMessageAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "(\"referral\"->>'ctwaClid')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referral\"->>'ctwaClid' IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_referral_ctwaClid_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactNote_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactNote" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_on_broadcast_contact_id", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "isRead", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_on_broadcast_is_read", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_sequenceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_status_nextRunAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_workspaceId_status_nextRunAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_contactId_sequenceId_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_workspaceId_flowId_contactInboxId_stepId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "triggerAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_status_triggerAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "appointmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_appointmentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" NOT IN ('completed', 'failed', 'canceled') AND \"type\" = 'followUp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_followUp_active_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTagChannel_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTagChannel_tagId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_dm_key", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "aiContextLastMessageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_aiContextLastMessageId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastActivityAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_workspaceId_lastActivityAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_conversationId_userId_key", + "entityType": "indexes", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_code_key", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"issuedContactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_key", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_issuedContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "issuedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_issuedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "usedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_usedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_code_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "usedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_usedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_status_deletedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_expiresAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_name_idx", + "entityType": "indexes", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomField_workspaceId_type_name_key", + "entityType": "indexes", + "schema": "public", + "table": "CustomField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EmailTopic_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EmailTopic_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_tenantId_key", + "entityType": "indexes", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "domain", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_domain_key", + "entityType": "indexes", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "ownerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tenant_ownerId_key", + "entityType": "indexes", + "schema": "public", + "table": "Tenant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "position", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TenantHelpItem_tenantId_position_idx", + "entityType": "indexes", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channelsTornDownAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserQuota_channelsTornDownAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserQuota" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"channelsTornDownAt\" IS NULL AND \"planStatus\" = 'trial'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserQuota_due_expired_trial_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserQuota" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "event", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ExternalWebhook_workspaceId_event_idx", + "entityType": "indexes", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "event", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "url", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ExternalWebhook_workspaceId_event_url_key", + "entityType": "indexes", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "pageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "formId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsAutomation_workspaceId_pageId_formId_key", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "leadgenId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_automationId_leadgenId_key", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leadgenId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_leadgenId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FBCommentAutomation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FBCommentAutomation_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "postId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FBCommentAutomationReply_dedup_idx", + "entityType": "indexes", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FBCommentAutomationReply_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "path", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_path_key", + "entityType": "indexes", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contextType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_workspaceId_contextType_idx", + "entityType": "indexes", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "subType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_workspaceId_subType_idx", + "entityType": "indexes", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowAnalyticsSession_workspaceId_flowId_key", + "entityType": "indexes", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowAnalyticsSession_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "buttonId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowNodeStat_filter_1_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"eventType\" = 'seen' AND \"seenAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowNodeStat_filter_2_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowRun_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Folder_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Folder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Folder_parentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Folder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_workspaceId_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_inboxId_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "fileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_fileId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"type\" = 'products' AND \"status\" IN ('pending', 'processing')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_products_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Inbox_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Inbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Inbox_workspaceId_channel_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "Inbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationActiveCampaign_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationActiveCampaign_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Integration_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Integration" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Integration_workspaceId_integrationType_key", + "entityType": "indexes", + "schema": "public", + "table": "Integration" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationClaude_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationClaude_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDeepseek_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDeepseek_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDrip_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDrip_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationFacebookAds_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationFacebookAds_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGemini_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGemini_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGetResponse_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGetResponse_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleCalendar_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleSheet_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_welcomeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "igId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_igId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationKlaviyo_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationKlaviyo_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailchimp_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailchimp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailerLite_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailerLite_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_welcomeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "pageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_pageId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_deletedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMoosend_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMoosend_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenAI_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "preset", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"preset\" <> 'custom'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_workspaceId_preset_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenrouter_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenrouter_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOutlookCalendar_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSendGrid_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSendGrid_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSmtp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSmtp_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "botId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_botId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "openId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_openId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_welcomeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_phoneNumberId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "fallbackFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_fallbackFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLink_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "MagicLink" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLink_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MagicLink" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "linkId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLinkStat_workspaceId_linkId_occurredAt_contactInboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_conversation_history_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_workspace_created_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_contactInboxId_sourceId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_conversationId_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"parentId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_parentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_inboxId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessageCleanup" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_status_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageCleanup" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageCleanup" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerMessageTemplate_integrationMessengerId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_workspaceId_channel_sourceKey_key", + "entityType": "indexes", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_channel_integrationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMetaCatalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "catalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "retailerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_integration_retailer_key", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMetaCatalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "catalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_integration_product_key", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" IN ('queued', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogSyncRun_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "livemode", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"userId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_user_type_livemode_key", + "entityType": "indexes", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "livemode", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"userId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_platform_type_livemode_key", + "entityType": "indexes", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_userId_idx", + "entityType": "indexes", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_categoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "subcategoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_subcategoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductAddon_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductAddon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductCategory_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductCategory_parentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductVariant_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductVariant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductVariantOption_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "submissionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "questionIdSnapshot", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireAnswer_submissionId_questionIdSnapshot_key", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireAnswer_questionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Questionnaire_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Questionnaire_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "orderNo", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireQuestion_questionnaireId_orderNo_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireQuestion_customFieldId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_questionnaireId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_questionnaireId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" = 'inProgress'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_workspaceId_contactId_active_key", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "RefLinkStat_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "linkId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "RefLinkStat_workspaceId_linkId_occurredAt_contactInboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Reflink_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Sequence_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Sequence_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "idempotencyKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_idempotencyKey_key", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_pending_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "bucket", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_pending_bucket_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_status_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_workspaceId_status_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "enrollmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_enrollmentId_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_workspace_sequence_step_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "bucket", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_bucket_status_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "updatedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" in ('completed', 'failed', 'canceled')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_terminal_updatedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceStep_sequenceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceStep_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "spreadsheetId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_workspaceId_spreadsheetId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "spreadsheetId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_spreadsheetId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tag_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tag_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_tag_integration_key", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "externalLabelId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_external_key", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_workspace_channel_idx", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_integration_idx", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "shareToken", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_shareToken_key", + "entityType": "indexes", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "templateId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_templateId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "installationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstalledResource_installationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "resourceKind", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "resourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstalledResource_workspaceId_resourceKind_resourceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "active", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_source_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_triggerId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_webhookId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_sourceId_triggerId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_sourceId_webhookId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_triggerId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_triggerId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_triggerId_date_key", + "entityType": "indexes", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_triggerId_date_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_workspaceId_date_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserPersistentMenu_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "active", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_workspaceId_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_webhookId_contactId_key", + "entityType": "indexes", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_phoneNumberId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "payloadHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_phone_hash_uq", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "processedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"processedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_processedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappFlow_integrationWhatsappId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappMessageTemplate_integrationWhatsappId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappSignupSession_userId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappSignupSession_expiresAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "scheduledDeletionAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_scheduledDeletionAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": false, + "columns": ["shardId"], + "schemaTo": "public", + "tableTo": "MessageShard", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ShardTimeRange_shardId_MessageShard_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": ["integrationWhatsappId"], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_IENNsXLBb1k1_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AdsConversionEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": ["integrationWhatsappId"], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_k99JXbMObQIn_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": ["integrationFacebookAdsId"], + "schemaTo": "public", + "tableTo": "IntegrationFacebookAds", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_fBmu8W26Mw5R_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIAgent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIAgent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIAssistant_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIAssistant" + }, + { + "nameExplicit": false, + "columns": ["sourceId"], + "schemaTo": "public", + "tableTo": "AIConversationSource", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_sourceId_AIConversationSource_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationSource_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationSource_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIEmbedding_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": false, + "columns": ["aiFileId"], + "schemaTo": "public", + "tableTo": "AIFile", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIEmbedding_aiFileId_AIFile_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIFile_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIFile" + }, + { + "nameExplicit": false, + "columns": ["triggerFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIFunction_triggerFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIFunction" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIFunction_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIFunction" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIMCPServer_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIMCPServer" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AITrigger_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AITrigger" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AITrigger_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AITrigger" + }, + { + "nameExplicit": false, + "columns": ["aiTriggerId"], + "schemaTo": "public", + "tableTo": "AITrigger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AITriggerToIntegrationOpenai_aiTriggerId_AITrigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AITriggerToIntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": ["integrationOpenaiId"], + "schemaTo": "public", + "tableTo": "IntegrationOpenai", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AITriggerToIntegrationOpenai_rSgeY7c25Tng_fkey", + "entityType": "fks", + "schema": "public", + "table": "AITriggerToIntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsBotMessageEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsBroadcastEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsContactEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsConversationEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsFlowNodeEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsMessageEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsSequenceEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "nameExplicit": false, + "columns": ["topicId"], + "schemaTo": "public", + "tableTo": "EmailTopic", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AnalyticsEmailTopic_topicId_EmailTopic_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AnalyticsEmailTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Appointment_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": ["calendarId"], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Appointment_calendarId_AppointmentCalendar_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Appointment_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Appointment_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": ["confirmationFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_confirmationFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": ["cancellationFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_cancellationFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": ["externalConnectionId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_externalConnectionId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": ["calendarId"], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarAvailability_QfahoIQAX592_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "nameExplicit": false, + "columns": ["calendarId"], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarReminder_5O4INfYC3dY3_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarReminder_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": ["appointmentId"], + "schemaTo": "public", + "tableTo": "Appointment", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_appointmentId_Appointment_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": ["reminderConfigId"], + "schemaTo": "public", + "tableTo": "AppointmentCalendarReminder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_a526jJM55OD7_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentReminderDispatch_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Account_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Account" + }, + { + "nameExplicit": false, + "columns": ["tenantId"], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Account_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Account" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Invitation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Invitation" + }, + { + "nameExplicit": false, + "columns": ["invitedBy"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Invitation_invitedBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Invitation" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Session_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Session" + }, + { + "nameExplicit": false, + "columns": ["tenantId"], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "User_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "User" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomatedResponse_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AutomatedResponse_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AutomatedResponse_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BotField_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BotField" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BotField_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BotField" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Broadcast_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Broadcast_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": ["integrationWhatsappId"], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_integrationWhatsappId_IntegrationWhatsapp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": ["integrationMessengerId"], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_integrationMessengerId_IntegrationMessenger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Contact_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactCustomField_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": false, + "columns": ["customFieldId"], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactCustomField_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactInbox_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactInbox_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactNote_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactNote" + }, + { + "nameExplicit": false, + "columns": ["createdById"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactNote_createdById_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactNote" + }, + { + "nameExplicit": false, + "columns": ["broadcastId"], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_broadcastId_Broadcast_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": false, + "columns": ["sequenceId"], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_sequenceId_Sequence_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSmartDelay_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": false, + "columns": ["appointmentId"], + "schemaTo": "public", + "tableTo": "Appointment", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ContactOnSmartDelay_appointmentId_Appointment_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSmartDelay_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTag_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTag" + }, + { + "nameExplicit": false, + "columns": ["tagId"], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTag_tagId_Tag_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTag" + }, + { + "nameExplicit": false, + "columns": ["tagId"], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_tagId_Tag_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": false, + "columns": ["tagChannelId"], + "schemaTo": "public", + "tableTo": "TagChannel", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_tagChannelId_TagChannel_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": false, + "columns": ["assignedUserId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Conversation_assignedUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": ["assignedInboxTeamId"], + "schemaTo": "public", + "tableTo": "InboxTeam", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Conversation_assignedInboxTeamId_InboxTeam_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Conversation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Conversation_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Coupon_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": false, + "columns": ["topicId"], + "schemaTo": "public", + "tableTo": "CouponTopic", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Coupon_topicId_CouponTopic_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": false, + "columns": ["issuedContactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Coupon_issuedContactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CouponTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": false, + "columns": ["createdById"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CouponTopic_createdById_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CustomField_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CustomField" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CustomField_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CustomField" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EmailTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EmailTopic_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": true, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AuditLog_workspaceId_fkey", + "entityType": "fks", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": true, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AuditLog_userId_fkey", + "entityType": "fks", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": false, + "columns": ["tenantId"], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CustomDomain_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": false, + "columns": ["ownerId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Tenant_ownerId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Tenant" + }, + { + "nameExplicit": false, + "columns": ["tenantId"], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TenantHelpItem_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "UserQuota_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "UserQuota" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "WorkspaceUsage_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ErrorLog_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ErrorLog_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ExternalWebhook_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookLeadAdsAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "FacebookLeadAdsAutomation_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "nameExplicit": false, + "columns": ["automationId"], + "schemaTo": "public", + "tableTo": "FacebookLeadAdsAutomation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookLeadAdsLead_n8swD949nr3L_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "FacebookLeadAdsLead_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FBCommentAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "FBCommentAutomation_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "nameExplicit": false, + "columns": ["automationId"], + "schemaTo": "public", + "tableTo": "FBCommentAutomation", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "FBCommentAutomationReply_Q6yXIfuQcsD0_fkey", + "entityType": "fks", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "FBCommentAutomationReply_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "FBCommentAutomationReply_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "File_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "File_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Flow_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Flow" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Flow_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Flow" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowNodeStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": ["flowVersionId"], + "schemaTo": "public", + "tableTo": "FlowVersion", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_flowVersionId_FlowVersion_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowVersion_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowVersion" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowVersion_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowVersion" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Folder_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Folder" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IgStoryAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IgStoryAutomation_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Import_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Import_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Import_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": ["fileId"], + "schemaTo": "public", + "tableTo": "File", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Import_fileId_File_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Inbox_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Inbox" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxContactStat_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxContactStat" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeam_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxTeam" + }, + { + "nameExplicit": false, + "columns": ["inboxTeamId"], + "schemaTo": "public", + "tableTo": "InboxTeam", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeamMember_inboxTeamId_InboxTeam_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeamMember_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationActiveCampaign_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationActiveCampaign_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Integration_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Integration" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationClaude_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationClaude_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDeepseek_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDeepseek_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDrip_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDrip_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationFacebookAds_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationFacebookAds_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGemini_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGemini_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGetResponse_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGetResponse_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleCalendar_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleSheet_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleSheet_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "nameExplicit": true, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationInstagram_workspaceId_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationInstagram_inboxId_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": ["welcomeFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationInstagram_welcomeFlowId_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationKlaviyo_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationKlaviyo_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailchimp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailchimp_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailerLite_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailerLite_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMessenger_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMessenger_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": ["welcomeFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationMessenger_welcomeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMetaCatalog_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMetaCatalog_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMoosend_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMoosend_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenai_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenai_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": ["aiAssistantId"], + "schemaTo": "public", + "tableTo": "AIAssistant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationOpenai_aiAssistantId_AIAssistant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": ["aiAgentId"], + "schemaTo": "public", + "tableTo": "AIAgent", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationOpenai_aiAgentId_AIAgent_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenaiCompatible_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenaiCompatible_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenrouter_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenrouter_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOutlookCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOutlookCalendar_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSendGrid_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSendGrid_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSmtp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSmtp_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTelegram_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTelegram_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTiktok_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTiktok_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWebchat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWebchat_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": false, + "columns": ["welcomeFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationWebchat_welcomeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWhatsapp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWhatsapp_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationZalo_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationZalo_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": false, + "columns": ["fallbackFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationZalo_fallbackFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLink_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MagicLink" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLinkStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "nameExplicit": false, + "columns": ["linkId"], + "schemaTo": "public", + "tableTo": "MagicLink", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLinkStat_linkId_MagicLink_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "nameExplicit": false, + "columns": ["integrationMessengerId"], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerMessageTemplate_x0Vv1d8cvLYN_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCapiEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCapiEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": false, + "columns": ["integrationMetaCatalogId"], + "schemaTo": "public", + "tableTo": "IntegrationMetaCatalog", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogItem_wJXyKUssR08y_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": false, + "columns": ["productId"], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogItem_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogSyncRun_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": false, + "columns": ["integrationMetaCatalogId"], + "schemaTo": "public", + "tableTo": "IntegrationMetaCatalog", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogSyncRun_8PnmCJ0uISUd_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": false, + "columns": ["categoryId"], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MetaCatalogSyncRun_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Credential_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": false, + "columns": ["categoryId"], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": ["subcategoryId"], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_subcategoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Product_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": ["productId"], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductAddon_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductAddon" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductCategory_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": false, + "columns": ["parentId"], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductCategory_parentId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": false, + "columns": ["productId"], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductVariant_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductVariant" + }, + { + "nameExplicit": false, + "columns": ["productId"], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductVariantOption_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "nameExplicit": false, + "columns": ["submissionId"], + "schemaTo": "public", + "tableTo": "QuestionnaireSubmission", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireAnswer_l8clOEM7NsPl_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": false, + "columns": ["questionId"], + "schemaTo": "public", + "tableTo": "QuestionnaireQuestion", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireAnswer_questionId_QuestionnaireQuestion_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": false, + "columns": ["triggerFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Questionnaire_triggerFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Questionnaire_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": false, + "columns": ["questionnaireId"], + "schemaTo": "public", + "tableTo": "Questionnaire", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireQuestion_questionnaireId_Questionnaire_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": false, + "columns": ["customFieldId"], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireQuestion_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": ["questionnaireId"], + "schemaTo": "public", + "tableTo": "Questionnaire", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_questionnaireId_Questionnaire_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireSubmission_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": ["currentQuestionId"], + "schemaTo": "public", + "tableTo": "QuestionnaireQuestion", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireSubmission_mha0bYFxcV7A_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "RefLinkStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": false, + "columns": ["linkId"], + "schemaTo": "public", + "tableTo": "Reflink", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "RefLinkStat_linkId_Reflink_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Reflink_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Reflink_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": ["customFieldId"], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Reflink_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReply_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SavedReply" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Sequence_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Sequence_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": ["sequenceId"], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_sequenceId_Sequence_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": ["stepId"], + "schemaTo": "public", + "tableTo": "SequenceStep", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_stepId_SequenceStep_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": ["enrollmentId", "workspaceId"], + "schemaTo": "public", + "tableTo": "ContactOnSequence", + "columnsTo": ["id", "workspaceId"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_enrollment_workspace_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "SequenceStep_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": false, + "columns": ["sequenceId"], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceStep_sequenceId_Sequence_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Spreadsheet_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Tag_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Tag_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TagChannel_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": false, + "columns": ["tagId"], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TagChannel_tagId_Tag_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Template_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": false, + "columns": ["tenantId"], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Template_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": false, + "columns": ["createdBy"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Template_createdBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstallation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": ["templateId"], + "schemaTo": "public", + "tableTo": "Template", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_templateId_Template_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": ["installedBy"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_installedBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": ["installationId"], + "schemaTo": "public", + "tableTo": "TemplateInstallation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstalledResource_a0BqwWeO96EB_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstalledResource_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Trigger_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Trigger_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": false, + "columns": ["triggerId"], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Condition_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": false, + "columns": ["webhookId"], + "schemaTo": "public", + "tableTo": "Webhook", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Condition_webhookId_Webhook_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": false, + "columns": ["triggerId"], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": false, + "columns": ["triggerId"], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": false, + "columns": ["triggerId"], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerStat_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserPersistentMenu_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Webhook_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Webhook_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": false, + "columns": ["webhookId"], + "schemaTo": "public", + "tableTo": "Webhook", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_webhookId_Webhook_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": false, + "columns": ["integrationWhatsappId"], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappFlow_integrationWhatsappId_IntegrationWhatsapp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "nameExplicit": false, + "columns": ["integrationWhatsappId"], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappMessageTemplate_p6pSomUTTJCm_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": false, + "columns": ["ownerId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_ownerId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": false, + "columns": ["ownerId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Workspace_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": false, + "columns": ["tenantId"], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Workspace_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMac_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMember_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMember_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "columns": ["aiTriggerId", "integrationOpenaiId"], + "nameExplicit": false, + "name": "AITriggerToIntegrationOpenai_pkey", + "entityType": "pks", + "schema": "public", + "table": "AITriggerToIntegrationOpenai" + }, + { + "columns": ["occurredAt", "eventId"], + "nameExplicit": false, + "name": "AnalyticsBotMessageEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "columns": [ + "broadcastId", + "contactInboxId", + "batchId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsBroadcastEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "columns": ["occurredAt", "eventId"], + "nameExplicit": false, + "name": "AnalyticsContactEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "columns": ["occurredAt", "eventId"], + "nameExplicit": false, + "name": "AnalyticsConversationEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "columns": [ + "flowId", + "analyticsId", + "nodeId", + "buttonId", + "contactInboxId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsFlowNodeEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "columns": ["occurredAt", "eventId"], + "nameExplicit": false, + "name": "AnalyticsMessageEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "columns": [ + "sequenceId", + "stepId", + "contactInboxId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsSequenceEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "columns": ["id", "createdAt"], + "nameExplicit": false, + "name": "Attachment_pkey", + "entityType": "pks", + "schema": "public", + "table": "Attachment" + }, + { + "columns": ["workspaceId", "hourBucket", "contactInboxId"], + "nameExplicit": false, + "name": "ContactActiveHourly_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "columns": ["workspaceId", "periodStart", "contactInboxId"], + "nameExplicit": false, + "name": "ContactActiveMonthly_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "columns": ["broadcastId", "contactId"], + "nameExplicit": true, + "name": "ContactsOnBroadcast_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "columns": ["id", "workspaceId"], + "nameExplicit": true, + "name": "ContactOnSequence_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "columns": ["contactId", "tagId"], + "nameExplicit": false, + "name": "ContactToTag_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactToTag" + }, + { + "columns": ["tagChannelId", "contactInboxId"], + "nameExplicit": false, + "name": "ContactToTagChannel_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "columns": ["id", "createdAt"], + "nameExplicit": false, + "name": "Message_pkey", + "entityType": "pks", + "schema": "public", + "table": "Message" + }, + { + "columns": ["id", "workspaceId"], + "nameExplicit": true, + "name": "SequenceDispatch_pkey", + "entityType": "pks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "columns": ["id", "contactId"], + "nameExplicit": true, + "name": "TriggerContactHistory_pkey", + "entityType": "pks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MessageShard_pkey", + "schema": "public", + "table": "MessageShard", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ShardTimeRange_pkey", + "schema": "public", + "table": "ShardTimeRange", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AdsConversionEvent_pkey", + "schema": "public", + "table": "AdsConversionEvent", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AdsConversionRule_pkey", + "schema": "public", + "table": "AdsConversionRule", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIAgent_pkey", + "schema": "public", + "table": "AIAgent", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIAssistant_pkey", + "schema": "public", + "table": "AIAssistant", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIConversationEmbedding_pkey", + "schema": "public", + "table": "AIConversationEmbedding", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIConversationSource_pkey", + "schema": "public", + "table": "AIConversationSource", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIEmbedding_pkey", + "schema": "public", + "table": "AIEmbedding", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIFile_pkey", + "schema": "public", + "table": "AIFile", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIFunction_pkey", + "schema": "public", + "table": "AIFunction", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIMCPServer_pkey", + "schema": "public", + "table": "AIMCPServer", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AITrigger_pkey", + "schema": "public", + "table": "AITrigger", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AnalyticsEmailTopic_pkey", + "schema": "public", + "table": "AnalyticsEmailTopic", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Appointment_pkey", + "schema": "public", + "table": "Appointment", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AppointmentCalendar_pkey", + "schema": "public", + "table": "AppointmentCalendar", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AppointmentCalendarAvailability_pkey", + "schema": "public", + "table": "AppointmentCalendarAvailability", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AppointmentCalendarReminder_pkey", + "schema": "public", + "table": "AppointmentCalendarReminder", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AppointmentReminderDispatch_pkey", + "schema": "public", + "table": "AppointmentReminderDispatch", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Account_pkey", + "schema": "public", + "table": "Account", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Invitation_pkey", + "schema": "public", + "table": "Invitation", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Jwk_pkey", + "schema": "public", + "table": "Jwk", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Session_pkey", + "schema": "public", + "table": "Session", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "User_pkey", + "schema": "public", + "table": "User", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Verification_pkey", + "schema": "public", + "table": "Verification", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AutomatedResponse_pkey", + "schema": "public", + "table": "AutomatedResponse", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "BotField_pkey", + "schema": "public", + "table": "BotField", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Broadcast_pkey", + "schema": "public", + "table": "Broadcast", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "CoexistSyncRun_pkey", + "schema": "public", + "table": "CoexistSyncRun", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Contact_pkey", + "schema": "public", + "table": "Contact", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ContactCustomField_pkey", + "schema": "public", + "table": "ContactCustomField", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ContactInbox_pkey", + "schema": "public", + "table": "ContactInbox", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ContactNote_pkey", + "schema": "public", + "table": "ContactNote", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ContactOnSmartDelay_pkey", + "schema": "public", + "table": "ContactOnSmartDelay", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Conversation_pkey", + "schema": "public", + "table": "Conversation", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ConversationParticipant_pkey", + "schema": "public", + "table": "ConversationParticipant", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Coupon_pkey", + "schema": "public", + "table": "Coupon", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "CouponTopic_pkey", + "schema": "public", + "table": "CouponTopic", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "CustomField_pkey", + "schema": "public", + "table": "CustomField", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "EmailTopic_pkey", + "schema": "public", + "table": "EmailTopic", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AuditLog_pkey", + "schema": "public", + "table": "AuditLog", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "CustomDomain_pkey", + "schema": "public", + "table": "CustomDomain", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Tenant_pkey", + "schema": "public", + "table": "Tenant", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "TenantHelpItem_pkey", + "schema": "public", + "table": "TenantHelpItem", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "UserQuota_pkey", + "schema": "public", + "table": "UserQuota", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WorkspaceUsage_pkey", + "schema": "public", + "table": "WorkspaceUsage", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ErrorLog_pkey", + "schema": "public", + "table": "ErrorLog", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ExternalWebhook_pkey", + "schema": "public", + "table": "ExternalWebhook", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FacebookLeadAdsAutomation_pkey", + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FacebookLeadAdsLead_pkey", + "schema": "public", + "table": "FacebookLeadAdsLead", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FBCommentAutomation_pkey", + "schema": "public", + "table": "FBCommentAutomation", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FBCommentAutomationReply_pkey", + "schema": "public", + "table": "FBCommentAutomationReply", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "File_pkey", + "schema": "public", + "table": "File", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Flow_pkey", + "schema": "public", + "table": "Flow", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FlowAnalyticsSession_pkey", + "schema": "public", + "table": "FlowAnalyticsSession", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FlowNodeStat_pkey", + "schema": "public", + "table": "FlowNodeStat", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FlowRun_pkey", + "schema": "public", + "table": "FlowRun", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FlowVersion_pkey", + "schema": "public", + "table": "FlowVersion", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Folder_pkey", + "schema": "public", + "table": "Folder", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IgStoryAutomation_pkey", + "schema": "public", + "table": "IgStoryAutomation", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Import_pkey", + "schema": "public", + "table": "Import", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Inbox_pkey", + "schema": "public", + "table": "Inbox", + "entityType": "pks" + }, + { + "columns": ["inboxId"], + "nameExplicit": false, + "name": "InboxContactStat_pkey", + "schema": "public", + "table": "InboxContactStat", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "InboxTeam_pkey", + "schema": "public", + "table": "InboxTeam", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "InboxTeamMember_pkey", + "schema": "public", + "table": "InboxTeamMember", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationActiveCampaign_pkey", + "schema": "public", + "table": "IntegrationActiveCampaign", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Integration_pkey", + "schema": "public", + "table": "Integration", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationClaude_pkey", + "schema": "public", + "table": "IntegrationClaude", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationDeepseek_pkey", + "schema": "public", + "table": "IntegrationDeepseek", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationDrip_pkey", + "schema": "public", + "table": "IntegrationDrip", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationFacebookAds_pkey", + "schema": "public", + "table": "IntegrationFacebookAds", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationGemini_pkey", + "schema": "public", + "table": "IntegrationGemini", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationGetResponse_pkey", + "schema": "public", + "table": "IntegrationGetResponse", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationGoogleCalendar_pkey", + "schema": "public", + "table": "IntegrationGoogleCalendar", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationGoogleSheet_pkey", + "schema": "public", + "table": "IntegrationGoogleSheet", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationInstagram_pkey", + "schema": "public", + "table": "IntegrationInstagram", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationKlaviyo_pkey", + "schema": "public", + "table": "IntegrationKlaviyo", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationMailchimp_pkey", + "schema": "public", + "table": "IntegrationMailchimp", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationMailerLite_pkey", + "schema": "public", + "table": "IntegrationMailerLite", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationMessenger_pkey", + "schema": "public", + "table": "IntegrationMessenger", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationMetaCatalog_pkey", + "schema": "public", + "table": "IntegrationMetaCatalog", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationMoosend_pkey", + "schema": "public", + "table": "IntegrationMoosend", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationOpenai_pkey", + "schema": "public", + "table": "IntegrationOpenai", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationOpenaiCompatible_pkey", + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationOpenrouter_pkey", + "schema": "public", + "table": "IntegrationOpenrouter", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationOutlookCalendar_pkey", + "schema": "public", + "table": "IntegrationOutlookCalendar", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationSendGrid_pkey", + "schema": "public", + "table": "IntegrationSendGrid", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationSmtp_pkey", + "schema": "public", + "table": "IntegrationSmtp", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationTelegram_pkey", + "schema": "public", + "table": "IntegrationTelegram", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationTiktok_pkey", + "schema": "public", + "table": "IntegrationTiktok", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationWebchat_pkey", + "schema": "public", + "table": "IntegrationWebchat", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationWhatsapp_pkey", + "schema": "public", + "table": "IntegrationWhatsapp", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationZalo_pkey", + "schema": "public", + "table": "IntegrationZalo", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MagicLink_pkey", + "schema": "public", + "table": "MagicLink", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MessageCleanup_pkey", + "schema": "public", + "table": "MessageCleanup", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MessengerMessageTemplate_pkey", + "schema": "public", + "table": "MessengerMessageTemplate", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MetaCapiEvent_pkey", + "schema": "public", + "table": "MetaCapiEvent", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MetaCatalogItem_pkey", + "schema": "public", + "table": "MetaCatalogItem", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MetaCatalogSyncRun_pkey", + "schema": "public", + "table": "MetaCatalogSyncRun", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Credential_pkey", + "schema": "public", + "table": "PlatformCredential", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Product_pkey", + "schema": "public", + "table": "Product", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ProductAddon_pkey", + "schema": "public", + "table": "ProductAddon", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ProductCategory_pkey", + "schema": "public", + "table": "ProductCategory", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ProductVariant_pkey", + "schema": "public", + "table": "ProductVariant", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ProductVariantOption_pkey", + "schema": "public", + "table": "ProductVariantOption", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "QuestionnaireAnswer_pkey", + "schema": "public", + "table": "QuestionnaireAnswer", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Questionnaire_pkey", + "schema": "public", + "table": "Questionnaire", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "QuestionnaireQuestion_pkey", + "schema": "public", + "table": "QuestionnaireQuestion", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "QuestionnaireSubmission_pkey", + "schema": "public", + "table": "QuestionnaireSubmission", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Reflink_pkey", + "schema": "public", + "table": "Reflink", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "SavedReply_pkey", + "schema": "public", + "table": "SavedReply", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Sequence_pkey", + "schema": "public", + "table": "Sequence", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "SequenceStep_pkey", + "schema": "public", + "table": "SequenceStep", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Spreadsheet_pkey", + "schema": "public", + "table": "Spreadsheet", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "SystemField_pkey", + "schema": "public", + "table": "SystemField", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Tag_pkey", + "schema": "public", + "table": "Tag", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "TagChannel_pkey", + "schema": "public", + "table": "TagChannel", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Template_pkey", + "schema": "public", + "table": "Template", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "TemplateInstallation_pkey", + "schema": "public", + "table": "TemplateInstallation", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "TemplateInstalledResource_pkey", + "schema": "public", + "table": "TemplateInstalledResource", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Trigger_pkey", + "schema": "public", + "table": "Trigger", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Condition_pkey", + "schema": "public", + "table": "Condition", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "TriggerExecution_pkey", + "schema": "public", + "table": "TriggerExecution", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "TriggerStat_pkey", + "schema": "public", + "table": "TriggerStat", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "UserPersistentMenu_pkey", + "schema": "public", + "table": "UserPersistentMenu", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Webhook_pkey", + "schema": "public", + "table": "Webhook", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WebhookExecution_pkey", + "schema": "public", + "table": "WebhookExecution", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WhatsappCoexistStaging_pkey", + "schema": "public", + "table": "WhatsappCoexistStaging", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WhatsappFlow_pkey", + "schema": "public", + "table": "WhatsappFlow", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WhatsappMessageTemplate_pkey", + "schema": "public", + "table": "WhatsappMessageTemplate", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WhatsappSignupSession_pkey", + "schema": "public", + "table": "WhatsappSignupSession", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Workspace_pkey", + "schema": "public", + "table": "Workspace", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WorkspaceMac_pkey", + "schema": "public", + "table": "WorkspaceMac", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WorkspaceMember_pkey", + "schema": "public", + "table": "WorkspaceMember", + "entityType": "pks" + }, + { + "nameExplicit": true, + "columns": ["contactInboxId", "sourceId", "createdAt"], + "nullsNotDistinct": false, + "name": "Message_source_dedup_idx", + "entityType": "uniques", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": ["workspaceId", "parentId", "name"], + "nullsNotDistinct": true, + "name": "ProductCategory_workspaceId_parent_name_key", + "entityType": "uniques", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": ["workspaceId", "periodStart", "periodEnd"], + "nullsNotDistinct": false, + "name": "WorkspaceMac_workspaceId_periodStart_periodEnd_unique", + "entityType": "uniques", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "nullsNotDistinct": false, + "name": "UserQuota_userId_key", + "schema": "public", + "table": "UserQuota", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "nullsNotDistinct": false, + "name": "WorkspaceUsage_workspaceId_key", + "schema": "public", + "table": "WorkspaceUsage", + "entityType": "uniques" + }, + { + "value": "(\"registrationStatus\" <> 'failed' OR \"registrationError\" IS NOT NULL)\n AND (\"registrationStatus\" <> 'registered' OR \"registrationError\" IS NULL)", + "name": "IntegrationWhatsapp_registrationStatus_error_consistent", + "entityType": "checks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "value": "\"channel\" IN ('messenger', 'instagram', 'whatsapp')", + "name": "MetaCapiEvent_channel_check", + "entityType": "checks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "value": "(\"customFieldId\" IS NULL) OR (\"systemFieldKey\" IS NULL)", + "name": "QuestionnaireQuestion_customFieldId_systemFieldKey_exclusive", + "entityType": "checks", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "value": "cardinality(\"candidatePhoneNumberIds\") > 0", + "name": "WhatsappSignupSession_candidates_not_empty", + "entityType": "checks", + "schema": "public", + "table": "WhatsappSignupSession" + } + ], + "renames": [] +} diff --git a/packages/database/drizzle/20260818081114_add_template_install_folder_and_autoupdate/migration.sql b/packages/database/drizzle/20260818081114_add_template_install_folder_and_autoupdate/migration.sql new file mode 100644 index 000000000..cc0b69744 --- /dev/null +++ b/packages/database/drizzle/20260818081114_add_template_install_folder_and_autoupdate/migration.sql @@ -0,0 +1,6 @@ +ALTER TABLE "Template" ADD COLUMN "createInstallFolder" boolean DEFAULT false NOT NULL;--> statement-breakpoint +ALTER TABLE "Template" ADD COLUMN "defaultAutoUpdate" boolean DEFAULT false NOT NULL;--> statement-breakpoint +ALTER TABLE "TemplateInstallation" ADD COLUMN "installFolderId" bigint;--> statement-breakpoint +ALTER TABLE "TemplateInstallation" ADD COLUMN "autoUpdate" boolean DEFAULT false NOT NULL;--> statement-breakpoint +ALTER TABLE "TemplateInstallation" ADD COLUMN "sourceUpdatedAt" timestamp(6) with time zone;--> statement-breakpoint +ALTER TABLE "TemplateInstallation" ADD CONSTRAINT "TemplateInstallation_installFolderId_Folder_id_fkey" FOREIGN KEY ("installFolderId") REFERENCES "Folder"("id") ON DELETE SET NULL ON UPDATE CASCADE; \ No newline at end of file diff --git a/packages/database/drizzle/20260818081114_add_template_install_folder_and_autoupdate/snapshot.json b/packages/database/drizzle/20260818081114_add_template_install_folder_and_autoupdate/snapshot.json new file mode 100644 index 000000000..a0916653b --- /dev/null +++ b/packages/database/drizzle/20260818081114_add_template_install_folder_and_autoupdate/snapshot.json @@ -0,0 +1,37246 @@ +{ + "version": "8", + "dialect": "postgres", + "id": "d463ae47-1bd0-4b47-9c55-ab02d9d272e7", + "prevIds": ["5ef38b2c-9ffd-4fd9-96c7-a5e4971026cb"], + "ddl": [ + { + "values": [ + "pending", + "sent", + "failed", + "skipped_no_scope", + "skipped_region" + ], + "name": "adsConversionCapiStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["automatic", "rule"], + "name": "adsConversionEventSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["whatsapp", "facebook"], + "name": "adsConversionChannel", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["lead", "purchase"], + "name": "adsConversionEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "success", "error", "processing"], + "name": "aiConversationEmbeddingStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "processing", "success", "error"], + "name": "aiConversationSourceStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["document", "image", "url", "web_search"], + "name": "aiConversationSourceType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "success", "error", "processing"], + "name": "aiEmbeddingStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["automated_response", "ai_agent", "flow", "none"], + "name": "analyticsBotResponseType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["success", "fallback"], + "name": "analyticsBotResult", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["flow", "agent", "fallback"], + "name": "analyticsBotRouteType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "message:sent", + "message:delivered", + "message:seen", + "message:failed", + "flow:clicked" + ], + "name": "analyticsBroadcastEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["contact_created", "contact_deleted", "contact_blocked"], + "name": "analyticsContactEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["bot", "human"], + "name": "analyticsContactSenderType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "conversation_created", + "conversation_assigned", + "conversation_unassigned", + "conversation_transferred_to_human", + "conversation_transferred_to_bot", + "conversation_followed", + "conversation_unfollowed", + "conversation_archived", + "conversation_unarchived" + ], + "name": "analyticsConversationEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["message_human_sent", "message_bot_sent"], + "name": "analyticsMessageEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["processing", "ingested", "failed"], + "name": "analyticsStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "synced", "failed"], + "name": "appointmentExternalSyncStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["inPerson", "phoneCall", "onlineMeeting"], + "name": "appointmentLocationTypeSnapshot", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["scheduled", "cancelled"], + "name": "appointmentStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["inPerson", "phoneCall", "onlineMeeting"], + "name": "appointmentLocationType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["rollingDays", "dateRange", "specificDay", "anyFutureDate"], + "name": "appointmentScheduleWindowType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["minutes", "hours", "days"], + "name": "appointmentReminderTimingUnit", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "sent", "cancelled", "failed"], + "name": "appointmentReminderDispatchStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["image", "video", "audio", "gif", "file"], + "name": "fileType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["inbound", "outbound"], + "name": "automatedResponseType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["now", "future"], + "name": "broadcastScheduleType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["scheduled", "sent", "sending", "cancelled"], + "name": "broadcastStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["whatsapp", "messenger", "instagram"], + "name": "coexistChannel", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["contacts", "messages"], + "name": "coexistMessengerSyncPhase", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["init", "running", "succeeded", "failed", "partial"], + "name": "coexistRunStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["male", "female", "unknown"], + "name": "gender", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "text", + "location", + "refLink", + "image", + "video", + "audio", + "gif", + "file" + ], + "name": "lastUserInputType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "scheduled", "completed", "failed", "canceled"], + "name": "ContactOnSmartDelayStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["waitNode", "followUp"], + "name": "ContactOnSmartDelayType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["active", "archived"], + "name": "couponTopicStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "shortText", + "email", + "phoneNumber", + "number", + "date", + "datetime", + "boolean", + "longText" + ], + "name": "customFieldType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["messenger", "instagram", "instagramFacebook"], + "name": "fbCommentAutomationType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["import", "generic", "export"], + "name": "fileContextType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "uploaded", "failed"], + "name": "fileStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "tag", + "flow", + "customField", + "automatedResponse", + "trigger", + "webhook", + "sequence", + "emailTopic", + "fbComment", + "igComment", + "igStory", + "outboundAutomatedResponse" + ], + "name": "folderType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["instagram", "instagramFacebook"], + "name": "igStoryAutomationType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["csv", "xlsx", "xls", "json"], + "name": "importFormat", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "processing", "completed", "failed"], + "name": "importStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["contacts", "coupons", "products", "flow"], + "name": "importType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["oauth", "fbe"], + "name": "metaCatalogAuthMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["active", "invalid"], + "name": "metaCatalogConnectionStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["idle", "queued", "running", "succeeded", "partial", "failed"], + "name": "metaCatalogImportStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending_verification", "registered", "failed"], + "name": "whatsappRegistrationStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["text", "location", "refLink"], + "name": "contentType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["message", "comment"], + "name": "messageKind", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["incoming", "outgoing", "activity"], + "name": "messageType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["bot", "contact", "system", "user", "api"], + "name": "senderType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "processing", "completed", "failed"], + "name": "MessageCleanupStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["push", "import"], + "name": "metaCatalogItemDirection", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["all", "category", "selected"], + "name": "metaCatalogSyncScope", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["queued", "running", "succeeded", "partial", "failed"], + "name": "metaCatalogSyncStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["dont_track", "track"], + "name": "inventoryPolicy", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "text", + "number", + "email", + "phone", + "multipleChoice", + "date", + "datetime", + "image", + "file", + "location", + "websiteLink" + ], + "name": "questionnaireQuestionType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["inProgress", "completed", "cancelled", "failed", "timeout"], + "name": "questionnaireSubmissionStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["refLink", "qrCode"], + "name": "ReflinkType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["me"], + "name": "SystemFieldType", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["pending", "installing", "completed", "partial", "failed"], + "name": "templateInstallationStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flows", + "customFields", + "tags", + "products", + "productCategories", + "aiFunctions", + "aiAgents", + "calendars", + "webchats", + "keywords", + "entryPointLinks", + "triggers", + "fbCommentAutomations", + "settings" + ], + "name": "templateResourceCategory", + "entityType": "enums", + "schema": "public" + }, + { + "values": ["owner", "agent"], + "name": "workspaceMemberRole", + "entityType": "enums", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessageShard", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ShardTimeRange", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AdsConversionEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AdsConversionRule", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIAgent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIAssistant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIConversationEmbedding", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIConversationSource", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIEmbedding", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIFile", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIFunction", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIMCPServer", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AITrigger", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AITriggerToIntegrationOpenai", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsBotMessageEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsBroadcastEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsContactEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsConversationEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsFlowNodeEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsMessageEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsSequenceEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsEmailTopic", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsManifestStatus", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Appointment", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentCalendar", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentCalendarAvailability", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentCalendarReminder", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentReminderDispatch", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Attachment", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Account", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Invitation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Jwk", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Session", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "User", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Verification", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AutomatedResponse", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "BotField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Broadcast", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CoexistSyncRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Contact", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactActiveHourly", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactActiveMonthly", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactCustomField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactInbox", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactNote", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactOnBroadcast", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactOnSequence", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactOnSmartDelay", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactToTag", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactToTagChannel", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Conversation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ConversationParticipant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Coupon", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CouponTopic", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CustomField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "EmailTopic", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AuditLog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CustomDomain", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Tenant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TenantHelpItem", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "UserQuota", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceUsage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ErrorLog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ExternalWebhook", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FacebookLeadAdsAutomation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FacebookLeadAdsLead", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FBCommentAutomation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FBCommentAutomationReply", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "File", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Flow", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowAnalyticsSession", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowNodeStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowVersion", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Folder", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IgStoryAutomation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Import", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Inbox", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboxContactStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboxTeam", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboxTeamMember", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationActiveCampaign", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Integration", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationClaude", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationDeepseek", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationDrip", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationFacebookAds", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGemini", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGetResponse", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGoogleCalendar", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGoogleSheet", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationInstagram", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationKlaviyo", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMailchimp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMailerLite", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMessenger", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMetaCatalog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMoosend", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOpenai", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOpenaiCompatible", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOpenrouter", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOutlookCalendar", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationSendGrid", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationSmtp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationTelegram", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationTiktok", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationWebchat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationWhatsapp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationZalo", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MagicLink", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MagicLinkStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Message", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessageCleanup", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessengerMessageTemplate", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MetaCapiEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MetaCatalogItem", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MetaCatalogSyncRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "PlatformCredential", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Product", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductAddon", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductCategory", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductVariant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductVariantOption", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "QuestionnaireAnswer", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Questionnaire", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "QuestionnaireQuestion", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "QuestionnaireSubmission", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "RefLinkStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Reflink", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SavedReply", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Sequence", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SequenceDispatch", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SequenceStep", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Spreadsheet", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SystemField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Tag", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TagChannel", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Template", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TemplateInstallation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TemplateInstalledResource", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Trigger", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Condition", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TriggerContactHistory", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TriggerExecution", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TriggerStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "UserPersistentMenu", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Webhook", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WebhookExecution", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappCoexistStaging", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappFlow", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappMessageTemplate", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappSignupSession", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Workspace", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceMac", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceMember", + "entityType": "tables", + "schema": "public" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "5432", + "generated": null, + "identity": null, + "name": "port", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "database", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credentialRef", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "'disable'", + "generated": null, + "identity": null, + "name": "sslMode", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isMain", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shardKey", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "readHost", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "readPort", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shardId", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionEventSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ctwaClid", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceEventId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionCapiStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "capiStatus", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiSentAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "adsConversionChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationFacebookAdsId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "adsConversionEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "trigger", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "markAs", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "messages", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isDefault", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isRichResponse", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "tools", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "webSearchAuthorizedDomains", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "models", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "aiTriggerIds", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "attachmentIds", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "AIAssistant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chunkIndex", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "vector(1536)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "embedding", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "aiConversationEmbeddingStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attachmentId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "aiConversationSourceType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceType", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "aiConversationSourceStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceKey", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentHash", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "summary", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "vector(1536)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "embedding", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "aiEmbeddingStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiFileId", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purpose", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dataCollect", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outputMessage", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerFlowId", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "availableTools", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "selectedTools", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "questions", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finalMessage", + "entityType": "columns", + "schema": "public", + "table": "AITrigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiTriggerId", + "entityType": "columns", + "schema": "public", + "table": "AITriggerToIntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationOpenaiId", + "entityType": "columns", + "schema": "public", + "table": "AITriggerToIntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasResponse", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "analyticsBotResponseType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "analyticsBotRouteType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "routeType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "analyticsBotResult", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "result", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiProvider", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "analyticsBroadcastEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "batchId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "analyticsContactEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "analyticsContactSenderType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "analyticsConversationEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromAssignee", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "toAssignee", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "analyticsId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "buttonId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "analyticsMessageEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "analyticsContactSenderType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstSeenAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSeenAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seenCount", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstClickedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastClickedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clickCount", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "objectKey", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "analyticsStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ingestedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inviteeTimezone", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "appointmentStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'scheduled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "appointmentLocationTypeSnapshot", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationType", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationDetail", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "appointmentExternalSyncStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalSyncStatus", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "30", + "generated": null, + "identity": null, + "name": "durationMinutes", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bufferAfterMinutes", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "appointmentLocationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationType", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationDetail", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "appointmentScheduleWindowType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'rollingDays'", + "generated": null, + "identity": null, + "name": "scheduleWindowType", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "scheduleWindowConfig", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxAppointmentsPerUser", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "dailyLimitEnabled", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxPerDay", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowGroupMeeting", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxPerSlot", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "confirmationMessage", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "confirmationFlowId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancellationFlowId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalConnectionId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicLinkSlug", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "weekday", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startMinute", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endMinute", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timingValue", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "appointmentReminderTimingUnit", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timingUnit", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appointmentId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reminderConfigId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "appointmentReminderDispatchStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "jobId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sentAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedReason", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageCreatedAt", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "fileType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileType", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "width", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "height", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnailPath", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originPath", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "providerId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accessToken", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accessTokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refreshToken", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refreshTokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idToken", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "password", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "invitedBy", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicKey", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "privateKey", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ipAddress", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "emailVerified", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isAnonymous", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "mustChangePassword", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifier", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "keywords", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "automatedResponseType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'inbound'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "customFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateData", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "broadcastStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "broadcastScheduleType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schedulesType", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schedulesAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactFilter", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subaction", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactCount", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistRunStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'init'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerSource", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastHeartbeatAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalScan", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentScan", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentPageNumber", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedContactCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedMessageCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentError", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastPhase", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastChunkOrder", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "syncProgress", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistMessengerSyncPhase", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'contacts'", + "generated": null, + "identity": null, + "name": "messengerSyncPhase", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "avatar", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumber", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "emailVerified", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "emailOptIn", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstName", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastName", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "CASE\n WHEN \"firstName\" IS NULL AND \"lastName\" IS NULL THEN NULL\n WHEN \"firstName\" IS NULL THEN \"lastName\"\n WHEN \"lastName\" IS NULL THEN \"firstName\"\n ELSE \"firstName\" || ' ' || \"lastName\"\n END", + "type": "stored" + }, + "identity": null, + "name": "fullName", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "gender", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "gender", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastReadAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ref", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "city", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "location", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locale", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subscribedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastSubscribedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "blockedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hourBucket", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceMacId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originalContactId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "personaId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactLastReadAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstInteractionAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastIncomingMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastOutboundMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referral", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastCommentMessageId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastCommentMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "consecutiveFailedReply", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastInputFailure", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastErrorLog", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastBtnTitle", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUserInput", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "lastUserInputType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUserInputType", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webchatParentUrl", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdById", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "sent", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "case when \"seenAt\" is null then false when \"deliveredAt\" is null then false else \"seenAt\" >= \"deliveredAt\" end", + "type": "stored" + }, + "identity": null, + "name": "isRead", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "enrolledAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextRunAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastStepId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextStepId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockOwner", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appointmentId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "ContactOnSmartDelayType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "ContactOnSmartDelayStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagChannelId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "botEnabled", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botResumeAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "archivedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "additionalAttributes", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactLastReadAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agentLastReadAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiContextLastMessageId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastActivityAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "followed", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedUserId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedInboxTeamId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastStep", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminRepliedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactRepliedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicId", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuedContactId", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuedAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "usedAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "couponTopicStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasEverHadCoupon", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdById", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "customFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "showInInbox", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sendsTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "deliveredsTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seensTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clicksTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "domain", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verifiedAt", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfHostnameId", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfOwnershipValue", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfAcmeValue", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disabledReason", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brandName", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logoLightPath", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logoDarkPath", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "faviconPath", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customCss", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customJs", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "theme", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storageUrl", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "policyUrl", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "termsOfServiceUrl", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "signupEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "forgotPasswordEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "magicLinkEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountCredentialsEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hiddenChannels", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "icon", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactsLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "contactsUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspacesLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "workspacesUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelsLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "channelsUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "teamMembersLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "teamMembersUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "macLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botMessagesLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "monthlyBotMessagesLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "monthlyBotMessagesUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "monthlyBotMessagesPeriodStart", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesTopUpGranted", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "whiteLabel", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "ssoSaml", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "saasMode", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "planName", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "planStatus", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "selectedTrialPlanId", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelsTornDownAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "syncedAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "contactsUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "channelsUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "teamMembersUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "syncedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "httpCode", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'make'", + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "event", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageName", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formName", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "fieldMapping", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "leadsHandledCount", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leadgenId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "fbCommentAutomationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'messenger'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "repliesCount", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "post", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"text\",\"value\":\"\"}'", + "generated": null, + "identity": null, + "name": "privateReply", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"none\",\"value\":null}'", + "generated": null, + "identity": null, + "name": "publicReply", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "includeKeywords", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "excludeKeywords", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"replyToNewContactsOnly\":false,\"replyOncePerUserPerPost\":false,\"likeUserComment\":false,\"replyToUsersWhoCommentedOnOtherPosts\":true,\"ignoreCommentReplies\":true,\"trackUserTags\":false}'", + "generated": null, + "identity": null, + "name": "options", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"all\":false,\"hasPhoneNumber\":false,\"hasImage\":false,\"hasVideo\":false,\"hasLink\":false,\"hasKeywords\":false,\"keywords\":[],\"showCommentsAfter\":\"none\"}'", + "generated": null, + "identity": null, + "name": "hideComments", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"immediately\",\"value\":0}'", + "generated": null, + "identity": null, + "name": "replyAfter", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "fileContextType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contextType", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subType", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileName", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileSize", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "fileStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "meta", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadedAt", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enableInInbox", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentVersionId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "draftVersionId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "analyticsId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "buttonId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refType", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "nodes", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "edges", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isDraft", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isLatest", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startNodeId", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "folderType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderType", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isTrash", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "paths", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "igStoryAutomationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "repliesCount", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "story", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"none\",\"value\":null}'", + "generated": null, + "identity": null, + "name": "reply", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "includeKeywords", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "importType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "importFormat", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "format", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "importStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "meta", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "processedCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "errorSample", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'connected'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "InboxContactStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalContacts", + "entityType": "columns", + "schema": "public", + "table": "InboxContactStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboxContactStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxTeamId", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationType", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'primary'", + "generated": null, + "identity": null, + "name": "providerCalendarId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userInfo", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "igId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "username", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'instagram'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userInfo", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "personas", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "personaId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "syncTagEnabledAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogName", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAuth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "metaCatalogAuthMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'oauth'", + "generated": null, + "identity": null, + "name": "authMode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "metaCatalogConnectionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "metaCatalogImportStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'idle'", + "generated": null, + "identity": null, + "name": "importStatus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importTotalCount", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedCount", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importFailedCount", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "importError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastImportedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'VND'", + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeUrl", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReplyVoice", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "voice", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiAssistantId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiAgentId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "baseURL", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultModel", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "preset", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'primary'", + "generated": null, + "identity": null, + "name": "providerCalendarId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromAddress", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enable", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "authorizedDomains", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brandColor", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hideHeader", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "showLogo", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hideMessageInput", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customCss", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumberId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "displayPhoneNumber", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isCoexist", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "platformType", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "historyDeclined", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "whatsappRegistrationStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending_verification'", + "generated": null, + "identity": null, + "name": "registrationStatus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "registrationError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verificationCodeRequestedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "oaId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fallbackFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "syncTagEnabledAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linkId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentAttributes", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "messageType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageType", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "contentType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentType", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "senderType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "messageKind", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'message'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attributes", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendError", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationIds", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sinceTime", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "MessageCleanupStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'POSITIONAL'", + "generated": null, + "identity": null, + "name": "parameterFormat", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "components", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventName", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentCategory", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentName", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceKey", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "capiStatus", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiSentAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiError", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMetaCatalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "metaCatalogItemDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'push'", + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retailerId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedFingerprint", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMetaCatalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "metaCatalogSyncStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'queued'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "metaCatalogItemDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'push'", + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "metaCatalogSyncScope", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'all'", + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "selectedProductIds", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "handles", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionLeaseId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "succeededCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "itemErrors", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "skippedItems", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "pollAttempt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicConfig", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "livemode", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "usePlatformCredential", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isVerified", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verifiedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUsedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortDescription", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "longDescription", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "taxes", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "discount", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'USD'", + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productUrl", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sku", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "inventoryPolicy", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'dont_track'", + "generated": null, + "identity": null, + "name": "inventoryPolicy", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "inventoryQuantity", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowOutOfStockPurchase", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "images", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "tags", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendor", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subcategoryId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isSearchable", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowSpecialRequest", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isAddonOnly", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "maxSelections", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "addonProductIds", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "combination", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isEnabled", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "values", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionIdSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionTitleSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionTypeSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "labelSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pointsEarned", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "attemptCount", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "answeredAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enableScore", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enableRetryMessages", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enableCustomFieldMapping", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerFlowId", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionnaireId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "questionnaireQuestionType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "orderNo", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "point", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retryMessage", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "systemFieldKey", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "config", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionnaireId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "questionnaireSubmissionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'inProgress'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "totalPoints", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentQuestionId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentQuestionSentAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastAnsweredMessageId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linkId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "ReflinkType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'refLink'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "qrStyles", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortcut", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "subscribers", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "messages", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "runAtMs", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "bucket", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idempotencyKey", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockOwner", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "enrollmentId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "case when \"seenAt\" is null then false when \"deliveredAt\" is null then false else \"seenAt\" >= \"deliveredAt\" end", + "type": "stored" + }, + "identity": null, + "name": "isRead", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "order", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delayDays", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "delayMinutes", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delayUnit", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "specificDateTime", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "anytime", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendTimeStart", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendTimeEnd", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "'[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"]'", + "generated": null, + "identity": null, + "name": "sendDays", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "spreadsheetId", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "SystemFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelType", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalLabelId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publisherName", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "youtubeVideoId", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "testLink", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "selection", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryCounts", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formatVersion", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shareToken", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "shareEnabled", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shareExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultPermissions", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "createInstallFolder", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "defaultAutoUpdate", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "installCount", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateName", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceWorkspaceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formatVersion", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "templateInstallationStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "warnings", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "warningCount", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "resourceCount", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installFolderId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoUpdate", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUpdatedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installedBy", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installationId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "templateResourceCategory", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resourceKind", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resourceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceResourceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "wasExisting", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "actions", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webhookId", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "operator", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstEnteredAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "executedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalContacts", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successCount", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failureCount", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalExecutions", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "menus", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "executedAt", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webhookId", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumberId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payloadHash", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "categories", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "validationErrors", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "completedCount", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "screens", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "components", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAccessToken", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "apiVersion", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "candidatePhoneNumberIds", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "consumedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultReply", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "targetCountry", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'en'", + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'UTC'", + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'#016DFF'", + "generated": null, + "identity": null, + "name": "brandColor", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "developmentMode", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "smartResponseDelaySeconds", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logo", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scheduledDeletionAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macCount", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "workspaceMemberRole", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notificationChannels", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notificationTypes", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "isActive", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageShard_isActive_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageShard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "shardKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageShard_shardKey_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageShard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "startTime", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "endTime", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ShardTimeRange_time_lookup_idx", + "entityType": "indexes", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "shardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ShardTimeRange_shardId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspace_integration_source_sourceEventId_key", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_adId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "enabled", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionRule_workspaceId_channel_enabled_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_sourceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "chunkIndex", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_sourceId_chunkIndex_key", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "embedding", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "vector_cosine_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "hnsw", + "concurrently": false, + "name": "AIConversationEmbedding_embedding_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_lookup_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_workspaceId_sourceType_sourceKey_key", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "messageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_messageId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIEmbedding_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "aiProvider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_aiProvider_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "hasResponse", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "result", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_hasResponse_result_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBroadcastEvent_workspaceId_broadcastId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adminId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_adminId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsConversationEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "toAssignee", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsConversationEvent_workspaceId_toAssignee_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsFlowNodeEvent_workspaceId_flowId_analyticsId_nodeId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "buttonId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsFlowNodeEvent_workspaceId_flowId_analyticsId_nodeId_buttonId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adminId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_adminId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "senderType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_senderType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsSequenceEvent_workspaceId_sequenceId_stepId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_token_key", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_topicId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_workspaceId_topicId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "objectKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsManifestStatus_objectKey_key", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "startAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_workspaceId_startAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "startAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_calendarId_status_startAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_contactId_calendarId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "publicLinkSlug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_publicLinkSlug_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendarAvailability_calendarId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "timingValue", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "timingUnit", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendarReminder_dedupe_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "jobId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_jobId_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sendAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_status_sendAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "appointmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_appointmentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "messageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "messageCreatedAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_message_idx", + "entityType": "indexes", + "schema": "public", + "table": "Attachment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_workspaceId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Attachment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Attachment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "providerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "accountId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Account_providerId_accountId_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Account" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Invitation_code_key", + "entityType": "indexes", + "schema": "public", + "table": "Invitation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Session_token_key", + "entityType": "indexes", + "schema": "public", + "table": "Session" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "User_email_tenant_key", + "entityType": "indexes", + "schema": "public", + "table": "User" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "User_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "User" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomatedResponse_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BotField_workspaceId_type_name_key", + "entityType": "indexes", + "schema": "public", + "table": "BotField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_channel_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "schedulesAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_schedulesAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_workspace_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastHeartbeatAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('init', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "\"startedAt\" DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('succeeded', 'partial')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_resume_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "status = 'init'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_init_uq", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "broadcastSubscribedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_broadcast_subscribed_at", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_created_at", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "firstName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_firstName_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lastName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_lastName_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_email_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumber", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_phoneNumber_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactCustomField_contactId_customFieldId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactCustomField_customFieldId_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastIncomingMessageAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_contactId_lastIncomingMessageAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastOutboundMessageAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_contactId_lastOutboundMessageAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "(\"referral\"->>'ctwaClid')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referral\"->>'ctwaClid' IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_referral_ctwaClid_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactNote_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactNote" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_on_broadcast_contact_id", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "isRead", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_on_broadcast_is_read", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_sequenceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_status_nextRunAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_workspaceId_status_nextRunAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_contactId_sequenceId_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_workspaceId_flowId_contactInboxId_stepId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "triggerAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_status_triggerAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "appointmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_appointmentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" NOT IN ('completed', 'failed', 'canceled') AND \"type\" = 'followUp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_followUp_active_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTagChannel_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTagChannel_tagId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_dm_key", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "aiContextLastMessageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_aiContextLastMessageId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastActivityAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_workspaceId_lastActivityAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_conversationId_userId_key", + "entityType": "indexes", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_code_key", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"issuedContactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_key", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_issuedContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "issuedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_issuedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "usedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_usedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_code_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "usedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_usedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_status_deletedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_expiresAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_name_idx", + "entityType": "indexes", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomField_workspaceId_type_name_key", + "entityType": "indexes", + "schema": "public", + "table": "CustomField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EmailTopic_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EmailTopic_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_tenantId_key", + "entityType": "indexes", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "domain", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_domain_key", + "entityType": "indexes", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "ownerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tenant_ownerId_key", + "entityType": "indexes", + "schema": "public", + "table": "Tenant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "position", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TenantHelpItem_tenantId_position_idx", + "entityType": "indexes", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channelsTornDownAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserQuota_channelsTornDownAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserQuota" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"channelsTornDownAt\" IS NULL AND \"planStatus\" = 'trial'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserQuota_due_expired_trial_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserQuota" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "event", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ExternalWebhook_workspaceId_event_idx", + "entityType": "indexes", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "event", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "url", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ExternalWebhook_workspaceId_event_url_key", + "entityType": "indexes", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "pageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "formId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsAutomation_workspaceId_pageId_formId_key", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "leadgenId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_automationId_leadgenId_key", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leadgenId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_leadgenId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FBCommentAutomation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FBCommentAutomation_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "postId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FBCommentAutomationReply_dedup_idx", + "entityType": "indexes", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FBCommentAutomationReply_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "path", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_path_key", + "entityType": "indexes", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contextType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_workspaceId_contextType_idx", + "entityType": "indexes", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "subType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_workspaceId_subType_idx", + "entityType": "indexes", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowAnalyticsSession_workspaceId_flowId_key", + "entityType": "indexes", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowAnalyticsSession_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "buttonId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowNodeStat_filter_1_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"eventType\" = 'seen' AND \"seenAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowNodeStat_filter_2_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowRun_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Folder_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Folder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Folder_parentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Folder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_workspaceId_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_inboxId_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "fileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_fileId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"type\" = 'products' AND \"status\" IN ('pending', 'processing')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_products_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Inbox_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Inbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Inbox_workspaceId_channel_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "Inbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationActiveCampaign_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationActiveCampaign_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Integration_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Integration" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Integration_workspaceId_integrationType_key", + "entityType": "indexes", + "schema": "public", + "table": "Integration" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationClaude_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationClaude_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDeepseek_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDeepseek_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDrip_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDrip_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationFacebookAds_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationFacebookAds_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGemini_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGemini_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGetResponse_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGetResponse_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleCalendar_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleSheet_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_welcomeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "igId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_igId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationKlaviyo_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationKlaviyo_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailchimp_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailchimp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailerLite_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailerLite_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_welcomeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "pageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_pageId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_deletedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMoosend_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMoosend_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenAI_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "preset", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"preset\" <> 'custom'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_workspaceId_preset_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenrouter_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenrouter_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOutlookCalendar_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSendGrid_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSendGrid_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSmtp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSmtp_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "botId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_botId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "openId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_openId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_welcomeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_phoneNumberId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "fallbackFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_fallbackFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLink_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "MagicLink" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLink_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MagicLink" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "linkId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLinkStat_workspaceId_linkId_occurredAt_contactInboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_conversation_history_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_workspace_created_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_contactInboxId_sourceId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_conversationId_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"parentId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_parentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_inboxId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessageCleanup" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_status_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageCleanup" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageCleanup" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerMessageTemplate_integrationMessengerId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_workspaceId_channel_sourceKey_key", + "entityType": "indexes", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_channel_integrationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMetaCatalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "catalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "retailerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_integration_retailer_key", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMetaCatalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "catalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_integration_product_key", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" IN ('queued', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogSyncRun_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "livemode", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"userId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_user_type_livemode_key", + "entityType": "indexes", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "livemode", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"userId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_platform_type_livemode_key", + "entityType": "indexes", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_userId_idx", + "entityType": "indexes", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_categoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "subcategoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_subcategoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductAddon_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductAddon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductCategory_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductCategory_parentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductVariant_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductVariant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductVariantOption_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "submissionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "questionIdSnapshot", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireAnswer_submissionId_questionIdSnapshot_key", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireAnswer_questionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Questionnaire_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Questionnaire_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "orderNo", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireQuestion_questionnaireId_orderNo_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireQuestion_customFieldId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_questionnaireId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_questionnaireId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" = 'inProgress'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_workspaceId_contactId_active_key", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "RefLinkStat_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "linkId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "RefLinkStat_workspaceId_linkId_occurredAt_contactInboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Reflink_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Sequence_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Sequence_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "idempotencyKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_idempotencyKey_key", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_pending_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "bucket", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_pending_bucket_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_status_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_workspaceId_status_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "enrollmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_enrollmentId_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_workspace_sequence_step_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "bucket", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_bucket_status_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "updatedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" in ('completed', 'failed', 'canceled')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_terminal_updatedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceStep_sequenceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceStep_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "spreadsheetId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_workspaceId_spreadsheetId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "spreadsheetId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_spreadsheetId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tag_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tag_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_tag_integration_key", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "externalLabelId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_external_key", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_workspace_channel_idx", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_integration_idx", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "shareToken", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_shareToken_key", + "entityType": "indexes", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "templateId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_templateId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "installationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstalledResource_installationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "resourceKind", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "resourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstalledResource_workspaceId_resourceKind_resourceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "active", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_source_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_triggerId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_webhookId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_sourceId_triggerId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_sourceId_webhookId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_triggerId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_triggerId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_triggerId_date_key", + "entityType": "indexes", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_triggerId_date_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_workspaceId_date_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserPersistentMenu_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "active", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_workspaceId_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_webhookId_contactId_key", + "entityType": "indexes", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_phoneNumberId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "payloadHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_phone_hash_uq", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "processedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"processedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_processedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappFlow_integrationWhatsappId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappMessageTemplate_integrationWhatsappId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappSignupSession_userId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappSignupSession_expiresAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "scheduledDeletionAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_scheduledDeletionAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": false, + "columns": ["shardId"], + "schemaTo": "public", + "tableTo": "MessageShard", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ShardTimeRange_shardId_MessageShard_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": ["integrationWhatsappId"], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_IENNsXLBb1k1_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AdsConversionEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": ["integrationWhatsappId"], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_k99JXbMObQIn_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": ["integrationFacebookAdsId"], + "schemaTo": "public", + "tableTo": "IntegrationFacebookAds", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_fBmu8W26Mw5R_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIAgent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIAgent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIAssistant_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIAssistant" + }, + { + "nameExplicit": false, + "columns": ["sourceId"], + "schemaTo": "public", + "tableTo": "AIConversationSource", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_sourceId_AIConversationSource_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationSource_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationSource_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIEmbedding_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": false, + "columns": ["aiFileId"], + "schemaTo": "public", + "tableTo": "AIFile", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIEmbedding_aiFileId_AIFile_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIFile_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIFile" + }, + { + "nameExplicit": false, + "columns": ["triggerFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIFunction_triggerFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIFunction" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIFunction_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIFunction" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIMCPServer_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIMCPServer" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AITrigger_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AITrigger" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AITrigger_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AITrigger" + }, + { + "nameExplicit": false, + "columns": ["aiTriggerId"], + "schemaTo": "public", + "tableTo": "AITrigger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AITriggerToIntegrationOpenai_aiTriggerId_AITrigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AITriggerToIntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": ["integrationOpenaiId"], + "schemaTo": "public", + "tableTo": "IntegrationOpenai", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AITriggerToIntegrationOpenai_rSgeY7c25Tng_fkey", + "entityType": "fks", + "schema": "public", + "table": "AITriggerToIntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsBotMessageEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsBroadcastEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsContactEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsConversationEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsFlowNodeEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsMessageEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsSequenceEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "nameExplicit": false, + "columns": ["topicId"], + "schemaTo": "public", + "tableTo": "EmailTopic", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AnalyticsEmailTopic_topicId_EmailTopic_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AnalyticsEmailTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Appointment_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": ["calendarId"], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Appointment_calendarId_AppointmentCalendar_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Appointment_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Appointment_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": ["confirmationFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_confirmationFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": ["cancellationFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_cancellationFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": ["externalConnectionId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_externalConnectionId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": ["calendarId"], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarAvailability_QfahoIQAX592_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "nameExplicit": false, + "columns": ["calendarId"], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarReminder_5O4INfYC3dY3_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarReminder_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": ["appointmentId"], + "schemaTo": "public", + "tableTo": "Appointment", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_appointmentId_Appointment_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": ["reminderConfigId"], + "schemaTo": "public", + "tableTo": "AppointmentCalendarReminder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_a526jJM55OD7_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentReminderDispatch_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Account_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Account" + }, + { + "nameExplicit": false, + "columns": ["tenantId"], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Account_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Account" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Invitation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Invitation" + }, + { + "nameExplicit": false, + "columns": ["invitedBy"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Invitation_invitedBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Invitation" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Session_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Session" + }, + { + "nameExplicit": false, + "columns": ["tenantId"], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "User_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "User" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomatedResponse_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AutomatedResponse_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AutomatedResponse_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BotField_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BotField" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BotField_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BotField" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Broadcast_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Broadcast_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": ["integrationWhatsappId"], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_integrationWhatsappId_IntegrationWhatsapp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": ["integrationMessengerId"], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_integrationMessengerId_IntegrationMessenger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Contact_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactCustomField_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": false, + "columns": ["customFieldId"], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactCustomField_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactInbox_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactInbox_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactNote_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactNote" + }, + { + "nameExplicit": false, + "columns": ["createdById"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactNote_createdById_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactNote" + }, + { + "nameExplicit": false, + "columns": ["broadcastId"], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_broadcastId_Broadcast_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": false, + "columns": ["sequenceId"], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_sequenceId_Sequence_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSmartDelay_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": false, + "columns": ["appointmentId"], + "schemaTo": "public", + "tableTo": "Appointment", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ContactOnSmartDelay_appointmentId_Appointment_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSmartDelay_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTag_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTag" + }, + { + "nameExplicit": false, + "columns": ["tagId"], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTag_tagId_Tag_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTag" + }, + { + "nameExplicit": false, + "columns": ["tagId"], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_tagId_Tag_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": false, + "columns": ["tagChannelId"], + "schemaTo": "public", + "tableTo": "TagChannel", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_tagChannelId_TagChannel_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": false, + "columns": ["assignedUserId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Conversation_assignedUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": ["assignedInboxTeamId"], + "schemaTo": "public", + "tableTo": "InboxTeam", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Conversation_assignedInboxTeamId_InboxTeam_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Conversation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Conversation_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Coupon_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": false, + "columns": ["topicId"], + "schemaTo": "public", + "tableTo": "CouponTopic", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Coupon_topicId_CouponTopic_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": false, + "columns": ["issuedContactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Coupon_issuedContactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CouponTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": false, + "columns": ["createdById"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CouponTopic_createdById_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CustomField_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CustomField" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CustomField_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CustomField" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EmailTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EmailTopic_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": true, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AuditLog_workspaceId_fkey", + "entityType": "fks", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": true, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AuditLog_userId_fkey", + "entityType": "fks", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": false, + "columns": ["tenantId"], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CustomDomain_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": false, + "columns": ["ownerId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Tenant_ownerId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Tenant" + }, + { + "nameExplicit": false, + "columns": ["tenantId"], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TenantHelpItem_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "UserQuota_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "UserQuota" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "WorkspaceUsage_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ErrorLog_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ErrorLog_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ExternalWebhook_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookLeadAdsAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "FacebookLeadAdsAutomation_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "nameExplicit": false, + "columns": ["automationId"], + "schemaTo": "public", + "tableTo": "FacebookLeadAdsAutomation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookLeadAdsLead_n8swD949nr3L_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "FacebookLeadAdsLead_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FBCommentAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "FBCommentAutomation_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FBCommentAutomation" + }, + { + "nameExplicit": false, + "columns": ["automationId"], + "schemaTo": "public", + "tableTo": "FBCommentAutomation", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "FBCommentAutomationReply_Q6yXIfuQcsD0_fkey", + "entityType": "fks", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "FBCommentAutomationReply_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "FBCommentAutomationReply_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FBCommentAutomationReply" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "File_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "File_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Flow_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Flow" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Flow_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Flow" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowNodeStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": ["flowVersionId"], + "schemaTo": "public", + "tableTo": "FlowVersion", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_flowVersionId_FlowVersion_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowVersion_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowVersion" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowVersion_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowVersion" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Folder_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Folder" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IgStoryAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IgStoryAutomation_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Import_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Import_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Import_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": ["fileId"], + "schemaTo": "public", + "tableTo": "File", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Import_fileId_File_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Inbox_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Inbox" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxContactStat_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxContactStat" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeam_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxTeam" + }, + { + "nameExplicit": false, + "columns": ["inboxTeamId"], + "schemaTo": "public", + "tableTo": "InboxTeam", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeamMember_inboxTeamId_InboxTeam_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeamMember_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationActiveCampaign_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationActiveCampaign_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Integration_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Integration" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationClaude_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationClaude_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDeepseek_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDeepseek_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDrip_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDrip_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationFacebookAds_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationFacebookAds_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGemini_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGemini_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGetResponse_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGetResponse_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleCalendar_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleSheet_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleSheet_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "nameExplicit": true, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationInstagram_workspaceId_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationInstagram_inboxId_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": ["welcomeFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationInstagram_welcomeFlowId_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationKlaviyo_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationKlaviyo_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailchimp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailchimp_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailerLite_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailerLite_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMessenger_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMessenger_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": ["welcomeFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationMessenger_welcomeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMetaCatalog_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMetaCatalog_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMoosend_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMoosend_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenai_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenai_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": ["aiAssistantId"], + "schemaTo": "public", + "tableTo": "AIAssistant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationOpenai_aiAssistantId_AIAssistant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": ["aiAgentId"], + "schemaTo": "public", + "tableTo": "AIAgent", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationOpenai_aiAgentId_AIAgent_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenaiCompatible_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenaiCompatible_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenrouter_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenrouter_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOutlookCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOutlookCalendar_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSendGrid_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": false, + "columns": ["integrationId"], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSendGrid_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSmtp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSmtp_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTelegram_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTelegram_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTiktok_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTiktok_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWebchat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWebchat_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": false, + "columns": ["welcomeFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationWebchat_welcomeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWhatsapp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWhatsapp_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationZalo_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": false, + "columns": ["inboxId"], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationZalo_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": false, + "columns": ["fallbackFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationZalo_fallbackFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLink_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MagicLink" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLinkStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "nameExplicit": false, + "columns": ["linkId"], + "schemaTo": "public", + "tableTo": "MagicLink", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLinkStat_linkId_MagicLink_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "nameExplicit": false, + "columns": ["integrationMessengerId"], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerMessageTemplate_x0Vv1d8cvLYN_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCapiEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCapiEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": false, + "columns": ["integrationMetaCatalogId"], + "schemaTo": "public", + "tableTo": "IntegrationMetaCatalog", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogItem_wJXyKUssR08y_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": false, + "columns": ["productId"], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogItem_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogSyncRun_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": false, + "columns": ["integrationMetaCatalogId"], + "schemaTo": "public", + "tableTo": "IntegrationMetaCatalog", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogSyncRun_8PnmCJ0uISUd_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": false, + "columns": ["categoryId"], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MetaCatalogSyncRun_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Credential_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": false, + "columns": ["categoryId"], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": ["subcategoryId"], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_subcategoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Product_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": ["productId"], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductAddon_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductAddon" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductCategory_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": false, + "columns": ["parentId"], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductCategory_parentId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": false, + "columns": ["productId"], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductVariant_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductVariant" + }, + { + "nameExplicit": false, + "columns": ["productId"], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductVariantOption_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "nameExplicit": false, + "columns": ["submissionId"], + "schemaTo": "public", + "tableTo": "QuestionnaireSubmission", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireAnswer_l8clOEM7NsPl_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": false, + "columns": ["questionId"], + "schemaTo": "public", + "tableTo": "QuestionnaireQuestion", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireAnswer_questionId_QuestionnaireQuestion_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": false, + "columns": ["triggerFlowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Questionnaire_triggerFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Questionnaire_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": false, + "columns": ["questionnaireId"], + "schemaTo": "public", + "tableTo": "Questionnaire", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireQuestion_questionnaireId_Questionnaire_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": false, + "columns": ["customFieldId"], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireQuestion_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": ["questionnaireId"], + "schemaTo": "public", + "tableTo": "Questionnaire", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_questionnaireId_Questionnaire_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": ["conversationId"], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireSubmission_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": ["currentQuestionId"], + "schemaTo": "public", + "tableTo": "QuestionnaireQuestion", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireSubmission_mha0bYFxcV7A_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "RefLinkStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": false, + "columns": ["linkId"], + "schemaTo": "public", + "tableTo": "Reflink", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "RefLinkStat_linkId_Reflink_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Reflink_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Reflink_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": ["customFieldId"], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Reflink_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReply_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SavedReply" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Sequence_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Sequence_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": ["sequenceId"], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_sequenceId_Sequence_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": ["contactInboxId"], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": ["stepId"], + "schemaTo": "public", + "tableTo": "SequenceStep", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_stepId_SequenceStep_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": ["enrollmentId", "workspaceId"], + "schemaTo": "public", + "tableTo": "ContactOnSequence", + "columnsTo": ["id", "workspaceId"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_enrollment_workspace_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": ["flowId"], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "SequenceStep_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": false, + "columns": ["sequenceId"], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceStep_sequenceId_Sequence_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Spreadsheet_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Tag_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Tag_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TagChannel_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": false, + "columns": ["tagId"], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TagChannel_tagId_Tag_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Template_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": false, + "columns": ["tenantId"], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Template_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": false, + "columns": ["createdBy"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Template_createdBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstallation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": ["templateId"], + "schemaTo": "public", + "tableTo": "Template", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_templateId_Template_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": ["installFolderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_installFolderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": ["installedBy"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_installedBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": ["installationId"], + "schemaTo": "public", + "tableTo": "TemplateInstallation", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstalledResource_a0BqwWeO96EB_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstalledResource_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Trigger_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Trigger_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": false, + "columns": ["triggerId"], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Condition_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": false, + "columns": ["webhookId"], + "schemaTo": "public", + "tableTo": "Webhook", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Condition_webhookId_Webhook_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": false, + "columns": ["triggerId"], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": false, + "columns": ["triggerId"], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": false, + "columns": ["triggerId"], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerStat_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserPersistentMenu_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "nameExplicit": false, + "columns": ["folderId"], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Webhook_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Webhook_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": false, + "columns": ["webhookId"], + "schemaTo": "public", + "tableTo": "Webhook", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_webhookId_Webhook_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": false, + "columns": ["contactId"], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": false, + "columns": ["integrationWhatsappId"], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappFlow_integrationWhatsappId_IntegrationWhatsapp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "nameExplicit": false, + "columns": ["integrationWhatsappId"], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappMessageTemplate_p6pSomUTTJCm_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": false, + "columns": ["ownerId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_ownerId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": false, + "columns": ["ownerId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Workspace_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": false, + "columns": ["tenantId"], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Workspace_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMac_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMember_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": ["id"], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMember_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "columns": ["aiTriggerId", "integrationOpenaiId"], + "nameExplicit": false, + "name": "AITriggerToIntegrationOpenai_pkey", + "entityType": "pks", + "schema": "public", + "table": "AITriggerToIntegrationOpenai" + }, + { + "columns": ["occurredAt", "eventId"], + "nameExplicit": false, + "name": "AnalyticsBotMessageEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "columns": [ + "broadcastId", + "contactInboxId", + "batchId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsBroadcastEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "columns": ["occurredAt", "eventId"], + "nameExplicit": false, + "name": "AnalyticsContactEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "columns": ["occurredAt", "eventId"], + "nameExplicit": false, + "name": "AnalyticsConversationEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "columns": [ + "flowId", + "analyticsId", + "nodeId", + "buttonId", + "contactInboxId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsFlowNodeEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "columns": ["occurredAt", "eventId"], + "nameExplicit": false, + "name": "AnalyticsMessageEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "columns": [ + "sequenceId", + "stepId", + "contactInboxId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsSequenceEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "columns": ["id", "createdAt"], + "nameExplicit": false, + "name": "Attachment_pkey", + "entityType": "pks", + "schema": "public", + "table": "Attachment" + }, + { + "columns": ["workspaceId", "hourBucket", "contactInboxId"], + "nameExplicit": false, + "name": "ContactActiveHourly_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "columns": ["workspaceId", "periodStart", "contactInboxId"], + "nameExplicit": false, + "name": "ContactActiveMonthly_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "columns": ["broadcastId", "contactId"], + "nameExplicit": true, + "name": "ContactsOnBroadcast_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "columns": ["id", "workspaceId"], + "nameExplicit": true, + "name": "ContactOnSequence_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "columns": ["contactId", "tagId"], + "nameExplicit": false, + "name": "ContactToTag_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactToTag" + }, + { + "columns": ["tagChannelId", "contactInboxId"], + "nameExplicit": false, + "name": "ContactToTagChannel_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "columns": ["id", "createdAt"], + "nameExplicit": false, + "name": "Message_pkey", + "entityType": "pks", + "schema": "public", + "table": "Message" + }, + { + "columns": ["id", "workspaceId"], + "nameExplicit": true, + "name": "SequenceDispatch_pkey", + "entityType": "pks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "columns": ["id", "contactId"], + "nameExplicit": true, + "name": "TriggerContactHistory_pkey", + "entityType": "pks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MessageShard_pkey", + "schema": "public", + "table": "MessageShard", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ShardTimeRange_pkey", + "schema": "public", + "table": "ShardTimeRange", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AdsConversionEvent_pkey", + "schema": "public", + "table": "AdsConversionEvent", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AdsConversionRule_pkey", + "schema": "public", + "table": "AdsConversionRule", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIAgent_pkey", + "schema": "public", + "table": "AIAgent", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIAssistant_pkey", + "schema": "public", + "table": "AIAssistant", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIConversationEmbedding_pkey", + "schema": "public", + "table": "AIConversationEmbedding", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIConversationSource_pkey", + "schema": "public", + "table": "AIConversationSource", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIEmbedding_pkey", + "schema": "public", + "table": "AIEmbedding", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIFile_pkey", + "schema": "public", + "table": "AIFile", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIFunction_pkey", + "schema": "public", + "table": "AIFunction", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AIMCPServer_pkey", + "schema": "public", + "table": "AIMCPServer", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AITrigger_pkey", + "schema": "public", + "table": "AITrigger", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AnalyticsEmailTopic_pkey", + "schema": "public", + "table": "AnalyticsEmailTopic", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Appointment_pkey", + "schema": "public", + "table": "Appointment", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AppointmentCalendar_pkey", + "schema": "public", + "table": "AppointmentCalendar", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AppointmentCalendarAvailability_pkey", + "schema": "public", + "table": "AppointmentCalendarAvailability", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AppointmentCalendarReminder_pkey", + "schema": "public", + "table": "AppointmentCalendarReminder", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AppointmentReminderDispatch_pkey", + "schema": "public", + "table": "AppointmentReminderDispatch", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Account_pkey", + "schema": "public", + "table": "Account", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Invitation_pkey", + "schema": "public", + "table": "Invitation", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Jwk_pkey", + "schema": "public", + "table": "Jwk", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Session_pkey", + "schema": "public", + "table": "Session", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "User_pkey", + "schema": "public", + "table": "User", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Verification_pkey", + "schema": "public", + "table": "Verification", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AutomatedResponse_pkey", + "schema": "public", + "table": "AutomatedResponse", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "BotField_pkey", + "schema": "public", + "table": "BotField", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Broadcast_pkey", + "schema": "public", + "table": "Broadcast", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "CoexistSyncRun_pkey", + "schema": "public", + "table": "CoexistSyncRun", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Contact_pkey", + "schema": "public", + "table": "Contact", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ContactCustomField_pkey", + "schema": "public", + "table": "ContactCustomField", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ContactInbox_pkey", + "schema": "public", + "table": "ContactInbox", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ContactNote_pkey", + "schema": "public", + "table": "ContactNote", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ContactOnSmartDelay_pkey", + "schema": "public", + "table": "ContactOnSmartDelay", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Conversation_pkey", + "schema": "public", + "table": "Conversation", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ConversationParticipant_pkey", + "schema": "public", + "table": "ConversationParticipant", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Coupon_pkey", + "schema": "public", + "table": "Coupon", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "CouponTopic_pkey", + "schema": "public", + "table": "CouponTopic", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "CustomField_pkey", + "schema": "public", + "table": "CustomField", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "EmailTopic_pkey", + "schema": "public", + "table": "EmailTopic", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "AuditLog_pkey", + "schema": "public", + "table": "AuditLog", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "CustomDomain_pkey", + "schema": "public", + "table": "CustomDomain", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Tenant_pkey", + "schema": "public", + "table": "Tenant", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "TenantHelpItem_pkey", + "schema": "public", + "table": "TenantHelpItem", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "UserQuota_pkey", + "schema": "public", + "table": "UserQuota", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WorkspaceUsage_pkey", + "schema": "public", + "table": "WorkspaceUsage", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ErrorLog_pkey", + "schema": "public", + "table": "ErrorLog", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ExternalWebhook_pkey", + "schema": "public", + "table": "ExternalWebhook", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FacebookLeadAdsAutomation_pkey", + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FacebookLeadAdsLead_pkey", + "schema": "public", + "table": "FacebookLeadAdsLead", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FBCommentAutomation_pkey", + "schema": "public", + "table": "FBCommentAutomation", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FBCommentAutomationReply_pkey", + "schema": "public", + "table": "FBCommentAutomationReply", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "File_pkey", + "schema": "public", + "table": "File", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Flow_pkey", + "schema": "public", + "table": "Flow", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FlowAnalyticsSession_pkey", + "schema": "public", + "table": "FlowAnalyticsSession", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FlowNodeStat_pkey", + "schema": "public", + "table": "FlowNodeStat", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FlowRun_pkey", + "schema": "public", + "table": "FlowRun", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "FlowVersion_pkey", + "schema": "public", + "table": "FlowVersion", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Folder_pkey", + "schema": "public", + "table": "Folder", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IgStoryAutomation_pkey", + "schema": "public", + "table": "IgStoryAutomation", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Import_pkey", + "schema": "public", + "table": "Import", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Inbox_pkey", + "schema": "public", + "table": "Inbox", + "entityType": "pks" + }, + { + "columns": ["inboxId"], + "nameExplicit": false, + "name": "InboxContactStat_pkey", + "schema": "public", + "table": "InboxContactStat", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "InboxTeam_pkey", + "schema": "public", + "table": "InboxTeam", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "InboxTeamMember_pkey", + "schema": "public", + "table": "InboxTeamMember", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationActiveCampaign_pkey", + "schema": "public", + "table": "IntegrationActiveCampaign", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Integration_pkey", + "schema": "public", + "table": "Integration", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationClaude_pkey", + "schema": "public", + "table": "IntegrationClaude", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationDeepseek_pkey", + "schema": "public", + "table": "IntegrationDeepseek", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationDrip_pkey", + "schema": "public", + "table": "IntegrationDrip", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationFacebookAds_pkey", + "schema": "public", + "table": "IntegrationFacebookAds", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationGemini_pkey", + "schema": "public", + "table": "IntegrationGemini", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationGetResponse_pkey", + "schema": "public", + "table": "IntegrationGetResponse", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationGoogleCalendar_pkey", + "schema": "public", + "table": "IntegrationGoogleCalendar", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationGoogleSheet_pkey", + "schema": "public", + "table": "IntegrationGoogleSheet", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationInstagram_pkey", + "schema": "public", + "table": "IntegrationInstagram", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationKlaviyo_pkey", + "schema": "public", + "table": "IntegrationKlaviyo", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationMailchimp_pkey", + "schema": "public", + "table": "IntegrationMailchimp", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationMailerLite_pkey", + "schema": "public", + "table": "IntegrationMailerLite", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationMessenger_pkey", + "schema": "public", + "table": "IntegrationMessenger", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationMetaCatalog_pkey", + "schema": "public", + "table": "IntegrationMetaCatalog", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationMoosend_pkey", + "schema": "public", + "table": "IntegrationMoosend", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationOpenai_pkey", + "schema": "public", + "table": "IntegrationOpenai", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationOpenaiCompatible_pkey", + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationOpenrouter_pkey", + "schema": "public", + "table": "IntegrationOpenrouter", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationOutlookCalendar_pkey", + "schema": "public", + "table": "IntegrationOutlookCalendar", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationSendGrid_pkey", + "schema": "public", + "table": "IntegrationSendGrid", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationSmtp_pkey", + "schema": "public", + "table": "IntegrationSmtp", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationTelegram_pkey", + "schema": "public", + "table": "IntegrationTelegram", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationTiktok_pkey", + "schema": "public", + "table": "IntegrationTiktok", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationWebchat_pkey", + "schema": "public", + "table": "IntegrationWebchat", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationWhatsapp_pkey", + "schema": "public", + "table": "IntegrationWhatsapp", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "IntegrationZalo_pkey", + "schema": "public", + "table": "IntegrationZalo", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MagicLink_pkey", + "schema": "public", + "table": "MagicLink", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MessageCleanup_pkey", + "schema": "public", + "table": "MessageCleanup", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MessengerMessageTemplate_pkey", + "schema": "public", + "table": "MessengerMessageTemplate", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MetaCapiEvent_pkey", + "schema": "public", + "table": "MetaCapiEvent", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MetaCatalogItem_pkey", + "schema": "public", + "table": "MetaCatalogItem", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "MetaCatalogSyncRun_pkey", + "schema": "public", + "table": "MetaCatalogSyncRun", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Credential_pkey", + "schema": "public", + "table": "PlatformCredential", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Product_pkey", + "schema": "public", + "table": "Product", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ProductAddon_pkey", + "schema": "public", + "table": "ProductAddon", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ProductCategory_pkey", + "schema": "public", + "table": "ProductCategory", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ProductVariant_pkey", + "schema": "public", + "table": "ProductVariant", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "ProductVariantOption_pkey", + "schema": "public", + "table": "ProductVariantOption", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "QuestionnaireAnswer_pkey", + "schema": "public", + "table": "QuestionnaireAnswer", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Questionnaire_pkey", + "schema": "public", + "table": "Questionnaire", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "QuestionnaireQuestion_pkey", + "schema": "public", + "table": "QuestionnaireQuestion", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "QuestionnaireSubmission_pkey", + "schema": "public", + "table": "QuestionnaireSubmission", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Reflink_pkey", + "schema": "public", + "table": "Reflink", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "SavedReply_pkey", + "schema": "public", + "table": "SavedReply", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Sequence_pkey", + "schema": "public", + "table": "Sequence", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "SequenceStep_pkey", + "schema": "public", + "table": "SequenceStep", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Spreadsheet_pkey", + "schema": "public", + "table": "Spreadsheet", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "SystemField_pkey", + "schema": "public", + "table": "SystemField", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Tag_pkey", + "schema": "public", + "table": "Tag", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "TagChannel_pkey", + "schema": "public", + "table": "TagChannel", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Template_pkey", + "schema": "public", + "table": "Template", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "TemplateInstallation_pkey", + "schema": "public", + "table": "TemplateInstallation", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "TemplateInstalledResource_pkey", + "schema": "public", + "table": "TemplateInstalledResource", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Trigger_pkey", + "schema": "public", + "table": "Trigger", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Condition_pkey", + "schema": "public", + "table": "Condition", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "TriggerExecution_pkey", + "schema": "public", + "table": "TriggerExecution", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "TriggerStat_pkey", + "schema": "public", + "table": "TriggerStat", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "UserPersistentMenu_pkey", + "schema": "public", + "table": "UserPersistentMenu", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Webhook_pkey", + "schema": "public", + "table": "Webhook", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WebhookExecution_pkey", + "schema": "public", + "table": "WebhookExecution", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WhatsappCoexistStaging_pkey", + "schema": "public", + "table": "WhatsappCoexistStaging", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WhatsappFlow_pkey", + "schema": "public", + "table": "WhatsappFlow", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WhatsappMessageTemplate_pkey", + "schema": "public", + "table": "WhatsappMessageTemplate", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WhatsappSignupSession_pkey", + "schema": "public", + "table": "WhatsappSignupSession", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "Workspace_pkey", + "schema": "public", + "table": "Workspace", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WorkspaceMac_pkey", + "schema": "public", + "table": "WorkspaceMac", + "entityType": "pks" + }, + { + "columns": ["id"], + "nameExplicit": false, + "name": "WorkspaceMember_pkey", + "schema": "public", + "table": "WorkspaceMember", + "entityType": "pks" + }, + { + "nameExplicit": true, + "columns": ["contactInboxId", "sourceId", "createdAt"], + "nullsNotDistinct": false, + "name": "Message_source_dedup_idx", + "entityType": "uniques", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": ["workspaceId", "parentId", "name"], + "nullsNotDistinct": true, + "name": "ProductCategory_workspaceId_parent_name_key", + "entityType": "uniques", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": ["workspaceId", "periodStart", "periodEnd"], + "nullsNotDistinct": false, + "name": "WorkspaceMac_workspaceId_periodStart_periodEnd_unique", + "entityType": "uniques", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "nameExplicit": false, + "columns": ["userId"], + "nullsNotDistinct": false, + "name": "UserQuota_userId_key", + "schema": "public", + "table": "UserQuota", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": ["workspaceId"], + "nullsNotDistinct": false, + "name": "WorkspaceUsage_workspaceId_key", + "schema": "public", + "table": "WorkspaceUsage", + "entityType": "uniques" + }, + { + "value": "(\"registrationStatus\" <> 'failed' OR \"registrationError\" IS NOT NULL)\n AND (\"registrationStatus\" <> 'registered' OR \"registrationError\" IS NULL)", + "name": "IntegrationWhatsapp_registrationStatus_error_consistent", + "entityType": "checks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "value": "\"channel\" IN ('messenger', 'instagram', 'whatsapp')", + "name": "MetaCapiEvent_channel_check", + "entityType": "checks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "value": "(\"customFieldId\" IS NULL) OR (\"systemFieldKey\" IS NULL)", + "name": "QuestionnaireQuestion_customFieldId_systemFieldKey_exclusive", + "entityType": "checks", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "value": "cardinality(\"candidatePhoneNumberIds\") > 0", + "name": "WhatsappSignupSession_candidates_not_empty", + "entityType": "checks", + "schema": "public", + "table": "WhatsappSignupSession" + } + ], + "renames": [] +} diff --git a/packages/database/src/partials/index.ts b/packages/database/src/partials/index.ts index 05da25fb6..bdee0d807 100644 --- a/packages/database/src/partials/index.ts +++ b/packages/database/src/partials/index.ts @@ -31,5 +31,6 @@ export * from "./questionnaire" export * from "./reflink" export * from "./shared" export * from "./system-field" +export * from "./template" export * from "./trigger" export * from "./workspace" diff --git a/packages/database/src/partials/template.ts b/packages/database/src/partials/template.ts new file mode 100644 index 000000000..191224407 --- /dev/null +++ b/packages/database/src/partials/template.ts @@ -0,0 +1,72 @@ +import { z } from "zod" + +/** + * Every resource category a Template can bundle. Kept as a single source of + * truth so the business-layer adapter registry can `satisfies + * Record` and fail to compile if a + * category is ever added here without a matching adapter. + */ +export const templateCategories = z.enum([ + "flows", + "customFields", + "tags", + "products", + "productCategories", + "aiFunctions", + "aiAgents", + "calendars", + "webchats", + "keywords", + "entryPointLinks", + "triggers", + "fbCommentAutomations", + "settings", +]) +export type TemplateCategory = z.infer + +export const templateInstallationStatuses = z.enum([ + "pending", + "installing", + "completed", + "partial", + "failed", +]) +export type TemplateInstallationStatus = z.infer< + typeof templateInstallationStatuses +> + +export const templateResourceSelectionSchema = z.union([ + z.object({ mode: z.literal("all") }), + z.object({ mode: z.literal("ids"), ids: z.array(z.string()) }), +]) +export type TemplateResourceSelection = z.infer< + typeof templateResourceSelectionSchema +> + +export const templateSelectionSchema = z.partialRecord( + templateCategories, + templateResourceSelectionSchema, +) +export type TemplateSelection = z.infer + +export const templateCategoryCountsSchema = z.record( + templateCategories, + z.number().int().nonnegative(), +) +export type TemplateCategoryCounts = z.infer< + typeof templateCategoryCountsSchema +> + +export const templatePermissionsSchema = z.object({ + allowEdit: z.boolean().default(true), + allowDelete: z.boolean().default(true), +}) +export type TemplatePermissions = z.infer + +export const templateWarningSchema = z.object({ + category: templateCategories, + entityKind: z.string(), + path: z.string(), + value: z.string(), +}) +export type TemplateWarning = z.infer diff --git a/packages/database/src/relations/index.ts b/packages/database/src/relations/index.ts index 901104ff1..cf2e7c448 100644 --- a/packages/database/src/relations/index.ts +++ b/packages/database/src/relations/index.ts @@ -111,6 +111,9 @@ import { sequenceStepRelations } from "./sequence-step" import { spreadsheetRelations } from "./spreadsheet" import { tagRelations } from "./tag" import { tagChannelRelations } from "./tag-channel" +import { templateRelations } from "./template" +import { templateInstallationRelations } from "./template-installation" +import { templateInstalledResourceRelations } from "./template-installed-resource" import { triggerRelations } from "./trigger" import { conditionRelations } from "./trigger-condition" import { triggerContactHistoryRelations } from "./trigger-contact-history" @@ -134,6 +137,9 @@ export const relations = { ...integrationOpenaiRelations, ...contactRelations, ...tagRelations, + ...templateRelations, + ...templateInstallationRelations, + ...templateInstalledResourceRelations, ...accountRelations, ...userRelations, ...workspaceRelations, diff --git a/packages/database/src/relations/template-installation.ts b/packages/database/src/relations/template-installation.ts new file mode 100644 index 000000000..6c97a04b4 --- /dev/null +++ b/packages/database/src/relations/template-installation.ts @@ -0,0 +1,31 @@ +import { defineRelationsPart } from "drizzle-orm" +// biome-ignore lint/performance/noNamespaceImport: drizzle schema +import * as schema from "../schema" + +export const templateInstallationRelations = defineRelationsPart( + schema, + (r) => ({ + templateInstallationModel: { + workspace: r.one.workspaceModel({ + from: r.templateInstallationModel.workspaceId, + to: r.workspaceModel.id, + }), + template: r.one.templateModel({ + from: r.templateInstallationModel.templateId, + to: r.templateModel.id, + }), + installFolder: r.one.folderModel({ + from: r.templateInstallationModel.installFolderId, + to: r.folderModel.id, + }), + installedByUser: r.one.userModel({ + from: r.templateInstallationModel.installedBy, + to: r.userModel.id, + }), + installedResources: r.many.templateInstalledResourceModel({ + from: r.templateInstallationModel.id, + to: r.templateInstalledResourceModel.installationId, + }), + }, + }), +) diff --git a/packages/database/src/relations/template-installed-resource.ts b/packages/database/src/relations/template-installed-resource.ts new file mode 100644 index 000000000..3e3598e54 --- /dev/null +++ b/packages/database/src/relations/template-installed-resource.ts @@ -0,0 +1,19 @@ +import { defineRelationsPart } from "drizzle-orm" +// biome-ignore lint/performance/noNamespaceImport: drizzle schema +import * as schema from "../schema" + +export const templateInstalledResourceRelations = defineRelationsPart( + schema, + (r) => ({ + templateInstalledResourceModel: { + installation: r.one.templateInstallationModel({ + from: r.templateInstalledResourceModel.installationId, + to: r.templateInstallationModel.id, + }), + workspace: r.one.workspaceModel({ + from: r.templateInstalledResourceModel.workspaceId, + to: r.workspaceModel.id, + }), + }, + }), +) diff --git a/packages/database/src/relations/template.ts b/packages/database/src/relations/template.ts new file mode 100644 index 000000000..4507765e3 --- /dev/null +++ b/packages/database/src/relations/template.ts @@ -0,0 +1,24 @@ +import { defineRelationsPart } from "drizzle-orm" +// biome-ignore lint/performance/noNamespaceImport: drizzle schema +import * as schema from "../schema" + +export const templateRelations = defineRelationsPart(schema, (r) => ({ + templateModel: { + workspace: r.one.workspaceModel({ + from: r.templateModel.workspaceId, + to: r.workspaceModel.id, + }), + tenant: r.one.tenantModel({ + from: r.templateModel.tenantId, + to: r.tenantModel.id, + }), + createdByUser: r.one.userModel({ + from: r.templateModel.createdBy, + to: r.userModel.id, + }), + installations: r.many.templateInstallationModel({ + from: r.templateModel.id, + to: r.templateInstallationModel.templateId, + }), + }, +})) diff --git a/packages/database/src/schema/index.ts b/packages/database/src/schema/index.ts index 49d427e9e..eaf24b0d2 100644 --- a/packages/database/src/schema/index.ts +++ b/packages/database/src/schema/index.ts @@ -127,6 +127,9 @@ export * from "./spreadsheet" export * from "./system-field" export * from "./tag" export * from "./tag-channel" +export * from "./template" +export * from "./template-installation" +export * from "./template-installed-resource" export * from "./trigger" export * from "./trigger-condition" export * from "./trigger-contact-history" diff --git a/packages/database/src/schema/template-installation.ts b/packages/database/src/schema/template-installation.ts new file mode 100644 index 000000000..40493eb60 --- /dev/null +++ b/packages/database/src/schema/template-installation.ts @@ -0,0 +1,104 @@ +import { + boolean, + index, + integer, + jsonb, + pgEnum, + pgTable, + text, + timestamp, +} from "drizzle-orm/pg-core" +import { + bigintAsString, + sharedColumns, + timestampConfig, +} from "../partials/shared" +import { + type TemplateInstallationStatus, + type TemplatePermissions, + type TemplateWarning, + templateInstallationStatuses, +} from "../partials/template" +import { userModel } from "./auth-user" +import { folderModel } from "./folder" +import { templateModel } from "./template" +import { workspaceModel } from "./workspace" + +export const templateInstallationStatus = pgEnum( + "templateInstallationStatus", + templateInstallationStatuses.options as [ + TemplateInstallationStatus, + ...TemplateInstallationStatus[], + ], +) + +/** + * The install job header AND progress row — the only status surface for a + * share-link install. `templateId` is `set null` (not cascade): provenance + * must outlive the author deleting the template, or `allowDelete` + * enforcement silently loses its rule. `sourceWorkspaceId` is a plain bigint + * with no FK — it spans tenants and is never dereferenced during install. + */ +export const templateInstallationModel = pgTable( + "TemplateInstallation", + { + ...sharedColumns, + workspaceId: bigintAsString() + .notNull() + .references(() => workspaceModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + templateId: bigintAsString().references(() => templateModel.id, { + onDelete: "set null", + onUpdate: "cascade", + }), + // Denormalized so the row still reads clearly after the template (or its + // name) changes or is deleted. + templateName: text().notNull(), + sourceWorkspaceId: bigintAsString().notNull(), + formatVersion: integer().notNull(), + status: templateInstallationStatus().notNull().default("pending"), + permissions: jsonb().$type().notNull(), + warnings: jsonb().$type().default([]).notNull(), + warningCount: integer().default(0).notNull(), + errorMessage: text(), + resourceCount: integer().default(0).notNull(), + // The root folder this install's resources were nested under, when the + // source template has `createInstallFolder` enabled. `set null` (not + // cascade) so a workspace admin deleting the folder later doesn't cascade + // into deleting this tracking row. + installFolderId: bigintAsString().references(() => folderModel.id, { + onDelete: "set null", + onUpdate: "cascade", + }), + // Copied from `Template.defaultAutoUpdate` at install time; the + // installer can flip it afterward independent of the publisher's + // template-wide default. + autoUpdate: boolean().default(false).notNull(), + // `Template.updatedAt` at the moment this installation was created — + // compared against the live `Template.updatedAt` to derive + // "update available" without a separate version counter. + sourceUpdatedAt: timestamp(timestampConfig), + installedBy: bigintAsString().references(() => userModel.id, { + onDelete: "set null", + onUpdate: "cascade", + }), + completedAt: timestamp(timestampConfig), + }, + (table) => [ + index("TemplateInstallation_workspaceId_idx").using( + "btree", + table.workspaceId.asc().nullsLast(), + ), + index("TemplateInstallation_templateId_idx").using( + "btree", + table.templateId.asc().nullsLast(), + ), + index("TemplateInstallation_workspaceId_status_idx").using( + "btree", + table.workspaceId.asc().nullsLast(), + table.status.asc().nullsLast(), + ), + ], +) diff --git a/packages/database/src/schema/template-installed-resource.ts b/packages/database/src/schema/template-installed-resource.ts new file mode 100644 index 000000000..15297044b --- /dev/null +++ b/packages/database/src/schema/template-installed-resource.ts @@ -0,0 +1,56 @@ +import { boolean, index, pgEnum, pgTable, text } from "drizzle-orm/pg-core" +import { bigintAsString, sharedColumns } from "../partials/shared" +import { type TemplateCategory, templateCategories } from "../partials/template" +import { templateInstallationModel } from "./template-installation" +import { workspaceModel } from "./workspace" + +export const templateResourceCategory = pgEnum( + "templateResourceCategory", + templateCategories.options as [TemplateCategory, ...TemplateCategory[]], +) + +/** + * Polymorphic per-resource provenance for one install. `resourceId` is a + * plain bigint with no FK — it spans 15+ target tables. `wasExisting` is + * load-bearing: a find-or-create manifest match (folder/customField/tag/ + * productCategory) points at a row the installer already owned before this + * install, and `allowDelete` enforcement must never lock that row against + * deletion just because a later install happened to reuse it. + */ +export const templateInstalledResourceModel = pgTable( + "TemplateInstalledResource", + { + ...sharedColumns, + installationId: bigintAsString() + .notNull() + .references(() => templateInstallationModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + workspaceId: bigintAsString() + .notNull() + .references(() => workspaceModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + category: templateResourceCategory().notNull(), + resourceKind: text().notNull(), + resourceId: bigintAsString().notNull(), + sourceResourceId: text().notNull(), + wasExisting: boolean().default(false).notNull(), + }, + (table) => [ + index("TemplateInstalledResource_installationId_idx").using( + "btree", + table.installationId.asc().nullsLast(), + ), + index( + "TemplateInstalledResource_workspaceId_resourceKind_resourceId_idx", + ).using( + "btree", + table.workspaceId.asc().nullsLast(), + table.resourceKind.asc().nullsLast(), + table.resourceId.asc().nullsLast(), + ), + ], +) diff --git a/packages/database/src/schema/template.ts b/packages/database/src/schema/template.ts new file mode 100644 index 000000000..19d89a74d --- /dev/null +++ b/packages/database/src/schema/template.ts @@ -0,0 +1,89 @@ +import { + boolean, + index, + integer, + jsonb, + pgTable, + text, + timestamp, + uniqueIndex, +} from "drizzle-orm/pg-core" +import { + bigintAsString, + sharedColumns, + timestampConfig, +} from "../partials/shared" +import type { + TemplateCategoryCounts, + TemplatePermissions, + TemplateSelection, +} from "../partials/template" +import { userModel } from "./auth-user" +import { tenantModel } from "./enterprise/tenant" +import { workspaceModel } from "./workspace" + +/** + * A snapshot envelope stored at save time — see + * `packages/flow-config/src/import-export/template-schema.ts` for the + * validated shape. Kept loose here (jsonb) so a `formatVersion` bump never + * requires a DB migration; `parseTemplateExport` is the real gate, run on + * every install. + */ +export type TemplatePayload = Record + +export const templateModel = pgTable( + "Template", + { + ...sharedColumns, + workspaceId: bigintAsString() + .notNull() + .references(() => workspaceModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + // The publisher's tenant, stamped at save time — never request-derived. + // Same-tenant install gate compares this against the *target* workspace's + // `Workspace.tenantId`, not the acting request's tenant context. + tenantId: bigintAsString() + .notNull() + .references(() => tenantModel.id, { + onDelete: "restrict", + onUpdate: "cascade", + }), + name: text().notNull(), + description: text(), + imageUrl: text(), + publisherName: text(), + youtubeVideoId: text(), + testLink: text(), + selection: jsonb().$type().notNull(), + payload: jsonb().$type().notNull(), + categoryCounts: jsonb().$type().notNull(), + formatVersion: integer().notNull(), + // High-entropy, never the row's own snowflake id — the id is enumerable + // and would let a share link be guessed. + shareToken: text().notNull(), + shareEnabled: boolean().default(false).notNull(), + shareExpiresAt: timestamp(timestampConfig), + defaultPermissions: jsonb().$type().notNull(), + createInstallFolder: boolean().default(false).notNull(), + defaultAutoUpdate: boolean().default(false).notNull(), + installCount: integer().default(0).notNull(), + createdBy: bigintAsString().references(() => userModel.id, { + onDelete: "set null", + onUpdate: "cascade", + }), + deletedAt: timestamp(timestampConfig), + }, + (table) => [ + index("Template_workspaceId_idx").using( + "btree", + table.workspaceId.asc().nullsLast(), + ), + index("Template_tenantId_idx").using( + "btree", + table.tenantId.asc().nullsLast(), + ), + uniqueIndex("Template_shareToken_key").on(table.shareToken), + ], +) diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts index 5bbc0e2ff..39e674744 100644 --- a/packages/database/src/types.ts +++ b/packages/database/src/types.ts @@ -27,6 +27,11 @@ export type AppointmentReminderDispatchModel = export type FlowModel = typeof schema.flowModel.$inferSelect export type FolderModel = typeof schema.folderModel.$inferSelect export type TagModel = typeof schema.tagModel.$inferSelect +export type TemplateModel = typeof schema.templateModel.$inferSelect +export type TemplateInstallationModel = + typeof schema.templateInstallationModel.$inferSelect +export type TemplateInstalledResourceModel = + typeof schema.templateInstalledResourceModel.$inferSelect export type EmailTopicModel = typeof schema.emailTopicModel.$inferSelect export type AnalyticsEmailTopicModel = typeof schema.analyticsEmailTopicModel.$inferSelect diff --git a/packages/flow-config/__tests__/remap.test.ts b/packages/flow-config/__tests__/remap.test.ts new file mode 100644 index 000000000..45fa35d6f --- /dev/null +++ b/packages/flow-config/__tests__/remap.test.ts @@ -0,0 +1,230 @@ +import { describe, expect, test } from "vitest" +import { + collectReferencesByKind, + remapFlowGraphReferences, + remapReferences, +} from "../src/import-export/remap" + +describe("remapReferences — multi-kind", () => { + test("remaps distinct kinds independently in one pass", () => { + const value = { + customFieldId: "cf-1", + aiAgentId: "agent-1", + calendarId: "cal-1", + } + + const remapped = remapReferences(value, { + customField: new Map([["cf-1", "cf-target"]]), + aiAgent: new Map([["agent-1", "agent-target"]]), + calendar: new Map([["cal-1", "cal-target"]]), + }) + + expect(remapped).toEqual({ + customFieldId: "cf-target", + aiAgentId: "agent-target", + calendarId: "cal-target", + }) + }) + + test("leaves an unmapped id untouched and reports it via onUnresolved", () => { + const unresolved: unknown[] = [] + const remapped = remapReferences( + { customFieldId: "cf-missing" }, + {}, + { onUnresolved: (ref) => unresolved.push(ref) }, + ) + + expect(remapped).toEqual({ customFieldId: "cf-missing" }) + expect(unresolved).toEqual([ + { entityKind: "customField", path: "customFieldId", value: "cf-missing" }, + ]) + }) + + test("kinds option scopes remapping so unlisted kinds pass through inert", () => { + const remapped = remapReferences( + { customFieldId: "cf-1", aiAgentId: "agent-1" }, + { + customField: new Map([["cf-1", "cf-target"]]), + aiAgent: new Map([["agent-1", "agent-target"]]), + }, + { kinds: ["customField"] }, + ) + + expect(remapped).toEqual({ + customFieldId: "cf-target", + aiAgentId: "agent-1", + }) + }) +}) + +describe("remapReferences — array-valued keys", () => { + test("remaps each element of tagIds independently", () => { + const remapped = remapReferences( + { tagIds: ["tag-1", "tag-2", "tag-missing"] }, + { + tag: new Map([ + ["tag-1", "target-1"], + ["tag-2", "target-2"], + ]), + }, + ) + + expect(remapped).toEqual({ + tagIds: ["target-1", "target-2", "tag-missing"], + }) + }) + + test("remaps addonProductIds via the product map", () => { + const remapped = remapReferences( + { addonProductIds: ["p-1"] }, + { product: new Map([["p-1", "p-target"]]) }, + ) + + expect(remapped).toEqual({ addonProductIds: ["p-target"] }) + }) +}) + +describe("remapReferences — discriminated union (sourceId)", () => { + test("resolves sourceId as a trigger id when sourceType is trigger", () => { + const remapped = remapReferences( + { sourceType: "trigger", sourceId: "trig-1" }, + { trigger: new Map([["trig-1", "trig-target"]]) }, + ) + + expect(remapped).toEqual({ sourceType: "trigger", sourceId: "trig-target" }) + }) + + test("resolves sourceId as a webhook id when sourceType is webhook", () => { + const remapped = remapReferences( + { sourceType: "webhook", sourceId: "wh-1" }, + { webhook: new Map([["wh-1", "wh-target"]]) }, + ) + + expect(remapped).toEqual({ sourceType: "webhook", sourceId: "wh-target" }) + }) + + test("leaves sourceId untouched for an unknown discriminator (no corruption)", () => { + const remapped = remapReferences( + { sourceType: "somethingElse", sourceId: "raw-1" }, + { trigger: new Map([["raw-1", "should-not-apply"]]) }, + ) + + expect(remapped).toEqual({ sourceType: "somethingElse", sourceId: "raw-1" }) + }) +}) + +describe("remapReferences — prefixed tokens (tools)", () => { + test("rewrites fn:/file:/mcp: prefixed ids inside the tools array", () => { + const remapped = remapReferences( + { tools: ["fn:1", "file:2", "mcp:3", "sys:noop"] }, + { + aiFunction: new Map([["1", "1-target"]]), + aiFile: new Map([["2", "2-target"]]), + aiMcpServer: new Map([["3", "3-target"]]), + }, + ) + + expect(remapped).toEqual({ + tools: ["fn:1-target", "file:2-target", "mcp:3-target", "sys:noop"], + }) + }) + + test("does not touch adversarial free text containing fn: outside the tools key", () => { + const remapped = remapReferences( + { notes: "see fn:1 for details" }, + { aiFunction: new Map([["1", "1-target"]]) }, + ) + + expect(remapped).toEqual({ notes: "see fn:1 for details" }) + }) + + test("leaves an unresolved prefixed id untouched", () => { + const remapped = remapReferences({ tools: ["fn:missing"] }, {}) + expect(remapped).toEqual({ tools: ["fn:missing"] }) + }) +}) + +describe("remapReferences — depth ceiling and immutability", () => { + const deeplyNested = (depth: number): unknown => { + let value: unknown = { customFieldId: "cf-1" } + for (let index = 0; index < depth; index++) { + value = { child: value } + } + return value + } + + const descend = (value: unknown, depth: number): unknown => { + let current = value + for (let index = 0; index < depth; index++) { + current = (current as { child: unknown }).child + } + return current + } + + test("does not overflow the stack on a deeply nested graph", () => { + expect(() => + remapReferences(deeplyNested(50_000), { + customField: new Map([["cf-1", "target"]]), + }), + ).not.toThrow() + }) + + test("preserves data past the depth ceiling without remapping it", () => { + const remapped = remapReferences(deeplyNested(50_000), { + customField: new Map([["cf-1", "target"]]), + }) + expect(descend(remapped, 50_000)).toEqual({ customFieldId: "cf-1" }) + }) + + test("does not mutate the input", () => { + const value = { customFieldId: "cf-1", nested: { calendarId: "cal-1" } } + const original = JSON.parse(JSON.stringify(value)) + + remapReferences(value, { + customField: new Map([["cf-1", "target"]]), + calendar: new Map([["cal-1", "target"]]), + }) + + expect(value).toEqual(original) + }) +}) + +describe("remapFlowGraphReferences", () => { + test("walks nodes and edges and preserves the graph shape", () => { + const graph = { + nodes: [{ id: "1", data: { customFieldId: "cf-1" } }], + edges: [{ id: "e1", source: "1", target: "2" }], + } + + const remapped = remapFlowGraphReferences(graph, { + customField: new Map([["cf-1", "target"]]), + }) + + expect(remapped.nodes[0].data.customFieldId).toBe("target") + expect(remapped.edges).toEqual(graph.edges) + }) +}) + +describe("collectReferencesByKind", () => { + test("groups discovered reference ids by entity kind", () => { + const byKind = collectReferencesByKind({ + customFieldId: "cf-1", + aiAgentId: "agent-1", + tagIds: ["tag-1", "tag-2"], + }) + + expect(byKind.get("customField")).toEqual(new Set(["cf-1"])) + expect(byKind.get("aiAgent")).toEqual(new Set(["agent-1"])) + expect(byKind.get("tag")).toEqual(new Set(["tag-1", "tag-2"])) + }) + + test("scopes collection to the given kinds", () => { + const byKind = collectReferencesByKind( + { customFieldId: "cf-1", aiAgentId: "agent-1" }, + ["customField"], + ) + + expect(byKind.has("customField")).toBe(true) + expect(byKind.has("aiAgent")).toBe(false) + }) +}) diff --git a/packages/flow-config/__tests__/template-export-schema.test.ts b/packages/flow-config/__tests__/template-export-schema.test.ts new file mode 100644 index 000000000..893d75fad --- /dev/null +++ b/packages/flow-config/__tests__/template-export-schema.test.ts @@ -0,0 +1,84 @@ +import { describe, expect, test } from "vitest" +import { + parseTemplateExport, + TEMPLATE_EXPORT_FORMAT_VERSION, +} from "../src/import-export/template-schema" + +const buildEnvelope = () => ({ + formatVersion: TEMPLATE_EXPORT_FORMAT_VERSION, + exportedAt: new Date().toISOString(), + source: { workspaceId: "1", tenantId: "1" }, + manifests: { + customFields: {}, + tags: {}, + productCategories: {}, + folders: {}, + }, + resources: { + flows: [], + products: [], + aiFunctions: [], + aiAgents: [], + calendars: [], + webchats: [], + keywords: [], + entryPointLinks: [], + triggers: [], + fbCommentAutomations: [], + settings: { savedReplies: [], botFields: [] }, + }, +}) + +describe("parseTemplateExport", () => { + test("accepts a well-formed empty envelope", () => { + const result = parseTemplateExport(buildEnvelope()) + expect(result.ok).toBe(true) + }) + + test("never throws on malformed input", () => { + expect(() => parseTemplateExport({ not: "a template" })).not.toThrow() + const result = parseTemplateExport({ not: "a template" }) + expect(result.ok).toBe(false) + }) + + test("rejects an unknown formatVersion before full validation", () => { + const result = parseTemplateExport({ + ...buildEnvelope(), + formatVersion: 999, + }) + expect(result.ok).toBe(false) + if (!result.ok) { + expect(result.reason).toContain( + "Unsupported template export format version", + ) + } + }) + + test("keys manifest entries by folderType, not name alone", () => { + const envelope = buildEnvelope() + envelope.manifests.folders = { + "src-1": { + name: "VIP", + folderType: "automatedResponse", + parentSourceId: null, + }, + "src-2": { + name: "VIP", + folderType: "outboundAutomatedResponse", + parentSourceId: null, + }, + } + const result = parseTemplateExport(envelope) + expect(result.ok).toBe(true) + if (result.ok) { + expect(Object.keys(result.data.manifests.folders)).toHaveLength(2) + } + }) + + test("requires each resource entry to carry a sourceId join key", () => { + const envelope = buildEnvelope() + envelope.resources.products = [{ name: "no source id" } as never] + const result = parseTemplateExport(envelope) + expect(result.ok).toBe(false) + }) +}) diff --git a/packages/flow-config/src/import-export/index.ts b/packages/flow-config/src/import-export/index.ts index fef7eefd7..4ea59c886 100644 --- a/packages/flow-config/src/import-export/index.ts +++ b/packages/flow-config/src/import-export/index.ts @@ -4,6 +4,14 @@ export { type FlowReferenceWarning, remapCustomFieldReferences, } from "./references" +export { + collectReferencesByKind, + type ReferenceIdMaps, + type RemapOptions, + remapFlowGraphReferences, + remapReferences, + type UnresolvedReference, +} from "./remap" export { FLOW_EXPORT_FORMAT_VERSION, type FlowExport, @@ -15,3 +23,24 @@ export { flowExportSchema, parseFlowExport, } from "./schema" +export { + parseTemplateExport, + TEMPLATE_EXPORT_FORMAT_VERSION, + type TemplateCustomFieldManifestEntry, + type TemplateExport, + type TemplateExportParseResult, + type TemplateFlowEntry, + type TemplateFolderManifestEntry, + type TemplateManifests, + type TemplateProductCategoryManifestEntry, + type TemplateResources, + type TemplateTagManifestEntry, + templateCustomFieldManifestEntrySchema, + templateExportSchema, + templateFlowEntrySchema, + templateFolderManifestEntrySchema, + templateManifestsSchema, + templateProductCategoryManifestEntrySchema, + templateResourcesSchema, + templateTagManifestEntrySchema, +} from "./template-schema" diff --git a/packages/flow-config/src/import-export/reference-fields.ts b/packages/flow-config/src/import-export/reference-fields.ts new file mode 100644 index 000000000..efa28f9cf --- /dev/null +++ b/packages/flow-config/src/import-export/reference-fields.ts @@ -0,0 +1,126 @@ +/** + * Single source of truth for every workspace-scoped entity reference the + * flow/template exporters know how to find, warn about, or remap. Extracted + * from `references.ts` so both the flow-import path (which only ever remaps + * `customField`) and the template-install path (which remaps every kind) + * share one map instead of drifting. + */ + +/** + * Field names that hold a workspace-scoped entity id, matched by exact key + * name while walking the exported graph — not a per-stepType table — so a + * new step referencing an existing entity kind (e.g. another `sequenceId`) + * is covered automatically. Missing an entry here only costs a warning, + * never correctness for warnings — but the importer *does* write based on + * `"customField"` entries, so a new custom-field-holding key must be added + * here to be remapped, not just warned about. + */ +export const REFERENCE_FIELD_ENTITY_KIND: Record = { + inputFieldId: "customField", + outputFieldId: "customField", + outputCustomFieldId: "customField", + customFieldId: "customField", + dateTimeFieldId: "customField", + startDateFieldId: "customField", + endDateFieldId: "customField", + contactFieldId: "customField", + sequenceId: "sequence", + aiAgentId: "aiAgent", + integrationId: "integration", + integrationSmtpId: "integration", + integrationMessengerId: "integration", + calendarId: "calendar", + questionnaireId: "questionnaire", + topicId: "couponTopic", + inboxId: "inbox", + personaId: "messengerPersona", + spreadsheetId: "spreadsheet", +} + +// `flowId` shows up both as a cross-flow jump target (steps/start-external-flow.ts, +// steps/start-external-node.ts) and inside the unrelated WA template flow-token +// encoding — both are still workspace-scoped flow references, so both warn. +export const FLOW_REFERENCE_FIELD = "flowId" +// Cross-flow node jump target (steps/start-external-node.ts). Sibling field +// `nodeId` on steps/start-another-node.ts points at the *same* flow being +// imported, so it is never stale and must not be warned about — it is only +// treated as a reference when found alongside a sibling `flowId` key. +export const CROSS_FLOW_NODE_FIELD = "nodeId" + +/** + * Array-valued keys whose *elements* are ids of a given kind — as opposed to + * `REFERENCE_FIELD_ENTITY_KIND`, where the key's own scalar value is the id. + * `toWarningValue` only accepts a scalar string, so these need a dedicated + * element-wise pass. + */ +export const REFERENCE_ARRAY_FIELD_ENTITY_KIND: Record = { + tagIds: "tag", + addonProductIds: "product", +} + +/** + * Discriminated-union reference fields: the key itself carries no kind + * information, so the entity kind is looked up from a sibling field's value + * on the same object. Example: `Condition.sourceId` is a trigger id when + * `sourceType === "trigger"` and a webhook id when `sourceType === "webhook"`. + * An unknown discriminator value is left untouched (safely — no remap, no + * warning), never treated as an error. + */ +export type DiscriminatedReferenceField = { + /** Sibling key whose value selects the entity kind. */ + readonly discriminatorKey: string + /** Discriminator value -> entity kind. */ + readonly kindByDiscriminator: Readonly> +} + +export const DISCRIMINATED_REFERENCE_FIELDS: Readonly< + Record +> = { + sourceId: { + discriminatorKey: "sourceType", + kindByDiscriminator: { + trigger: "trigger", + webhook: "webhook", + }, + }, +} + +/** + * Prefixed-string reference fields: the id is embedded after a literal + * prefix inside a free-form string (or array of strings), e.g. + * `AIAgent.tools` holding `"fn:12345"` / `"file:67890"` / `"mcp:11111"`. + * Gated to an explicit key allowlist below — rewriting *any* string matching + * `prefix:id` would corrupt free text that happens to contain `"fn:..."`. + */ +export const PREFIXED_REFERENCE_ENTITY_KIND: Readonly> = + { + fn: "aiFunction", + file: "aiFile", + mcp: "aiMcpServer", + } + +/** Keys whose string/array-of-string values may hold `prefix:id` tokens. */ +export const PREFIXED_REFERENCE_FIELDS: ReadonlySet = new Set(["tools"]) + +/** + * Depth ceiling for every walker in this module and in `remap.ts`. + * + * These recurse over attacker-supplied JSON. A few step schemas keep an + * unconstrained escape hatch — `steps: z.array(z.any())` on a null-typed + * button (`steps/button.ts`), the same on `steps/email.ts`, and + * `flow_action_data: z.record(z.string(), z.unknown())` on + * `steps/send-wa-message-template.ts` — so validated input can still carry + * arbitrary nesting. Node's stack blows around ~10k frames, well inside the + * 5MB upload cap (a ~100KB file reaches 50k levels), which would surface as + * an opaque RangeError instead of a readable failure. + * + * Anything deeper than this is not a real flow, so the read-only walkers + * stop descending (costing only a missed warning) and the write-path walker + * returns the remaining subtree unchanged (never dropping data). + */ +export const MAX_WALK_DEPTH = 512 + +export const isPlainObject = ( + value: unknown, +): value is Record => + typeof value === "object" && value !== null && !Array.isArray(value) diff --git a/packages/flow-config/src/import-export/references.ts b/packages/flow-config/src/import-export/references.ts index 11f385db7..a351284ec 100644 --- a/packages/flow-config/src/import-export/references.ts +++ b/packages/flow-config/src/import-export/references.ts @@ -1,4 +1,10 @@ import { isNumericId } from "@chatbotx.io/utils/id" +import { + isPlainObject, + MAX_WALK_DEPTH, + REFERENCE_FIELD_ENTITY_KIND, +} from "./reference-fields" +import { remapFlowGraphReferences } from "./remap" import type { FlowExportedFlow } from "./schema" export type FlowReferenceWarning = { @@ -7,142 +13,27 @@ export type FlowReferenceWarning = { value: string } -/** - * Field names that hold a workspace-scoped entity id. Matched by exact key - * name while walking the exported graph — not a per-stepType table — so a new - * step referencing an existing entity kind (e.g. another `sequenceId`) is - * covered automatically. Missing an entry here only costs a warning, never - * correctness for warnings — but the importer *does* now write based on the - * `"customField"` entries (see `collectCustomFieldReferences` / - * `remapCustomFieldReferences` below), so a new custom-field-holding key must - * be added here to be remapped, not just warned about. - */ -const REFERENCE_FIELD_ENTITY_KIND: Record = { - inputFieldId: "customField", - outputFieldId: "customField", - outputCustomFieldId: "customField", - customFieldId: "customField", - dateTimeFieldId: "customField", - startDateFieldId: "customField", - endDateFieldId: "customField", - contactFieldId: "customField", - sequenceId: "sequence", - aiAgentId: "aiAgent", - integrationId: "integration", - integrationSmtpId: "integration", - integrationMessengerId: "integration", - calendarId: "calendar", - questionnaireId: "questionnaire", - topicId: "couponTopic", - inboxId: "inbox", - personaId: "messengerPersona", - spreadsheetId: "spreadsheet", -} - -// `flowId` shows up both as a cross-flow jump target (steps/start-external-flow.ts, -// steps/start-external-node.ts) and inside the unrelated WA template flow-token -// encoding — both are still workspace-scoped flow references, so both warn. -const FLOW_REFERENCE_FIELD = "flowId" -// Cross-flow node jump target (steps/start-external-node.ts). Sibling field -// `nodeId` on steps/start-another-node.ts points at the *same* flow being -// imported, so it is never stale and must not be warned about — it is only -// treated as a reference when found alongside a sibling `flowId` key. -const CROSS_FLOW_NODE_FIELD = "nodeId" - -const isPlainObject = (value: unknown): value is Record => - typeof value === "object" && value !== null && !Array.isArray(value) - -/** - * Depth ceiling for the walkers below. - * - * These recurse over attacker-supplied JSON. A few step schemas keep an - * unconstrained escape hatch — `steps: z.array(z.any())` on a null-typed - * button (`steps/button.ts`), the same on `steps/email.ts`, and - * `flow_action_data: z.record(z.string(), z.unknown())` on - * `steps/send-wa-message-template.ts` — so validated input can still carry - * arbitrary nesting. Node's stack blows around ~10k frames, well inside the - * 5MB upload cap (a ~100KB file reaches 50k levels), which would surface as - * an opaque RangeError instead of a readable failure. - * - * Anything deeper than this is not a real flow, so the walkers stop - * descending. Truncating only costs a missed reference *warning*; it never - * changes what gets written. - */ -const MAX_WALK_DEPTH = 512 - -const toWarningValue = (value: unknown): string | null => { - if (typeof value === "string" && value.trim().length > 0) { - return value - } - return null -} - -const walk = ( - value: unknown, - path: string, - warnings: FlowReferenceWarning[], - depth = 0, -): void => { - if (depth > MAX_WALK_DEPTH) { - return - } - if (Array.isArray(value)) { - for (const [index, item] of value.entries()) { - walk(item, `${path}[${index}]`, warnings, depth + 1) - } - return - } - if (!isPlainObject(value)) { - return - } - - const hasCrossFlowJump = typeof value[FLOW_REFERENCE_FIELD] === "string" - - for (const [key, child] of Object.entries(value)) { - const childPath = path ? `${path}.${key}` : key - const entityKind = REFERENCE_FIELD_ENTITY_KIND[key] - if (entityKind) { - const stringValue = toWarningValue(child) - if (stringValue) { - warnings.push({ entityKind, path: childPath, value: stringValue }) - } - } else if (key === FLOW_REFERENCE_FIELD) { - const stringValue = toWarningValue(child) - if (stringValue) { - warnings.push({ - entityKind: "flow", - path: childPath, - value: stringValue, - }) - } - } else if (key === CROSS_FLOW_NODE_FIELD && hasCrossFlowJump) { - const stringValue = toWarningValue(child) - if (stringValue) { - warnings.push({ - entityKind: "flowNode", - path: childPath, - value: stringValue, - }) - } - } - - walk(child, childPath, warnings, depth + 1) - } -} - /** * Read-only: finds fields that point at workspace-scoped entities so the * caller can report which pickers to repoint after import. Never mutates the * graph and never gates the import — an unresolvable reference is reported, - * not rejected. See packages/flow-config/src/import-export/schema.ts for the - * envelope this walks. + * not rejected. + * + * Reimplemented on top of the generic walker in `remap.ts` (empty idMaps -> + * every in-scope reference misses -> every reference is reported via + * `onUnresolved`) so there is exactly one graph-walking implementation. */ export const collectFlowReferenceWarnings = ( flow: FlowExportedFlow, ): FlowReferenceWarning[] => { const warnings: FlowReferenceWarning[] = [] - walk(flow.nodes, "nodes", warnings) - walk(flow.edges, "edges", warnings) + remapFlowGraphReferences( + flow, + {}, + { + onUnresolved: (ref) => warnings.push(ref), + }, + ) return warnings } @@ -187,6 +78,10 @@ const collectCustomFieldIds = ( * (`/^\d+$/`) — unlike `zodBigintAsString`'s unanchored pattern, so this * filter is a sound discriminator on its own. * + * Kept as a dedicated walker (not built on the generic `remapReferences`) + * because of the `isNumericId` filter, which only applies on the collect + * side — on the write side `idMap.has()` is a sufficient discriminator. + * * Accepts `nodes`/`edges` as `unknown[]` (not the strict `FlowExportedFlow` * shape) so callers can pass a flow-version row straight from the DB — those * columns are typed loosely (`{ id: string; [x: string]: unknown }[]`) at the @@ -202,59 +97,27 @@ export const collectCustomFieldReferences = (flow: { return [...ids] } -const remapCustomFieldIds = ( - value: unknown, - idMap: ReadonlyMap, - depth = 0, -): unknown => { - // Unlike the read-only walkers, this one is the write path: past the depth - // ceiling the subtree is returned *as-is* rather than skipped, so hitting - // the limit can only leave references un-remapped (which then surfaces as a - // warning) and can never drop imported data. - if (depth > MAX_WALK_DEPTH) { - return value - } - if (Array.isArray(value)) { - return value.map((item) => remapCustomFieldIds(item, idMap, depth + 1)) - } - if (!isPlainObject(value)) { - return value - } - - const next: Record = {} - for (const [key, child] of Object.entries(value)) { - if ( - isCustomFieldReferenceKey(key) && - typeof child === "string" && - idMap.has(child) - ) { - // biome-ignore lint/style/noNonNullAssertion: idMap.has(child) just checked above - next[key] = idMap.get(child)! - } else { - next[key] = remapCustomFieldIds(child, idMap, depth + 1) - } - } - return next -} - /** * Structural clone of `flow` with every custom-field reference slot rewritten * from a source-workspace id to a target-workspace id via `idMap`. An id * absent from the map passes through unchanged (so it still surfaces as an * unresolved-reference warning downstream). Never mutates the input. * - * Rebuilds every plain object key-by-key rather than special-casing known - * step shapes, so sibling keys on the same row — e.g. a `condition` case's - * `customFieldType` / `valueType` alongside `customFieldId` — are preserved - * automatically instead of needing to be threaded through by hand. + * One-line adapter over the generic `remapFlowGraphReferences`, restricted to + * `kinds: ["customField"]` so every other reference rule (array-valued keys, + * discriminated unions, prefixed tokens) is inert here — behavior is + * provably identical to the pre-generalization implementation. */ export const remapCustomFieldReferences = < T extends Pick, >( flow: T, idMap: ReadonlyMap, -): T => ({ - ...flow, - nodes: remapCustomFieldIds(flow.nodes, idMap) as T["nodes"], - edges: remapCustomFieldIds(flow.edges, idMap) as T["edges"], -}) +): T => + remapFlowGraphReferences( + flow, + { customField: idMap }, + { + kinds: ["customField"], + }, + ) diff --git a/packages/flow-config/src/import-export/remap.ts b/packages/flow-config/src/import-export/remap.ts new file mode 100644 index 000000000..3933d000f --- /dev/null +++ b/packages/flow-config/src/import-export/remap.ts @@ -0,0 +1,328 @@ +import { + CROSS_FLOW_NODE_FIELD, + DISCRIMINATED_REFERENCE_FIELDS, + FLOW_REFERENCE_FIELD, + isPlainObject, + MAX_WALK_DEPTH, + PREFIXED_REFERENCE_ENTITY_KIND, + PREFIXED_REFERENCE_FIELDS, + REFERENCE_ARRAY_FIELD_ENTITY_KIND, + REFERENCE_FIELD_ENTITY_KIND, +} from "./reference-fields" + +export type UnresolvedReference = { + entityKind: string + path: string + value: string +} + +export type ReferenceIdMaps = Readonly< + Record> +> + +export type RemapOptions = { + /** + * Restrict remapping (and warning collection) to these entity kinds. When + * omitted, every kind known to `reference-fields.ts` participates. Passing + * `["customField"]` makes every other rule inert — this is how + * `remapCustomFieldReferences` stays behaviorally identical to its + * pre-generalization form. + */ + readonly kinds?: readonly string[] + /** + * Called once per reference slot whose value has no entry in the + * corresponding `idMaps[entityKind]` map — i.e. a genuine miss, not merely + * "this kind is out of scope". Lets rewrite and warning collection happen + * in one walk, keyed on actual map misses. + */ + readonly onUnresolved?: (ref: UnresolvedReference) => void +} + +const kindEnabled = (kind: string, kinds?: readonly string[]): boolean => + !kinds || kinds.includes(kind) + +const splitPrefixedToken = ( + token: string, +): { prefix: string; id: string } | null => { + const separatorIndex = token.indexOf(":") + if (separatorIndex <= 0) { + return null + } + return { + prefix: token.slice(0, separatorIndex), + id: token.slice(separatorIndex + 1), + } +} + +const remapPrefixedToken = ( + token: string, + path: string, + idMaps: ReferenceIdMaps, + options: RemapOptions | undefined, +): string => { + const parsed = splitPrefixedToken(token) + if (!parsed) { + return token + } + const entityKind = PREFIXED_REFERENCE_ENTITY_KIND[parsed.prefix] + if (!(entityKind && kindEnabled(entityKind, options?.kinds))) { + return token + } + const idMap = idMaps[entityKind] + const mapped = idMap?.get(parsed.id) + if (mapped) { + return `${parsed.prefix}:${mapped}` + } + options?.onUnresolved?.({ entityKind, path, value: parsed.id }) + return token +} + +const remapPrefixedValue = ( + value: unknown, + path: string, + idMaps: ReferenceIdMaps, + options: RemapOptions | undefined, +): unknown => { + if (typeof value === "string") { + return remapPrefixedToken(value, path, idMaps, options) + } + if (Array.isArray(value)) { + return value.map((item, index) => + typeof item === "string" + ? remapPrefixedToken(item, `${path}[${index}]`, idMaps, options) + : item, + ) + } + return value +} + +const resolveScalarRef = ( + value: unknown, + entityKind: string, + path: string, + idMaps: ReferenceIdMaps, + options: RemapOptions | undefined, +): { resolved: true; value: string } | { resolved: false } => { + if (typeof value !== "string" || value.trim().length === 0) { + return { resolved: false } + } + const idMap = idMaps[entityKind] + const mapped = idMap?.get(value) + if (mapped) { + return { resolved: true, value: mapped } + } + options?.onUnresolved?.({ entityKind, path, value }) + return { resolved: false } +} + +const remapArrayRef = ( + value: unknown, + entityKind: string, + path: string, + idMaps: ReferenceIdMaps, + options: RemapOptions | undefined, +): unknown => { + if (!Array.isArray(value)) { + return value + } + return value.map((item, index) => { + const itemPath = `${path}[${index}]` + const result = resolveScalarRef(item, entityKind, itemPath, idMaps, options) + return result.resolved ? result.value : item + }) +} + +const resolveDiscriminatedKind = ( + key: string, + container: Record, +): string | null => { + const config = DISCRIMINATED_REFERENCE_FIELDS[key] + if (!config) { + return null + } + const discriminatorValue = container[config.discriminatorKey] + if (typeof discriminatorValue !== "string") { + return null + } + return config.kindByDiscriminator[discriminatorValue] ?? null +} + +/** + * Structural clone of `value` with every known reference slot rewritten from + * a source id to a target id via `idMaps`, restricted to `options.kinds` when + * given. An id absent from the relevant map passes through unchanged and is + * reported via `options.onUnresolved`. Never mutates the input. + * + * Past `MAX_WALK_DEPTH` the remaining subtree is returned as-is — truncation + * can only leave references un-remapped, never drop data. + */ +export const remapReferences = ( + value: T, + idMaps: ReferenceIdMaps, + options?: RemapOptions, +): T => remapValue(value, "", idMaps, options, 0) as T + +const remapValue = ( + value: unknown, + path: string, + idMaps: ReferenceIdMaps, + options: RemapOptions | undefined, + depth: number, +): unknown => { + if (depth > MAX_WALK_DEPTH) { + return value + } + if (Array.isArray(value)) { + return value.map((item, index) => + remapValue(item, `${path}[${index}]`, idMaps, options, depth + 1), + ) + } + if (!isPlainObject(value)) { + return value + } + + const hasCrossFlowJump = + kindEnabled("flow", options?.kinds) && + typeof value[FLOW_REFERENCE_FIELD] === "string" + + const next: Record = {} + for (const [key, child] of Object.entries(value)) { + const childPath = path ? `${path}.${key}` : key + next[key] = remapEntry({ + key, + child, + childPath, + container: value, + idMaps, + options, + hasCrossFlowJump, + depth, + }) + } + return next +} + +type RemapEntryArgs = { + key: string + child: unknown + childPath: string + container: Record + idMaps: ReferenceIdMaps + options: RemapOptions | undefined + hasCrossFlowJump: boolean + depth: number +} + +const remapEntry = (args: RemapEntryArgs): unknown => { + const { key, child, childPath, container, idMaps, options, depth } = args + + const scalarKind = REFERENCE_FIELD_ENTITY_KIND[key] + if (scalarKind && kindEnabled(scalarKind, options?.kinds)) { + const result = resolveScalarRef( + child, + scalarKind, + childPath, + idMaps, + options, + ) + if (result.resolved) { + return result.value + } + return remapValue(child, childPath, idMaps, options, depth + 1) + } + + const arrayKind = REFERENCE_ARRAY_FIELD_ENTITY_KIND[key] + if ( + arrayKind && + kindEnabled(arrayKind, options?.kinds) && + Array.isArray(child) + ) { + return remapArrayRef(child, arrayKind, childPath, idMaps, options) + } + + const discriminatedKind = resolveDiscriminatedKind(key, container) + if (discriminatedKind && kindEnabled(discriminatedKind, options?.kinds)) { + const result = resolveScalarRef( + child, + discriminatedKind, + childPath, + idMaps, + options, + ) + if (result.resolved) { + return result.value + } + return remapValue(child, childPath, idMaps, options, depth + 1) + } + + if (PREFIXED_REFERENCE_FIELDS.has(key)) { + return remapPrefixedValue(child, childPath, idMaps, options) + } + + if (key === FLOW_REFERENCE_FIELD && kindEnabled("flow", options?.kinds)) { + const result = resolveScalarRef(child, "flow", childPath, idMaps, options) + if (result.resolved) { + return result.value + } + return remapValue(child, childPath, idMaps, options, depth + 1) + } + + if ( + key === CROSS_FLOW_NODE_FIELD && + args.hasCrossFlowJump && + kindEnabled("flowNode", options?.kinds) + ) { + const result = resolveScalarRef( + child, + "flowNode", + childPath, + idMaps, + options, + ) + if (result.resolved) { + return result.value + } + return remapValue(child, childPath, idMaps, options, depth + 1) + } + + return remapValue(child, childPath, idMaps, options, depth + 1) +} + +/** + * `remapReferences` specialized for a `{nodes, edges}` flow graph — walks + * both arrays and returns a same-shaped clone. + */ +export const remapFlowGraphReferences = < + T extends { nodes: unknown; edges: unknown }, +>( + value: T, + idMaps: ReferenceIdMaps, + options?: RemapOptions, +): T => ({ + ...value, + nodes: remapReferences(value.nodes, idMaps, options), + edges: remapReferences(value.edges, idMaps, options), +}) + +/** + * Read-only: collects every reference id found, grouped by entity kind. + * Restricted to `options.kinds` when given. Used to build id-maps ahead of + * an install (find-or-create manifests need to know every id in play before + * `remapReferences` can be run). + */ +export const collectReferencesByKind = ( + value: unknown, + kinds?: readonly string[], +): Map> => { + const byKind = new Map>() + const onUnresolved = ({ entityKind, value: id }: UnresolvedReference) => { + const set = byKind.get(entityKind) ?? new Set() + set.add(id) + byKind.set(entityKind, set) + } + // An empty idMaps means every lookup misses, so every in-scope reference + // is reported to onUnresolved exactly once — this is intentionally reused + // as a pure collector, not a rewrite. + remapReferences(value, {}, { kinds, onUnresolved }) + return byKind +} diff --git a/packages/flow-config/src/import-export/template-schema.ts b/packages/flow-config/src/import-export/template-schema.ts new file mode 100644 index 000000000..7fb33b696 --- /dev/null +++ b/packages/flow-config/src/import-export/template-schema.ts @@ -0,0 +1,152 @@ +import { customFieldTypes } from "@chatbotx.io/utils/custom-field" +import { z } from "zod" +import { flowExportedFlowSchema } from "./schema" + +export const TEMPLATE_EXPORT_FORMAT_VERSION = 1 + +/** + * `manifests` are *identity-resolved* at install time: each entry describes + * a natural key the installer uses to find-or-create the row in the target + * workspace, rather than always inserting a new one. Keyed by `sourceId` so + * the remapper's `idMaps` can be built directly from + * `Object.entries(manifest)`. + */ +export const templateCustomFieldManifestEntrySchema = z.object({ + name: z.string().trim().min(1), + type: customFieldTypes, +}) +export type TemplateCustomFieldManifestEntry = z.infer< + typeof templateCustomFieldManifestEntrySchema +> + +export const templateTagManifestEntrySchema = z.object({ + name: z.string().trim().min(1), +}) +export type TemplateTagManifestEntry = z.infer< + typeof templateTagManifestEntrySchema +> + +export const templateProductCategoryManifestEntrySchema = z.object({ + name: z.string().trim().min(1), + // Points at another entry's *sourceId* in this same manifest, so the + // installer can resolve parents before children. + parentSourceId: z.string().nullable(), +}) +export type TemplateProductCategoryManifestEntry = z.infer< + typeof templateProductCategoryManifestEntrySchema +> + +/** + * Folder manifest MUST key on `folderType`, not name alone — `AutomatedResponse` + * (Keywords) is one table serving two `FolderType`s (`automatedResponse` for + * inbound, `outboundAutomatedResponse` for outbound). A name-only key would + * collapse the two namespaces and silently land inbound keywords in an + * outbound folder. `parentSourceId` mirrors the product-category manifest so + * nested folders resolve parent-first. + */ +export const templateFolderManifestEntrySchema = z.object({ + name: z.string().trim().min(1), + folderType: z.string(), + parentSourceId: z.string().nullable(), +}) +export type TemplateFolderManifestEntry = z.infer< + typeof templateFolderManifestEntrySchema +> + +export const templateManifestsSchema = z.object({ + customFields: z + .record(z.string(), templateCustomFieldManifestEntrySchema) + .default({}), + tags: z.record(z.string(), templateTagManifestEntrySchema).default({}), + productCategories: z + .record(z.string(), templateProductCategoryManifestEntrySchema) + .default({}), + folders: z.record(z.string(), templateFolderManifestEntrySchema).default({}), +}) +export type TemplateManifests = z.infer + +/** + * `resources` are *always-created* on install, one array per category. Each + * entry's own row shape is intentionally left as `z.record(z.string(), + * z.unknown())` here — the per-category adapter (`packages/business/src/ + * template/adapters/*`) owns and validates its own row shape at insert time. + * This envelope only guarantees every entry carries a `sourceId` join key, + * which is all the generic remapper needs. + */ +const templateResourceEntrySchema = z + .object({ sourceId: z.string() }) + .and(z.record(z.string(), z.unknown())) + +export const templateFlowEntrySchema = z + .object({ + sourceId: z.string(), + // Points at a `manifests.folders` sourceId — resolved against + // `idMaps.folder` at install time, same as any other manifest reference. + folderId: z.string().nullable().optional(), + }) + .and(flowExportedFlowSchema) +export type TemplateFlowEntry = z.infer + +export const templateResourcesSchema = z.object({ + flows: z.array(templateFlowEntrySchema).default([]), + products: z.array(templateResourceEntrySchema).default([]), + aiFunctions: z.array(templateResourceEntrySchema).default([]), + aiAgents: z.array(templateResourceEntrySchema).default([]), + calendars: z.array(templateResourceEntrySchema).default([]), + webchats: z.array(templateResourceEntrySchema).default([]), + keywords: z.array(templateResourceEntrySchema).default([]), + entryPointLinks: z.array(templateResourceEntrySchema).default([]), + triggers: z.array(templateResourceEntrySchema).default([]), + fbCommentAutomations: z.array(templateResourceEntrySchema).default([]), + settings: z + .object({ + savedReplies: z.array(templateResourceEntrySchema).default([]), + botFields: z.array(templateResourceEntrySchema).default([]), + }) + .default({ savedReplies: [], botFields: [] }), +}) +export type TemplateResources = z.infer + +export const templateExportSchema = z.object({ + formatVersion: z.literal(TEMPLATE_EXPORT_FORMAT_VERSION), + exportedAt: z.string(), + source: z.object({ + workspaceId: z.string(), + tenantId: z.string(), + }), + manifests: templateManifestsSchema, + resources: templateResourcesSchema, +}) +export type TemplateExport = z.infer + +export type TemplateExportParseResult = + | { ok: true; data: TemplateExport } + | { ok: false; reason: string } + +/** + * Mirrors `parseFlowExport`'s never-throws `{ok, data} | {ok, reason}` + * contract with a version pre-check, run on every install (never trust a + * stored jsonb blob across a format change). + */ +export const parseTemplateExport = ( + raw: unknown, +): TemplateExportParseResult => { + const preParsed = z.object({ formatVersion: z.unknown() }).safeParse(raw) + if ( + preParsed.success && + preParsed.data.formatVersion !== TEMPLATE_EXPORT_FORMAT_VERSION + ) { + return { + ok: false, + reason: `Unsupported template export format version: ${String( + preParsed.data.formatVersion, + )}`, + } + } + + const result = templateExportSchema.safeParse(raw) + if (!result.success) { + return { ok: false, reason: result.error.message } + } + return { ok: true, data: result.data } +} diff --git a/packages/worker-config/src/queues/default/index.ts b/packages/worker-config/src/queues/default/index.ts index d2e1ef1c3..99c0cb938 100644 --- a/packages/worker-config/src/queues/default/index.ts +++ b/packages/worker-config/src/queues/default/index.ts @@ -40,6 +40,7 @@ export const DefaultJobAction = { checkMetaCatalogSync: "checkMetaCatalogSync", syncExternalCalendarEvent: "syncExternalCalendarEvent", sendAppointmentReminder: "sendAppointmentReminder", + installTemplate: "installTemplate", } as const export const syncExternalCalendarEventJobId = ( @@ -251,6 +252,14 @@ export type JobSendAppointmentReminder = { data: JobSendAppointmentReminderData } +export type JobInstallTemplate = { + type: typeof DefaultJobAction.installTemplate + data: { + installationId: string + workspaceId: string + } +} + export type DefaultJobData = | JobExportContacts | JobExportCoupons @@ -265,3 +274,4 @@ export type DefaultJobData = | JobCheckMetaCatalogSync | JobSyncExternalCalendarEvent | JobSendAppointmentReminder + | JobInstallTemplate From 6033e308b1a17359a8b1fa2bf87d5413b2593918 Mon Sep 17 00:00:00 2001 From: Real Codesiman Date: Thu, 20 Aug 2026 21:23:42 +0700 Subject: [PATCH 2/2] feat(templates): guard installed resources from deletion and replace manual reinstall with auto-reconcile Adds assertDeletable checks in flow, fb-comment-automation, webchat, reflink, saved-reply, and trigger services so deleting a resource that is still tracked by an active template installation is blocked instead of silently orphaning the install record. Threads those deletes through their respective business services (flowService.deleteMany, fbCommentAutomationService.deleteMany, etc.) instead of touching `db` directly from builder actions, closing the last direct-db call sites in this feature area. Removes the manual "reinstall now" action/button in favor of automatic reconciliation on auto-update toggle, tightens the adapter registry to a full (non-Partial) Record so a new template resource category without a matching adapter fails to compile instead of silently no-op'ing at install time, and adds a share-template-dialog component plus test coverage for category-resource-list selection, installed-resource guards, and trigger/naming adapters. --- .../category-resource-list-selection.test.tsx | 178 +++++++ apps/builder/messages/ar.json | 107 ++-- apps/builder/messages/da.json | 99 ++-- apps/builder/messages/de.json | 97 ++-- apps/builder/messages/en.json | 11 +- apps/builder/messages/es.json | 105 ++-- apps/builder/messages/fi.json | 105 ++-- apps/builder/messages/fr.json | 103 ++-- apps/builder/messages/he.json | 107 ++-- apps/builder/messages/id.json | 105 ++-- apps/builder/messages/it.json | 105 ++-- apps/builder/messages/ja.json | 105 ++-- apps/builder/messages/nl.json | 95 ++-- apps/builder/messages/pt-BR.json | 101 ++-- apps/builder/messages/pt-PT.json | 103 ++-- apps/builder/messages/ro.json | 105 ++-- apps/builder/messages/sv.json | 105 ++-- apps/builder/messages/tr.json | 105 ++-- apps/builder/messages/vi.json | 105 ++-- apps/builder/messages/zh-CN.json | 107 ++-- apps/builder/messages/zh-TW.json | 105 ++-- apps/builder/src/app/t/[shareToken]/page.tsx | 46 +- .../actions/bulk-delete-fb-comments.action.ts | 19 +- .../actions/delete-fb-comment.action.ts | 10 +- .../flows/actions/delete-flow.action.ts | 31 +- .../actions/delete-webchat.action.ts | 26 +- .../actions/delete-reflinks.action.ts | 12 +- .../actions/delete-saved-reply.action.ts | 16 +- .../actions/reinstall-template.action.ts | 37 -- .../components/category-resource-list.tsx | 62 ++- .../components/install-auto-update-cell.tsx | 45 +- .../components/share-template-dialog.tsx | 150 ++++++ .../components/template-contents-card.tsx | 66 ++- .../templates/components/template-form.tsx | 1 + .../components/template-installs-table.tsx | 11 +- .../templates/components/templates-table.tsx | 41 +- .../queries/list-selectable-resources.ts | 473 +++++++++++++++++- .../features/templates/schemas/mutation.ts | 23 +- .../actions/delete-triggers-action.ts | 15 +- .../__tests__/ai-agent.service.test.ts | 9 + .../__tests__/product-service.test.ts | 10 +- .../template-installed-resource.test.ts | 109 ++++ .../__tests__/template-naming.test.ts | 116 +++++ .../__tests__/trigger.service.test.ts | 83 +++ packages/business/src/ai-agent/service.ts | 16 + packages/business/src/ai-function/service.ts | 7 + .../src/appointment-calendar/service.ts | 6 + .../src/automated-response/service.ts | 7 + packages/business/src/bot-field/service.ts | 7 + .../src/fb-comment-automation/service.ts | 25 +- packages/business/src/flow/service.ts | 35 +- packages/business/src/index.ts | 1 + .../src/integration-webchat/service.ts | 33 ++ packages/business/src/product/service.ts | 6 + packages/business/src/reflink/service.ts | 23 +- packages/business/src/saved-reply/index.ts | 1 + packages/business/src/saved-reply/service.ts | 25 + .../src/template/adapters/ai-agents.ts | 63 +++ .../src/template/adapters/ai-functions.ts | 54 +- .../src/template/adapters/calendars.ts | 100 ++++ .../template/adapters/entry-point-links.ts | 69 ++- .../adapters/fb-comment-automations.ts | 70 +++ .../business/src/template/adapters/flows.ts | 107 +++- .../src/template/adapters/keywords.ts | 62 +++ .../adapters/manifests/collect-hierarchies.ts | 95 ++++ .../business/src/template/adapters/naming.ts | 35 +- .../src/template/adapters/products.ts | 110 ++++ .../src/template/adapters/registry.ts | 20 +- .../src/template/adapters/settings.ts | 87 ++++ .../src/template/adapters/triggers.ts | 64 ++- .../business/src/template/adapters/types.ts | 72 ++- .../src/template/adapters/webchats.ts | 65 ++- .../business/src/template/install.service.ts | 8 + packages/business/src/template/service.ts | 67 +-- .../business/src/template/snapshot.service.ts | 473 ++++++++++-------- packages/business/src/trigger/service.ts | 26 +- packages/database/src/partials/template.ts | 29 +- 77 files changed, 3920 insertions(+), 1517 deletions(-) create mode 100644 apps/builder/__tests__/category-resource-list-selection.test.tsx delete mode 100644 apps/builder/src/features/templates/actions/reinstall-template.action.ts create mode 100644 apps/builder/src/features/templates/components/share-template-dialog.tsx create mode 100644 packages/business/__tests__/template-installed-resource.test.ts create mode 100644 packages/business/__tests__/template-naming.test.ts create mode 100644 packages/business/__tests__/trigger.service.test.ts create mode 100644 packages/business/src/saved-reply/index.ts create mode 100644 packages/business/src/saved-reply/service.ts create mode 100644 packages/business/src/template/adapters/manifests/collect-hierarchies.ts diff --git a/apps/builder/__tests__/category-resource-list-selection.test.tsx b/apps/builder/__tests__/category-resource-list-selection.test.tsx new file mode 100644 index 000000000..3ad24fbf6 --- /dev/null +++ b/apps/builder/__tests__/category-resource-list-selection.test.tsx @@ -0,0 +1,178 @@ +// @vitest-environment jsdom + +import { act } from "react" +import { createRoot, type Root } from "react-dom/client" +import { afterEach, describe, expect, test, vi } from "vitest" +import { CategoryResourceList } from "@/features/templates/components/category-resource-list" + +vi.mock("next-intl", () => ({ + useTranslations: () => (key: string) => key, +})) + +// jsdom has no PointerEvent constructor; Base UI's Checkbox reads pointer +// event fields (`pointerType`) inside its own click handler, so a plain +// MouseEvent throws there. Polyfill with MouseEvent's fields, matching the +// common jsdom + Base UI/Radix test workaround. +class PointerEventPolyfill extends MouseEvent { + pointerType: string + constructor(type: string, params: PointerEventInit = {}) { + super(type, params) + this.pointerType = params.pointerType ?? "mouse" + } +} +;( + window as unknown as { PointerEvent: typeof PointerEventPolyfill } +).PointerEvent ??= PointerEventPolyfill + +const listSelectableResourcesAPI = vi.fn() + +vi.mock("@/lib/orpc/orpc", () => ({ + client: { + templatesAPI: { + listSelectableResourcesAPI: ( + ...args: Parameters + ) => listSelectableResourcesAPI(...args), + }, + }, +})) + +let container: HTMLDivElement | null = null +let root: Root | null = null + +async function renderComponent(ui: React.ReactElement) { + Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true }) + container = document.createElement("div") + document.body.appendChild(container) + root = createRoot(container) + await act(() => { + root?.render(ui) + }) + return container +} + +afterEach(() => { + if (root) { + act(() => { + root?.unmount() + }) + } + container?.remove() + container = null + root = null + vi.clearAllMocks() + vi.useRealTimers() +}) + +const FULL_SET = ["id-1", "id-2", "id-3"] + +const clickCheckbox = async (node: Element) => { + await act(() => { + node.dispatchEvent(new window.PointerEvent("click", { bubbles: true })) + }) +} + +describe("CategoryResourceList selection", () => { + test("select-all after a search still selects the full unfiltered set, not just the matches", async () => { + vi.useFakeTimers() + listSelectableResourcesAPI.mockImplementation( + (input: { keyword?: string }) => { + if (input.keyword) { + // A search only ever returns the matching subset — must never + // become the new `allIds`. + return { + items: [{ id: "id-2", name: "Matching Flow" }], + nextCursor: null, + total: 1, + allIds: undefined, + } + } + return { + items: FULL_SET.map((id) => ({ id, name: id })), + nextCursor: null, + total: FULL_SET.length, + allIds: FULL_SET, + } + }, + ) + + const onChange = vi.fn() + const el = await renderComponent( + , + ) + + // Initial unfiltered load captured allIds = FULL_SET. + expect(listSelectableResourcesAPI).toHaveBeenCalledWith( + expect.objectContaining({ keyword: undefined, cursor: undefined }), + ) + + const searchInput = el.querySelector( + "input[placeholder]", + ) as HTMLInputElement + + const nativeInputValueSetter = Object.getOwnPropertyDescriptor( + window.HTMLInputElement.prototype, + "value", + )?.set + await act(() => { + nativeInputValueSetter?.call(searchInput, "Matching") + searchInput.dispatchEvent(new Event("input", { bubbles: true })) + }) + + // Drive the real debounce timer so `fetchPage(null, "Matching")` runs + // through the component's own effect, not a re-invoked mock. + await act(() => { + vi.advanceTimersByTime(500) + }) + await act(async () => { + await Promise.resolve() + }) + + const selectAllCheckbox = el.querySelector( + '[role="checkbox"][aria-labelledby="flows-select-all-label"]', + ) as HTMLElement + await clickCheckbox(selectAllCheckbox) + + // Because `allIds` was captured from the unfiltered fetch and a search + // must never overwrite it, "select all" resolves to the full set, not + // just the single search match. + expect(onChange).toHaveBeenCalledWith({ mode: "ids", ids: FULL_SET }) + }) + + test("unchecking a row while mode:all downgrades to the exact allIds set, not just the loaded page", async () => { + listSelectableResourcesAPI.mockResolvedValue({ + items: FULL_SET.map((id) => ({ id, name: id })), + nextCursor: null, + total: FULL_SET.length, + allIds: FULL_SET, + }) + + const onChange = vi.fn() + const el = await renderComponent( + , + ) + + const allCheckboxes = Array.from(el.querySelectorAll('[role="checkbox"]')) + const rowCheckboxes = allCheckboxes.filter( + (node) => + node.getAttribute("aria-labelledby") !== "flows-select-all-label", + ) + expect(rowCheckboxes.length).toBe(FULL_SET.length) + + await clickCheckbox(rowCheckboxes[1]) + + expect(onChange).toHaveBeenCalledWith({ + mode: "ids", + ids: FULL_SET.filter((id) => id !== "id-2"), + }) + }) +}) diff --git a/apps/builder/messages/ar.json b/apps/builder/messages/ar.json index 270edd3df..7ff072026 100644 --- a/apps/builder/messages/ar.json +++ b/apps/builder/messages/ar.json @@ -3992,55 +3992,58 @@ }, "templates": { "title": "القوالب", - "description": "إنشاء قوالبك وإدارتها.", + "description": "أنشئ قوالبك وأدرها.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "مشاركة", + "enabled": "تمت المشاركة", + "disabled": "غير مُشارَك", + "dialogTitle": "مشاركة القالب", + "dialogDescription": "يمكن لأي شخص لديه هذا الرابط تثبيت نسخة من هذا القالب في مساحة عمل ضمن مؤسستك.", + "enableLabel": "تفعيل رابط المشاركة", + "linkLabel": "رابط المشاركة" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "عمليات التثبيت", + "resources": "الموارد", + "warnings": "التحذيرات", + "completedAt": "اكتمل في", + "autoUpdate": "التحديث التلقائي" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "محتوى القالب", + "comingSoon": "قريبًا", + "selectAll": "تحديد الكل", + "selectedCount": "تم تحديد {count}", + "details": "التفاصيل", + "permissions": "الأذونات الافتراضية", + "allowEdit": "السماح بالتعديل بعد التثبيت", + "allowDelete": "السماح بالحذف بعد التثبيت", + "publisherName": "اسم الناشر", + "youtubeVideoId": "معرّف فيديو يوتيوب", + "youtubeVideoIdDescription": "المعرّف المكوَّن من 11 حرفًا من رابط الفيديو، مثل \"dQw4w9WgXcQ\" في youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "رابط الاختبار", + "imageUrl": "صورة الغلاف", + "installBehavior": "سلوك التثبيت", + "createInstallFolder": "التثبيت في مجلد مخصص", + "createInstallFolderDescription": "يضع كل مورد يتم تثبيته داخل مجلد جديد واحد يحمل اسم هذا القالب.", + "defaultAutoUpdate": "تمييز عمليات التثبيت للتحديث بشكل افتراضي", + "defaultAutoUpdateDescription": "ستعرض عمليات التثبيت الجديدة إشعارًا بتوفر تحديث في كل مرة تعيد فيها نشر هذا القالب." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", - "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "flows": "المسارات", + "customFields": "الحقول المخصصة", + "tags": "الوسوم", + "products": "المنتجات", + "productCategories": "فئات المنتجات", + "aiFunctions": "وظائف الذكاء الاصطناعي", + "aiAgents": "وكلاء الذكاء الاصطناعي", + "calendars": "تقويمات المواعيد", + "webchats": "دردشات الويب", + "keywords": "الكلمات المفتاحية", + "entryPointLinks": "روابط نقاط الدخول", + "triggers": "المشغِّلات", + "fbCommentAutomations": "أتمتة تعليقات فيسبوك", + "settings": "الإعدادات" } }, "qrCodeGenerator": { @@ -4158,16 +4161,16 @@ "unavailableDescription": "مساحة العمل هذه لم تعد متاحة." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "هذا الرابط لم يعد متاحًا.", + "invalidDescription": "رابط مشاركة هذا القالب غير صالح أو معطَّل أو منتهي الصلاحية.", + "byPublisher": "بواسطة {publisherName}", + "includes": "يتضمن هذا القالب", + "tryItOut": "جرّبه", + "signInToInstall": "سجّل الدخول للتثبيت", + "selectWorkspace": "اختر مساحة عمل", + "install": "تثبيت", + "installStarted": "بدأ التثبيت", + "noEligibleWorkspaces": "ليس لديك مساحة عمل مؤهلة لتثبيت هذا القالب." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/da.json b/apps/builder/messages/da.json index 3fe4e7a6c..5eb89ae9f 100644 --- a/apps/builder/messages/da.json +++ b/apps/builder/messages/da.json @@ -4157,55 +4157,58 @@ }, "templates": { "title": "Skabeloner", - "description": "Opret og administrer din skabeloner.", + "description": "Opret og administrer dine skabeloner.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Del", + "enabled": "Delt", + "disabled": "Ikke delt", + "dialogTitle": "Del skabelon", + "dialogDescription": "Alle med dette link kan installere en kopi af denne skabelon i et arbejdsområde i din tenant.", + "enableLabel": "Aktivér dellink", + "linkLabel": "Dellink" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Installationer", + "resources": "Ressourcer", + "warnings": "Advarsler", + "completedAt": "Afsluttet", + "autoUpdate": "Automatisk opdatering" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "Skabelonindhold", + "comingSoon": "Kommer snart", + "selectAll": "Vælg alle", + "selectedCount": "{count} valgt", + "details": "Detaljer", + "permissions": "Standardtilladelser", + "allowEdit": "Tillad redigering efter installation", + "allowDelete": "Tillad sletning efter installation", + "publisherName": "Udgivernavn", + "youtubeVideoId": "YouTube-video-id", + "youtubeVideoIdDescription": "Det 11-tegns id fra videoens URL, f.eks. \"dQw4w9WgXcQ\" i youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Testlink", + "imageUrl": "Forsidebillede", + "installBehavior": "Installationsadfærd", + "createInstallFolder": "Installer i en dedikeret mappe", + "createInstallFolderDescription": "Placer alle installerede ressourcer i én ny mappe opkaldt efter denne skabelon.", + "defaultAutoUpdate": "Markér installationer til opdatering som standard", + "defaultAutoUpdateDescription": "Nye installationer viser en besked om tilgængelig opdatering, hver gang du genudgiver denne skabelon." }, "categories": { "flows": "Flows", - "customFields": "Custom fields", + "customFields": "Brugerdefinerede felter", "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", + "products": "Produkter", + "productCategories": "Produktkategorier", + "aiFunctions": "AI-funktioner", + "aiAgents": "AI-agenter", + "calendars": "Aftalekalendere", "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", + "keywords": "Nøgleord", + "entryPointLinks": "Entry Point Links", "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "fbCommentAutomations": "Facebook-kommentarautomatiseringer", + "settings": "Indstillinger" } }, "qrCodeGenerator": { @@ -4323,16 +4326,16 @@ "unavailableDescription": "Denne arbejdsområde er ingen longer tilgængelig." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Dette link er ikke længere tilgængeligt.", + "invalidDescription": "Dette skabelon-dellink er ugyldigt, deaktiveret eller udløbet.", + "byPublisher": "Af {publisherName}", + "includes": "Denne skabelon indeholder", + "tryItOut": "Prøv den", + "signInToInstall": "Log ind for at installere", + "selectWorkspace": "Vælg et arbejdsområde", + "install": "Installer", + "installStarted": "Installation startet", + "noEligibleWorkspaces": "Du har ikke et arbejdsområde, der er egnet til at installere denne skabelon." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/de.json b/apps/builder/messages/de.json index b8086129d..011ee6fd7 100644 --- a/apps/builder/messages/de.json +++ b/apps/builder/messages/de.json @@ -4159,53 +4159,56 @@ "title": "Vorlagen", "description": "Erstellen und verwalten Sie Ihre Vorlagen.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Teilen", + "enabled": "Geteilt", + "disabled": "Nicht geteilt", + "dialogTitle": "Vorlage teilen", + "dialogDescription": "Jeder mit diesem Link kann eine Kopie dieser Vorlage in einem Arbeitsbereich Ihres Mandanten installieren.", + "enableLabel": "Freigabelink aktivieren", + "linkLabel": "Freigabelink" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Installationen", + "resources": "Ressourcen", + "warnings": "Warnungen", + "completedAt": "Abgeschlossen am", + "autoUpdate": "Automatische Aktualisierung" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", + "contents": "Vorlageninhalt", + "comingSoon": "Demnächst verfügbar", + "selectAll": "Alle auswählen", + "selectedCount": "{count} ausgewählt", "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "permissions": "Standardberechtigungen", + "allowEdit": "Bearbeitung nach Installation erlauben", + "allowDelete": "Löschen nach Installation erlauben", + "publisherName": "Name des Herausgebers", + "youtubeVideoId": "YouTube-Video-ID", + "youtubeVideoIdDescription": "Die 11-stellige ID aus der Video-URL, z. B. \"dQw4w9WgXcQ\" in youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Testlink", + "imageUrl": "Titelbild", + "installBehavior": "Installationsverhalten", + "createInstallFolder": "In einem eigenen Ordner installieren", + "createInstallFolderDescription": "Verschachtelt jede installierte Ressource in einem neuen, nach dieser Vorlage benannten Ordner.", + "defaultAutoUpdate": "Installationen standardmäßig für Updates markieren", + "defaultAutoUpdateDescription": "Neue Installationen zeigen einen Update-Hinweis, sobald Sie diese Vorlage erneut veröffentlichen." }, "categories": { "flows": "Flows", - "customFields": "Custom fields", + "customFields": "Benutzerdefinierte Felder", "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", + "products": "Produkte", + "productCategories": "Produktkategorien", + "aiFunctions": "KI-Funktionen", + "aiAgents": "KI-Agenten", + "calendars": "Terminkalender", "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "keywords": "Schlüsselwörter", + "entryPointLinks": "Einstiegspunkt-Links", + "triggers": "Trigger", + "fbCommentAutomations": "Facebook-Kommentarautomatisierungen", + "settings": "Einstellungen" } }, "qrCodeGenerator": { @@ -4323,16 +4326,16 @@ "unavailableDescription": "Dieser Arbeitsbereich ist nicht mehr verfügbar." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Dieser Link ist nicht mehr verfügbar.", + "invalidDescription": "Dieser Vorlagen-Freigabelink ist ungültig, deaktiviert oder abgelaufen.", + "byPublisher": "Von {publisherName}", + "includes": "Diese Vorlage enthält", + "tryItOut": "Ausprobieren", + "signInToInstall": "Zum Installieren anmelden", + "selectWorkspace": "Arbeitsbereich auswählen", + "install": "Installieren", + "installStarted": "Installation gestartet", + "noEligibleWorkspaces": "Sie haben keinen Arbeitsbereich, der für die Installation dieser Vorlage geeignet ist." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/en.json b/apps/builder/messages/en.json index b49c47b76..742d8fcbe 100644 --- a/apps/builder/messages/en.json +++ b/apps/builder/messages/en.json @@ -4434,16 +4434,18 @@ "share": { "label": "Share", "enabled": "Shared", - "disabled": "Not shared" + "disabled": "Not shared", + "dialogTitle": "Share template", + "dialogDescription": "Anyone with this link can install a copy of this template into a workspace in your tenant.", + "enableLabel": "Enable share link", + "linkLabel": "Share link" }, "installs": { "title": "Installs", "resources": "Resources", "warnings": "Warnings", "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "autoUpdate": "Auto-update" }, "form": { "contents": "Template contents", @@ -4456,6 +4458,7 @@ "allowDelete": "Allow deleting after install", "publisherName": "Publisher name", "youtubeVideoId": "YouTube video ID", + "youtubeVideoIdDescription": "The 11-character ID from the video's URL, e.g. the \"dQw4w9WgXcQ\" in youtube.com/watch?v=dQw4w9WgXcQ", "testLink": "Test link", "imageUrl": "Cover image", "installBehavior": "Install behavior", diff --git a/apps/builder/messages/es.json b/apps/builder/messages/es.json index 36f527f12..b0f464af2 100644 --- a/apps/builder/messages/es.json +++ b/apps/builder/messages/es.json @@ -4157,55 +4157,58 @@ }, "templates": { "title": "Plantillas", - "description": "Crear y Gestionar tu plantillas.", + "description": "Crea y gestiona tus plantillas.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Compartir", + "enabled": "Compartida", + "disabled": "No compartida", + "dialogTitle": "Compartir plantilla", + "dialogDescription": "Cualquiera con este enlace puede instalar una copia de esta plantilla en un espacio de trabajo de tu organización.", + "enableLabel": "Activar enlace para compartir", + "linkLabel": "Enlace para compartir" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Instalaciones", + "resources": "Recursos", + "warnings": "Advertencias", + "completedAt": "Completado el", + "autoUpdate": "Actualización automática" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "Contenido de la plantilla", + "comingSoon": "Próximamente", + "selectAll": "Seleccionar todo", + "selectedCount": "{count} seleccionados", + "details": "Detalles", + "permissions": "Permisos predeterminados", + "allowEdit": "Permitir edición después de instalar", + "allowDelete": "Permitir eliminación después de instalar", + "publisherName": "Nombre del publicador", + "youtubeVideoId": "ID del vídeo de YouTube", + "youtubeVideoIdDescription": "El ID de 11 caracteres de la URL del vídeo, por ejemplo \"dQw4w9WgXcQ\" en youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Enlace de prueba", + "imageUrl": "Imagen de portada", + "installBehavior": "Comportamiento de instalación", + "createInstallFolder": "Instalar en una carpeta dedicada", + "createInstallFolderDescription": "Anida todos los recursos instalados dentro de una nueva carpeta con el nombre de esta plantilla.", + "defaultAutoUpdate": "Marcar instalaciones para actualizaciones de forma predeterminada", + "defaultAutoUpdateDescription": "Las nuevas instalaciones mostrarán un aviso de actualización disponible cada vez que vuelvas a publicar esta plantilla." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", + "flows": "Flujos", + "customFields": "Campos personalizados", + "tags": "Etiquetas", + "products": "Productos", + "productCategories": "Categorías de productos", + "aiFunctions": "Funciones de IA", + "aiAgents": "Agentes de IA", + "calendars": "Calendarios de citas", "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "keywords": "Palabras clave", + "entryPointLinks": "Entry Point Enlaces", + "triggers": "Desencadenadores", + "fbCommentAutomations": "Automatizaciones de comentarios de Facebook", + "settings": "Configuración" } }, "qrCodeGenerator": { @@ -4323,16 +4326,16 @@ "unavailableDescription": "This workspace es no longer disponible." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Este enlace ya no está disponible.", + "invalidDescription": "Este enlace de plantilla no es válido, está deshabilitado o ha caducado.", + "byPublisher": "Por {publisherName}", + "includes": "Esta plantilla incluye", + "tryItOut": "Pruébala", + "signInToInstall": "Inicia sesión para instalar", + "selectWorkspace": "Selecciona un espacio de trabajo", + "install": "Instalar", + "installStarted": "Instalación iniciada", + "noEligibleWorkspaces": "No tienes ningún espacio de trabajo apto para instalar esta plantilla." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/fi.json b/apps/builder/messages/fi.json index 13095e01c..93acadcb6 100644 --- a/apps/builder/messages/fi.json +++ b/apps/builder/messages/fi.json @@ -4159,53 +4159,56 @@ "title": "Mallit", "description": "Luo ja hallitse mallejasi.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Jaa", + "enabled": "Jaettu", + "disabled": "Ei jaettu", + "dialogTitle": "Jaa malli", + "dialogDescription": "Kuka tahansa, jolla on tämä linkki, voi asentaa kopion tästä mallista organisaatiosi työtilaan.", + "enableLabel": "Ota jakolinkki käyttöön", + "linkLabel": "Jakolinkki" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Asennukset", + "resources": "Resurssit", + "warnings": "Varoitukset", + "completedAt": "Valmistui", + "autoUpdate": "Automaattinen päivitys" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "Mallin sisältö", + "comingSoon": "Tulossa pian", + "selectAll": "Valitse kaikki", + "selectedCount": "{count} valittu", + "details": "Tiedot", + "permissions": "Oletusoikeudet", + "allowEdit": "Salli muokkaus asennuksen jälkeen", + "allowDelete": "Salli poistaminen asennuksen jälkeen", + "publisherName": "Julkaisijan nimi", + "youtubeVideoId": "YouTube-videon tunnus", + "youtubeVideoIdDescription": "11-merkkinen tunnus videon URL-osoitteesta, esim. \"dQw4w9WgXcQ\" osoitteessa youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Testilinkki", + "imageUrl": "Kansikuva", + "installBehavior": "Asennuksen toiminta", + "createInstallFolder": "Asenna omaan kansioon", + "createInstallFolderDescription": "Sijoittaa jokaisen asennetun resurssin uuteen, tämän mallin mukaan nimettyyn kansioon.", + "defaultAutoUpdate": "Merkitse asennukset oletuksena päivitettäviksi", + "defaultAutoUpdateDescription": "Uudet asennukset näyttävät päivitysilmoituksen aina, kun julkaiset tämän mallin uudelleen." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", - "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "flows": "Flowt", + "customFields": "Mukautetut kentät", + "tags": "Tunnisteet", + "products": "Tuotteet", + "productCategories": "Tuotekategoriat", + "aiFunctions": "AI-toiminnot", + "aiAgents": "AI-agentit", + "calendars": "Ajanvarauskalenterit", + "webchats": "Verkkokeskustelut", + "keywords": "Avainsanat", + "entryPointLinks": "Aloituspisteiden linkit", + "triggers": "Käynnistimet", + "fbCommentAutomations": "Facebook-kommenttiautomaatiot", + "settings": "Asetukset" } }, "qrCodeGenerator": { @@ -4323,16 +4326,16 @@ "unavailableDescription": "Tämä työtila ei ole enää käytettävissä." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Tämä linkki ei ole enää käytettävissä.", + "invalidDescription": "Tämä mallin jakolinkki on virheellinen, poistettu käytöstä tai vanhentunut.", + "byPublisher": "Julkaisija: {publisherName}", + "includes": "Tämä malli sisältää", + "tryItOut": "Kokeile sitä", + "signInToInstall": "Kirjaudu sisään asentaaksesi", + "selectWorkspace": "Valitse työtila", + "install": "Asenna", + "installStarted": "Asennus aloitettu", + "noEligibleWorkspaces": "Sinulla ei ole työtilaa, johon tämän mallin voi asentaa." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/fr.json b/apps/builder/messages/fr.json index 763530c24..c0dfc3046 100644 --- a/apps/builder/messages/fr.json +++ b/apps/builder/messages/fr.json @@ -4159,53 +4159,56 @@ "title": "Modèles", "description": "Créez et gérez vos modèles.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Partager", + "enabled": "Partagé", + "disabled": "Non partagé", + "dialogTitle": "Partager le modèle", + "dialogDescription": "Toute personne disposant de ce lien peut installer une copie de ce modèle dans un espace de travail de votre organisation.", + "enableLabel": "Activer le lien de partage", + "linkLabel": "Lien de partage" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Installations", + "resources": "Ressources", + "warnings": "Avertissements", + "completedAt": "Terminé le", + "autoUpdate": "Mise à jour automatique" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "Contenu du modèle", + "comingSoon": "Bientôt disponible", + "selectAll": "Tout sélectionner", + "selectedCount": "{count} sélectionné(s)", + "details": "Détails", + "permissions": "Autorisations par défaut", + "allowEdit": "Autoriser la modification après installation", + "allowDelete": "Autoriser la suppression après installation", + "publisherName": "Nom de l'éditeur", + "youtubeVideoId": "ID de la vidéo YouTube", + "youtubeVideoIdDescription": "L'identifiant de 11 caractères présent dans l'URL de la vidéo, par ex. \"dQw4w9WgXcQ\" dans youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Lien de test", + "imageUrl": "Image de couverture", + "installBehavior": "Comportement d'installation", + "createInstallFolder": "Installer dans un dossier dédié", + "createInstallFolderDescription": "Regroupe chaque ressource installée dans un nouveau dossier portant le nom de ce modèle.", + "defaultAutoUpdate": "Marquer les installations comme à mettre à jour par défaut", + "defaultAutoUpdateDescription": "Les nouvelles installations afficheront un avis de mise à jour disponible chaque fois que vous republierez ce modèle." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", + "flows": "Flux", + "customFields": "Champs personnalisés", + "tags": "Étiquettes", + "products": "Produits", + "productCategories": "Catégories de produits", + "aiFunctions": "Fonctions IA", + "aiAgents": "Agents IA", + "calendars": "Calendriers de rendez-vous", "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "keywords": "Mots-clés", + "entryPointLinks": "Liens de point d’entrée", + "triggers": "Déclencheurs", + "fbCommentAutomations": "Automatisations de commentaires Facebook", + "settings": "Paramètres" } }, "qrCodeGenerator": { @@ -4323,16 +4326,16 @@ "unavailableDescription": "Cet espace de travail n’est plus disponible." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Ce lien n'est plus disponible.", + "invalidDescription": "Ce lien de partage de modèle est invalide, désactivé ou a expiré.", + "byPublisher": "Par {publisherName}", + "includes": "Ce modèle inclut", + "tryItOut": "Essayer", + "signInToInstall": "Se connecter pour installer", + "selectWorkspace": "Sélectionner un espace de travail", + "install": "Installer", + "installStarted": "Installation démarrée", + "noEligibleWorkspaces": "Vous n'avez aucun espace de travail éligible pour installer ce modèle." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/he.json b/apps/builder/messages/he.json index 9148f3d4e..e7640df22 100644 --- a/apps/builder/messages/he.json +++ b/apps/builder/messages/he.json @@ -2441,55 +2441,58 @@ }, "templates": { "title": "תבניות", - "description": "יצירה וניהול של התבניות שלכם.", + "description": "צור ונהל את התבניות שלך.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "שיתוף", + "enabled": "משותפת", + "disabled": "לא משותפת", + "dialogTitle": "שיתוף תבנית", + "dialogDescription": "כל מי שיש לו את הקישור הזה יכול להתקין עותק של התבנית הזו בסביבת עבודה בארגון שלך.", + "enableLabel": "הפעלת קישור שיתוף", + "linkLabel": "קישור שיתוף" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "התקנות", + "resources": "משאבים", + "warnings": "אזהרות", + "completedAt": "הושלם בתאריך", + "autoUpdate": "עדכון אוטומטי" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "תוכן התבנית", + "comingSoon": "בקרוב", + "selectAll": "בחירת הכול", + "selectedCount": "{count} נבחרו", + "details": "פרטים", + "permissions": "הרשאות ברירת מחדל", + "allowEdit": "אפשר עריכה לאחר ההתקנה", + "allowDelete": "אפשר מחיקה לאחר ההתקנה", + "publisherName": "שם המפרסם", + "youtubeVideoId": "מזהה סרטון YouTube", + "youtubeVideoIdDescription": "המזהה בן 11 התווים מכתובת ה-URL של הסרטון, למשל \"dQw4w9WgXcQ\" בכתובת youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "קישור בדיקה", + "imageUrl": "תמונת שער", + "installBehavior": "התנהגות ההתקנה", + "createInstallFolder": "התקנה בתיקייה ייעודית", + "createInstallFolderDescription": "מקנן כל משאב שהותקן בתוך תיקייה חדשה אחת הנקראת על שם התבנית הזו.", + "defaultAutoUpdate": "סימון התקנות לעדכון כברירת מחדל", + "defaultAutoUpdateDescription": "התקנות חדשות יציגו הודעת עדכון זמין בכל פעם שתפרסם מחדש את התבנית הזו." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", - "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "flows": "תהליכים", + "customFields": "שדות מותאמים אישית", + "tags": "תגיות", + "products": "מוצרים", + "productCategories": "קטגוריות מוצרים", + "aiFunctions": "פונקציות AI", + "aiAgents": "סוכני AI", + "calendars": "יומני פגישות", + "webchats": "צ'אטים אינטרנטיים", + "keywords": "מילות מפתח", + "entryPointLinks": "קישורים לנקודות כניסה", + "triggers": "גורמים מפעילים", + "fbCommentAutomations": "אוטומציות תגובות פייסבוק", + "settings": "הגדרות" } }, "qrCodeGenerator": { @@ -2607,16 +2610,16 @@ "unavailableDescription": "סביבת עבודה זו אינה זמינה עוד." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "קישור זה אינו זמין עוד.", + "invalidDescription": "קישור השיתוף של התבנית הזו אינו תקין, מושבת או שפג תוקפו.", + "byPublisher": "מאת {publisherName}", + "includes": "התבנית הזו כוללת", + "tryItOut": "נסה עכשיו", + "signInToInstall": "התחבר כדי להתקין", + "selectWorkspace": "בחר סביבת עבודה", + "install": "התקן", + "installStarted": "ההתקנה החלה", + "noEligibleWorkspaces": "אין לך סביבת עבודה מתאימה להתקנת התבנית הזו." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/id.json b/apps/builder/messages/id.json index e060933e3..e51653e7f 100644 --- a/apps/builder/messages/id.json +++ b/apps/builder/messages/id.json @@ -4159,53 +4159,56 @@ "title": "Templat", "description": "Buat dan kelola templat Anda.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Bagikan", + "enabled": "Dibagikan", + "disabled": "Tidak dibagikan", + "dialogTitle": "Bagikan templat", + "dialogDescription": "Siapa pun yang memiliki tautan ini dapat menginstal salinan templat ini ke workspace di tenant Anda.", + "enableLabel": "Aktifkan tautan berbagi", + "linkLabel": "Tautan berbagi" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Instalasi", + "resources": "Sumber daya", + "warnings": "Peringatan", + "completedAt": "Selesai pada", + "autoUpdate": "Pembaruan otomatis" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "Isi templat", + "comingSoon": "Segera hadir", + "selectAll": "Pilih semua", + "selectedCount": "{count} dipilih", + "details": "Detail", + "permissions": "Izin default", + "allowEdit": "Izinkan pengeditan setelah instalasi", + "allowDelete": "Izinkan penghapusan setelah instalasi", + "publisherName": "Nama penerbit", + "youtubeVideoId": "ID video YouTube", + "youtubeVideoIdDescription": "ID 11 karakter dari URL video, misalnya \"dQw4w9WgXcQ\" pada youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Tautan uji", + "imageUrl": "Gambar sampul", + "installBehavior": "Perilaku instalasi", + "createInstallFolder": "Instal ke folder khusus", + "createInstallFolderDescription": "Menempatkan setiap sumber daya yang diinstal ke dalam satu folder baru yang diberi nama sesuai templat ini.", + "defaultAutoUpdate": "Tandai instalasi untuk pembaruan secara default", + "defaultAutoUpdateDescription": "Instalasi baru akan menampilkan pemberitahuan pembaruan tersedia setiap kali Anda menerbitkan ulang templat ini." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", - "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "flows": "Flow", + "customFields": "Kustom Field", + "tags": "Tag", + "products": "Produk", + "productCategories": "Kategori produk", + "aiFunctions": "Fungsi AI", + "aiAgents": "Agen AI", + "calendars": "Kalender Janji Temu", + "webchats": "Webchat", + "keywords": "Kata Kunci", + "entryPointLinks": "Tautan Titik Masuk", + "triggers": "Trigger", + "fbCommentAutomations": "Otomatisasi komentar Facebook", + "settings": "Pengaturan" } }, "qrCodeGenerator": { @@ -4323,16 +4326,16 @@ "unavailableDescription": "Ruang kerja ini tidak lagi tersedia." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Tautan ini sudah tidak tersedia lagi.", + "invalidDescription": "Tautan berbagi templat ini tidak valid, dinonaktifkan, atau telah kedaluwarsa.", + "byPublisher": "Oleh {publisherName}", + "includes": "Templat ini mencakup", + "tryItOut": "Coba sekarang", + "signInToInstall": "Masuk untuk menginstal", + "selectWorkspace": "Pilih workspace", + "install": "Instal", + "installStarted": "Instalasi dimulai", + "noEligibleWorkspaces": "Anda tidak memiliki workspace yang memenuhi syarat untuk menginstal templat ini." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/it.json b/apps/builder/messages/it.json index 93cec4cb8..70c9c7303 100644 --- a/apps/builder/messages/it.json +++ b/apps/builder/messages/it.json @@ -4159,53 +4159,56 @@ "title": "Modelli", "description": "Crea e gestisci i tuoi modelli.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Condividi", + "enabled": "Condiviso", + "disabled": "Non condiviso", + "dialogTitle": "Condividi modello", + "dialogDescription": "Chiunque abbia questo link può installare una copia di questo modello in uno spazio di lavoro del tuo tenant.", + "enableLabel": "Attiva link di condivisione", + "linkLabel": "Link di condivisione" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Installazioni", + "resources": "Risorse", + "warnings": "Avvisi", + "completedAt": "Completato il", + "autoUpdate": "Aggiornamento automatico" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "Contenuto del modello", + "comingSoon": "Prossimamente", + "selectAll": "Seleziona tutto", + "selectedCount": "{count} selezionati", + "details": "Dettagli", + "permissions": "Autorizzazioni predefinite", + "allowEdit": "Consenti la modifica dopo l'installazione", + "allowDelete": "Consenti l'eliminazione dopo l'installazione", + "publisherName": "Nome dell'editore", + "youtubeVideoId": "ID video di YouTube", + "youtubeVideoIdDescription": "L'ID di 11 caratteri dall'URL del video, ad es. \"dQw4w9WgXcQ\" in youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Link di prova", + "imageUrl": "Immagine di copertina", + "installBehavior": "Comportamento di installazione", + "createInstallFolder": "Installa in una cartella dedicata", + "createInstallFolderDescription": "Raggruppa ogni risorsa installata in una nuova cartella con il nome di questo modello.", + "defaultAutoUpdate": "Contrassegna le installazioni per gli aggiornamenti per impostazione predefinita", + "defaultAutoUpdateDescription": "Le nuove installazioni mostreranno un avviso di aggiornamento disponibile ogni volta che ripubblichi questo modello." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", - "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "flows": "Flussi", + "customFields": "Campi personalizzati", + "tags": "Tag", + "products": "Prodotti", + "productCategories": "Categorie di prodotti", + "aiFunctions": "Funzioni IA", + "aiAgents": "Agenti IA", + "calendars": "Calendari degli appuntamenti", + "webchats": "Webchat", + "keywords": "Parole chiave", + "entryPointLinks": "Link dei punti di ingresso", + "triggers": "Trigger", + "fbCommentAutomations": "Automazioni dei commenti Facebook", + "settings": "Impostazioni" } }, "qrCodeGenerator": { @@ -4323,16 +4326,16 @@ "unavailableDescription": "Questa area di lavoro non è più disponibile." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Questo link non è più disponibile.", + "invalidDescription": "Questo link di condivisione del modello non è valido, è disattivato o è scaduto.", + "byPublisher": "Di {publisherName}", + "includes": "Questo modello include", + "tryItOut": "Provalo", + "signInToInstall": "Accedi per installare", + "selectWorkspace": "Seleziona uno spazio di lavoro", + "install": "Installa", + "installStarted": "Installazione avviata", + "noEligibleWorkspaces": "Non hai uno spazio di lavoro idoneo per installare questo modello." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/ja.json b/apps/builder/messages/ja.json index 3419b15b4..31077e304 100644 --- a/apps/builder/messages/ja.json +++ b/apps/builder/messages/ja.json @@ -4159,53 +4159,56 @@ "title": "テンプレート", "description": "テンプレートを作成・管理します。", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "共有", + "enabled": "共有中", + "disabled": "未共有", + "dialogTitle": "テンプレートを共有", + "dialogDescription": "このリンクを持つ人は誰でも、あなたのテナント内のワークスペースにこのテンプレートのコピーをインストールできます。", + "enableLabel": "共有リンクを有効にする", + "linkLabel": "共有リンク" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "インストール", + "resources": "リソース", + "warnings": "警告", + "completedAt": "完了日時", + "autoUpdate": "自動更新" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "テンプレートの内容", + "comingSoon": "近日公開", + "selectAll": "すべて選択", + "selectedCount": "{count}件選択中", + "details": "詳細", + "permissions": "デフォルトの権限", + "allowEdit": "インストール後の編集を許可", + "allowDelete": "インストール後の削除を許可", + "publisherName": "公開者名", + "youtubeVideoId": "YouTube動画ID", + "youtubeVideoIdDescription": "動画URLに含まれる11文字のID(例: youtube.com/watch?v=dQw4w9WgXcQ の \"dQw4w9WgXcQ\")", + "testLink": "テストリンク", + "imageUrl": "カバー画像", + "installBehavior": "インストール時の動作", + "createInstallFolder": "専用フォルダーにインストールする", + "createInstallFolderDescription": "インストールされたすべてのリソースを、このテンプレートの名前を付けた新しい1つのフォルダーにまとめます。", + "defaultAutoUpdate": "インストールをデフォルトで更新対象としてマークする", + "defaultAutoUpdateDescription": "このテンプレートを再公開するたびに、新規インストールに更新通知が表示されます。" }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", - "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "flows": "フロー", + "customFields": "カスタムフィールド", + "tags": "タグ", + "products": "商品", + "productCategories": "商品カテゴリー", + "aiFunctions": "AI関数", + "aiAgents": "AIエージェント", + "calendars": "予約カレンダー", + "webchats": "Webチャット", + "keywords": "キーワード", + "entryPointLinks": "エントリーポイントリンク", + "triggers": "トリガー", + "fbCommentAutomations": "Facebookコメント自動化", + "settings": "設定" } }, "qrCodeGenerator": { @@ -4323,16 +4326,16 @@ "unavailableDescription": "このワークスペースは利用できなくなりました。" }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "このリンクはご利用いただけません。", + "invalidDescription": "このテンプレート共有リンクは無効、無効化済み、または期限切れです。", + "byPublisher": "{publisherName}による", + "includes": "このテンプレートに含まれるもの", + "tryItOut": "試してみる", + "signInToInstall": "サインインしてインストール", + "selectWorkspace": "ワークスペースを選択", + "install": "インストール", + "installStarted": "インストールを開始しました", + "noEligibleWorkspaces": "このテンプレートをインストールできるワークスペースがありません。" }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/nl.json b/apps/builder/messages/nl.json index 657265127..94a191e18 100644 --- a/apps/builder/messages/nl.json +++ b/apps/builder/messages/nl.json @@ -4159,53 +4159,56 @@ "title": "Sjablonen", "description": "Maak en beheer je sjablonen.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Delen", + "enabled": "Gedeeld", + "disabled": "Niet gedeeld", + "dialogTitle": "Sjabloon delen", + "dialogDescription": "Iedereen met deze link kan een kopie van dit sjabloon installeren in een werkruimte binnen jouw tenant.", + "enableLabel": "Deellink inschakelen", + "linkLabel": "Deellink" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Installaties", + "resources": "Bronnen", + "warnings": "Waarschuwingen", + "completedAt": "Voltooid op", + "autoUpdate": "Automatische update" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", + "contents": "Sjabloon-inhoud", + "comingSoon": "Binnenkort beschikbaar", + "selectAll": "Alles selecteren", + "selectedCount": "{count} geselecteerd", "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "permissions": "Standaardrechten", + "allowEdit": "Bewerken na installatie toestaan", + "allowDelete": "Verwijderen na installatie toestaan", + "publisherName": "Naam uitgever", + "youtubeVideoId": "YouTube-video-ID", + "youtubeVideoIdDescription": "De 11-tekens-ID uit de video-URL, bijv. \"dQw4w9WgXcQ\" in youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Testlink", + "imageUrl": "Omslagafbeelding", + "installBehavior": "Installatiegedrag", + "createInstallFolder": "Installeren in een aparte map", + "createInstallFolderDescription": "Plaatst elke geïnstalleerde bron in één nieuwe map die naar dit sjabloon is vernoemd.", + "defaultAutoUpdate": "Installaties standaard markeren voor updates", + "defaultAutoUpdateDescription": "Nieuwe installaties tonen een melding over een beschikbare update zodra je dit sjabloon opnieuw publiceert." }, "categories": { "flows": "Flows", - "customFields": "Custom fields", + "customFields": "Aangepaste velden", "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", + "products": "Producten", + "productCategories": "Productcategorieën", + "aiFunctions": "AI-functies", + "aiAgents": "AI-agents", + "calendars": "Afspraakkalenders", "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", + "keywords": "Trefwoorden", + "entryPointLinks": "Toegangspuntlinks", "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "fbCommentAutomations": "Facebook-reactieautomatiseringen", + "settings": "Instellingen" } }, "qrCodeGenerator": { @@ -4323,16 +4326,16 @@ "unavailableDescription": "Deze werkruimte is niet meer beschikbaar." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Deze link is niet meer beschikbaar.", + "invalidDescription": "Deze sjabloon-deellink is ongeldig, uitgeschakeld of verlopen.", + "byPublisher": "Door {publisherName}", + "includes": "Dit sjabloon bevat", + "tryItOut": "Probeer het", + "signInToInstall": "Log in om te installeren", + "selectWorkspace": "Selecteer een werkruimte", + "install": "Installeren", + "installStarted": "Installatie gestart", + "noEligibleWorkspaces": "Je hebt geen werkruimte die geschikt is om dit sjabloon te installeren." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/pt-BR.json b/apps/builder/messages/pt-BR.json index e999797b8..48f6d09e0 100644 --- a/apps/builder/messages/pt-BR.json +++ b/apps/builder/messages/pt-BR.json @@ -4159,53 +4159,56 @@ "title": "Modelos", "description": "Crie e gerencie seus modelos.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Compartilhar", + "enabled": "Compartilhado", + "disabled": "Não compartilhado", + "dialogTitle": "Compartilhar modelo", + "dialogDescription": "Qualquer pessoa com este link pode instalar uma cópia deste modelo em um espaço de trabalho da sua organização.", + "enableLabel": "Ativar link de compartilhamento", + "linkLabel": "Link de compartilhamento" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Instalações", + "resources": "Recursos", + "warnings": "Avisos", + "completedAt": "Concluído em", + "autoUpdate": "Atualização automática" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "Conteúdo do modelo", + "comingSoon": "Em breve", + "selectAll": "Selecionar tudo", + "selectedCount": "{count} selecionado(s)", + "details": "Detalhes", + "permissions": "Permissões padrão", + "allowEdit": "Permitir edição após a instalação", + "allowDelete": "Permitir exclusão após a instalação", + "publisherName": "Nome do publicador", + "youtubeVideoId": "ID do vídeo do YouTube", + "youtubeVideoIdDescription": "O ID de 11 caracteres da URL do vídeo, ex.: \"dQw4w9WgXcQ\" em youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Link de teste", + "imageUrl": "Imagem de capa", + "installBehavior": "Comportamento de instalação", + "createInstallFolder": "Instalar em uma pasta dedicada", + "createInstallFolderDescription": "Agrupa todos os recursos instalados em uma nova pasta com o nome deste modelo.", + "defaultAutoUpdate": "Marcar instalações para atualização por padrão", + "defaultAutoUpdateDescription": "Novas instalações mostrarão um aviso de atualização disponível sempre que você republicar este modelo." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", + "flows": "Fluxos", + "customFields": "Campos personalizados", "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", + "products": "Produtos", + "productCategories": "Categorias de produtos", + "aiFunctions": "Funções de IA", + "aiAgents": "Agentes de IA", + "calendars": "Calendários de compromissos", "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "keywords": "Palavras-chave", + "entryPointLinks": "Links de ponto de entrada", + "triggers": "Gatilhos", + "fbCommentAutomations": "Automações de comentários do Facebook", + "settings": "Configurações" } }, "qrCodeGenerator": { @@ -4323,16 +4326,16 @@ "unavailableDescription": "Este espaço de trabalho não está mais disponível." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Este link não está mais disponível.", + "invalidDescription": "Este link de compartilhamento do modelo é inválido, está desativado ou expirou.", + "byPublisher": "Por {publisherName}", + "includes": "Este modelo inclui", + "tryItOut": "Experimente", + "signInToInstall": "Faça login para instalar", + "selectWorkspace": "Selecione um espaço de trabalho", + "install": "Instalar", + "installStarted": "Instalação iniciada", + "noEligibleWorkspaces": "Você não tem um espaço de trabalho elegível para instalar este modelo." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/pt-PT.json b/apps/builder/messages/pt-PT.json index 5d9aeb65e..f9fcbabaf 100644 --- a/apps/builder/messages/pt-PT.json +++ b/apps/builder/messages/pt-PT.json @@ -4159,53 +4159,56 @@ "title": "Modelos", "description": "Crie e faça a gestão dos seus modelos.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Partilhar", + "enabled": "Partilhado", + "disabled": "Não partilhado", + "dialogTitle": "Partilhar modelo", + "dialogDescription": "Qualquer pessoa com esta ligação pode instalar uma cópia deste modelo num espaço de trabalho da sua organização.", + "enableLabel": "Ativar ligação de partilha", + "linkLabel": "Ligação de partilha" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Instalações", + "resources": "Recursos", + "warnings": "Avisos", + "completedAt": "Concluído em", + "autoUpdate": "Atualização automática" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "Conteúdo do modelo", + "comingSoon": "Brevemente", + "selectAll": "Selecionar tudo", + "selectedCount": "{count} selecionado(s)", + "details": "Detalhes", + "permissions": "Permissões predefinidas", + "allowEdit": "Permitir edição após a instalação", + "allowDelete": "Permitir eliminação após a instalação", + "publisherName": "Nome do publicador", + "youtubeVideoId": "ID do vídeo do YouTube", + "youtubeVideoIdDescription": "O ID de 11 caracteres do URL do vídeo, por ex. \"dQw4w9WgXcQ\" em youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Ligação de teste", + "imageUrl": "Imagem de capa", + "installBehavior": "Comportamento de instalação", + "createInstallFolder": "Instalar numa pasta dedicada", + "createInstallFolderDescription": "Agrupa todos os recursos instalados numa nova pasta com o nome deste modelo.", + "defaultAutoUpdate": "Marcar instalações para atualização por predefinição", + "defaultAutoUpdateDescription": "As novas instalações mostrarão um aviso de atualização disponível sempre que republicar este modelo." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", + "flows": "Fluxos", + "customFields": "Campos personalizados", + "tags": "Etiquetas", + "products": "Produtos", + "productCategories": "Categorias de produtos", + "aiFunctions": "Funções de IA", + "aiAgents": "Agentes de IA", + "calendars": "Calendários de marcações", "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "keywords": "Palavras-chave", + "entryPointLinks": "Ligações de ponto de entrada", + "triggers": "Acionadores", + "fbCommentAutomations": "Automatizações de comentários do Facebook", + "settings": "Definições" } }, "qrCodeGenerator": { @@ -4323,16 +4326,16 @@ "unavailableDescription": "Este espaço de trabalho já não está disponível." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Esta ligação já não está disponível.", + "invalidDescription": "Esta ligação de partilha de modelo é inválida, está desativada ou expirou.", + "byPublisher": "Por {publisherName}", + "includes": "Este modelo inclui", + "tryItOut": "Experimente", + "signInToInstall": "Inicie sessão para instalar", + "selectWorkspace": "Selecione um espaço de trabalho", + "install": "Instalar", + "installStarted": "Instalação iniciada", + "noEligibleWorkspaces": "Não tem nenhum espaço de trabalho elegível para instalar este modelo." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/ro.json b/apps/builder/messages/ro.json index 23a6a67a0..c423bcb9d 100644 --- a/apps/builder/messages/ro.json +++ b/apps/builder/messages/ro.json @@ -4694,53 +4694,56 @@ "description": "Creează și gestionează șabloanele tale.", "title": "Șabloane", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Distribuie", + "enabled": "Distribuit", + "disabled": "Nedistribuit", + "dialogTitle": "Distribuie șablonul", + "dialogDescription": "Oricine are acest link poate instala o copie a acestui șablon într-un spațiu de lucru din organizația ta.", + "enableLabel": "Activează linkul de distribuire", + "linkLabel": "Link de distribuire" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Instalări", + "resources": "Resurse", + "warnings": "Avertismente", + "completedAt": "Finalizat la", + "autoUpdate": "Actualizare automată" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "Conținutul șablonului", + "comingSoon": "În curând", + "selectAll": "Selectează tot", + "selectedCount": "{count} selectate", + "details": "Detalii", + "permissions": "Permisiuni implicite", + "allowEdit": "Permite editarea după instalare", + "allowDelete": "Permite ștergerea după instalare", + "publisherName": "Numele editorului", + "youtubeVideoId": "ID-ul videoclipului YouTube", + "youtubeVideoIdDescription": "ID-ul de 11 caractere din URL-ul videoclipului, de ex. \"dQw4w9WgXcQ\" în youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Link de test", + "imageUrl": "Imagine de copertă", + "installBehavior": "Comportament la instalare", + "createInstallFolder": "Instalează într-un folder dedicat", + "createInstallFolderDescription": "Grupează fiecare resursă instalată într-un singur folder nou, denumit după acest șablon.", + "defaultAutoUpdate": "Marchează instalările pentru actualizări în mod implicit", + "defaultAutoUpdateDescription": "Instalările noi vor afișa o notificare de actualizare disponibilă de fiecare dată când republici acest șablon." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", - "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "flows": "Fluxuri", + "customFields": "Câmpuri personalizate", + "tags": "Etichete", + "products": "Produse", + "productCategories": "Categorii de produse", + "aiFunctions": "Funcții AI", + "aiAgents": "Agenți AI", + "calendars": "Calendare de programări", + "webchats": "Chat-uri web", + "keywords": "Cuvinte cheie", + "entryPointLinks": "Linkuri de intrare", + "triggers": "Declanșatoare", + "fbCommentAutomations": "Automatizări comentarii Facebook", + "settings": "Setări" } }, "tiktok": { @@ -4757,16 +4760,16 @@ "unavailableTitle": "Dezabonare indisponibilă." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Acest link nu mai este disponibil.", + "invalidDescription": "Acest link de distribuire a șablonului este invalid, dezactivat sau expirat.", + "byPublisher": "De {publisherName}", + "includes": "Acest șablon include", + "tryItOut": "Încearcă-l", + "signInToInstall": "Autentifică-te pentru a instala", + "selectWorkspace": "Selectează un spațiu de lucru", + "install": "Instalează", + "installStarted": "Instalarea a început", + "noEligibleWorkspaces": "Nu ai niciun spațiu de lucru eligibil pentru a instala acest șablon." }, "bookingWebview": { "metadataTitle": "Programează o întâlnire", diff --git a/apps/builder/messages/sv.json b/apps/builder/messages/sv.json index d234b50b5..e8747c72d 100644 --- a/apps/builder/messages/sv.json +++ b/apps/builder/messages/sv.json @@ -4242,53 +4242,56 @@ "description": "Skapa och hantera dina mallar.", "title": "Mallar", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Dela", + "enabled": "Delad", + "disabled": "Inte delad", + "dialogTitle": "Dela mall", + "dialogDescription": "Alla med den här länken kan installera en kopia av den här mallen i en arbetsyta i din organisation.", + "enableLabel": "Aktivera dellänk", + "linkLabel": "Dellänk" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Installationer", + "resources": "Resurser", + "warnings": "Varningar", + "completedAt": "Slutförd", + "autoUpdate": "Automatisk uppdatering" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "Mallens innehåll", + "comingSoon": "Kommer snart", + "selectAll": "Markera alla", + "selectedCount": "{count} markerade", + "details": "Detaljer", + "permissions": "Standardbehörigheter", + "allowEdit": "Tillåt redigering efter installation", + "allowDelete": "Tillåt borttagning efter installation", + "publisherName": "Utgivarens namn", + "youtubeVideoId": "YouTube-video-id", + "youtubeVideoIdDescription": "Det 11-teckens id från videons URL, t.ex. \"dQw4w9WgXcQ\" i youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Testlänk", + "imageUrl": "Omslagsbild", + "installBehavior": "Installationsbeteende", + "createInstallFolder": "Installera i en dedikerad mapp", + "createInstallFolderDescription": "Placerar varje installerad resurs i en ny mapp uppkallad efter den här mallen.", + "defaultAutoUpdate": "Markera installationer för uppdatering som standard", + "defaultAutoUpdateDescription": "Nya installationer visar ett meddelande om tillgänglig uppdatering varje gång du publicerar om den här mallen." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", - "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "flows": "Flöden", + "customFields": "Anpassade fält", + "tags": "Taggar", + "products": "Produkter", + "productCategories": "Produktkategorier", + "aiFunctions": "AI-funktioner", + "aiAgents": "AI-agenter", + "calendars": "Bokningskalendrar", + "webchats": "Webbchattar", + "keywords": "Nyckelord", + "entryPointLinks": "Länkar till startpunkter", + "triggers": "Utlösare", + "fbCommentAutomations": "Facebook-kommentarautomatiseringar", + "settings": "Inställningar" } }, "texts": { @@ -4379,16 +4382,16 @@ "unavailableTitle": "Avregistrering är inte tillgänglig." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Den här länken är inte längre tillgänglig.", + "invalidDescription": "Den här mallens dellänk är ogiltig, inaktiverad eller har gått ut.", + "byPublisher": "Av {publisherName}", + "includes": "Den här mallen innehåller", + "tryItOut": "Prova den", + "signInToInstall": "Logga in för att installera", + "selectWorkspace": "Välj en arbetsyta", + "install": "Installera", + "installStarted": "Installationen har startat", + "noEligibleWorkspaces": "Du har ingen arbetsyta som är berättigad att installera den här mallen." }, "userPersistentMenus": { "title": "Beständiga användarmenyer" diff --git a/apps/builder/messages/tr.json b/apps/builder/messages/tr.json index b2b994131..187d79f3c 100644 --- a/apps/builder/messages/tr.json +++ b/apps/builder/messages/tr.json @@ -4159,53 +4159,56 @@ "title": "Şablonlar", "description": "Şablonlarınızı oluşturun ve yönetin.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Paylaş", + "enabled": "Paylaşıldı", + "disabled": "Paylaşılmadı", + "dialogTitle": "Şablonu paylaş", + "dialogDescription": "Bu bağlantıya sahip herkes, bu şablonun bir kopyasını kendi kuruluşunuzdaki bir çalışma alanına yükleyebilir.", + "enableLabel": "Paylaşım bağlantısını etkinleştir", + "linkLabel": "Paylaşım bağlantısı" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Yüklemeler", + "resources": "Kaynaklar", + "warnings": "Uyarılar", + "completedAt": "Tamamlanma tarihi", + "autoUpdate": "Otomatik güncelleme" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "Şablon içeriği", + "comingSoon": "Yakında", + "selectAll": "Tümünü seç", + "selectedCount": "{count} seçildi", + "details": "Ayrıntılar", + "permissions": "Varsayılan izinler", + "allowEdit": "Yüklemeden sonra düzenlemeye izin ver", + "allowDelete": "Yüklemeden sonra silmeye izin ver", + "publisherName": "Yayıncı adı", + "youtubeVideoId": "YouTube video kimliği", + "youtubeVideoIdDescription": "Video URL'sindeki 11 karakterli kimlik, ör. youtube.com/watch?v=dQw4w9WgXcQ içindeki \"dQw4w9WgXcQ\"", + "testLink": "Test bağlantısı", + "imageUrl": "Kapak görseli", + "installBehavior": "Yükleme davranışı", + "createInstallFolder": "Ayrılmış bir klasöre yükle", + "createInstallFolderDescription": "Yüklenen her kaynağı bu şablonun adını taşıyan tek bir yeni klasörün altına yerleştirir.", + "defaultAutoUpdate": "Yüklemeleri varsayılan olarak güncelleme için işaretle", + "defaultAutoUpdateDescription": "Bu şablonu her yeniden yayınladığınızda, yeni yüklemelerde güncelleme bildirimi gösterilir." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", - "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "flows": "Akışlar", + "customFields": "Özel Alanlar", + "tags": "Etiketler", + "products": "Ürünler", + "productCategories": "Ürün kategorileri", + "aiFunctions": "Yapay Zekâ İşlevleri", + "aiAgents": "Yapay Zekâ Temsilcileri", + "calendars": "Randevu Takvimleri", + "webchats": "Web Sohbetleri", + "keywords": "Anahtar Kelimeler", + "entryPointLinks": "Giriş Noktası Bağlantıları", + "triggers": "Tetikleyiciler", + "fbCommentAutomations": "Facebook yorum otomasyonları", + "settings": "Ayarlar" } }, "qrCodeGenerator": { @@ -4323,16 +4326,16 @@ "unavailableDescription": "Bu çalışma alanı artık kullanılamıyor." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Bu bağlantı artık kullanılamıyor.", + "invalidDescription": "Bu şablon paylaşım bağlantısı geçersiz, devre dışı bırakılmış veya süresi dolmuş.", + "byPublisher": "{publisherName} tarafından", + "includes": "Bu şablon şunları içerir", + "tryItOut": "Deneyin", + "signInToInstall": "Yüklemek için oturum açın", + "selectWorkspace": "Bir çalışma alanı seçin", + "install": "Yükle", + "installStarted": "Yükleme başladı", + "noEligibleWorkspaces": "Bu şablonu yüklemeye uygun bir çalışma alanınız yok." }, "extensionsMe": { "actions": { diff --git a/apps/builder/messages/vi.json b/apps/builder/messages/vi.json index 5e0ba1349..4363ab46e 100644 --- a/apps/builder/messages/vi.json +++ b/apps/builder/messages/vi.json @@ -4332,53 +4332,56 @@ "title": "Mẫu", "description": "Tạo và quản lý các mẫu của bạn.", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "Chia sẻ", + "enabled": "Đã chia sẻ", + "disabled": "Chưa chia sẻ", + "dialogTitle": "Chia sẻ mẫu", + "dialogDescription": "Bất kỳ ai có liên kết này đều có thể cài đặt một bản sao của mẫu này vào một workspace trong tổ chức của bạn.", + "enableLabel": "Bật liên kết chia sẻ", + "linkLabel": "Liên kết chia sẻ" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "Lượt cài đặt", + "resources": "Tài nguyên", + "warnings": "Cảnh báo", + "completedAt": "Hoàn tất lúc", + "autoUpdate": "Tự động cập nhật" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "Nội dung mẫu", + "comingSoon": "Sắp ra mắt", + "selectAll": "Chọn tất cả", + "selectedCount": "Đã chọn {count}", + "details": "Chi tiết", + "permissions": "Quyền mặc định", + "allowEdit": "Cho phép chỉnh sửa sau khi cài đặt", + "allowDelete": "Cho phép xóa sau khi cài đặt", + "publisherName": "Tên nhà xuất bản", + "youtubeVideoId": "ID video YouTube", + "youtubeVideoIdDescription": "ID gồm 11 ký tự lấy từ URL video, ví dụ \"dQw4w9WgXcQ\" trong youtube.com/watch?v=dQw4w9WgXcQ", + "testLink": "Liên kết thử nghiệm", + "imageUrl": "Ảnh bìa", + "installBehavior": "Hành vi khi cài đặt", + "createInstallFolder": "Cài đặt vào một thư mục riêng", + "createInstallFolderDescription": "Đưa mọi tài nguyên đã cài đặt vào một thư mục mới duy nhất, được đặt tên theo mẫu này.", + "defaultAutoUpdate": "Đánh dấu các lượt cài đặt cần cập nhật theo mặc định", + "defaultAutoUpdateDescription": "Các lượt cài đặt mới sẽ hiển thị thông báo có bản cập nhật mỗi khi bạn xuất bản lại mẫu này." }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", - "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "flows": "Luồng", + "customFields": "Trường tùy chỉnh", + "tags": "Thẻ", + "products": "Sản phẩm", + "productCategories": "Danh mục sản phẩm", + "aiFunctions": "AI Functions", + "aiAgents": "AI Agent", + "calendars": "Lịch hẹn", + "webchats": "Webchat", + "keywords": "Từ khóa", + "entryPointLinks": "Liên kết giới thiệu", + "triggers": "Trigger", + "fbCommentAutomations": "Tự động hóa bình luận Facebook", + "settings": "Cài đặt" } }, "qrCodeGenerator": { @@ -4500,16 +4503,16 @@ "unavailableDescription": "Không gian làm việc này không còn khả dụng." }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "Liên kết này không còn khả dụng.", + "invalidDescription": "Liên kết chia sẻ mẫu này không hợp lệ, đã bị vô hiệu hóa hoặc đã hết hạn.", + "byPublisher": "Bởi {publisherName}", + "includes": "Mẫu này bao gồm", + "tryItOut": "Dùng thử", + "signInToInstall": "Đăng nhập để cài đặt", + "selectWorkspace": "Chọn một workspace", + "install": "Cài đặt", + "installStarted": "Đã bắt đầu cài đặt", + "noEligibleWorkspaces": "Bạn không có workspace nào đủ điều kiện để cài đặt mẫu này." }, "bookingPage": { "metadataTitle": "Đặt lịch", diff --git a/apps/builder/messages/zh-CN.json b/apps/builder/messages/zh-CN.json index ea6edeae3..fc707492b 100644 --- a/apps/builder/messages/zh-CN.json +++ b/apps/builder/messages/zh-CN.json @@ -4239,56 +4239,59 @@ "title": "Telegram" }, "templates": { - "description": "创建并管理您的范本。", + "description": "创建和管理您的范本。", "title": "范本", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "分享", + "enabled": "已分享", + "disabled": "未分享", + "dialogTitle": "分享范本", + "dialogDescription": "任何拥有此链接的人都可以将此范本的副本安装到您所在租户的工作区中。", + "enableLabel": "启用分享链接", + "linkLabel": "分享链接" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "安装记录", + "resources": "资源", + "warnings": "警告", + "completedAt": "完成时间", + "autoUpdate": "自动更新" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "范本内容", + "comingSoon": "即将推出", + "selectAll": "全选", + "selectedCount": "已选择 {count} 项", + "details": "详情", + "permissions": "默认权限", + "allowEdit": "允许安装后编辑", + "allowDelete": "允许安装后删除", + "publisherName": "发布者名称", + "youtubeVideoId": "YouTube 视频 ID", + "youtubeVideoIdDescription": "视频 URL 中的 11 位字符 ID,例如 youtube.com/watch?v=dQw4w9WgXcQ 中的 \"dQw4w9WgXcQ\"", + "testLink": "测试链接", + "imageUrl": "封面图片", + "installBehavior": "安装行为", + "createInstallFolder": "安装到专属文件夹", + "createInstallFolderDescription": "将每个已安装的资源都归入一个以此范本命名的新文件夹中。", + "defaultAutoUpdate": "默认将安装标记为需要更新", + "defaultAutoUpdateDescription": "每次重新发布此范本时,新安装都会显示可用更新的提示。" }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", - "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "flows": "流程", + "customFields": "自订字段", + "tags": "标签", + "products": "产品", + "productCategories": "产品分类", + "aiFunctions": "人工智能功能", + "aiAgents": "AI Agent", + "calendars": "预约日历", + "webchats": "网络聊天", + "keywords": "关键字", + "entryPointLinks": "入口点链接", + "triggers": "触发器", + "fbCommentAutomations": "Facebook 评论自动化", + "settings": "设置" } }, "texts": { @@ -4379,16 +4382,16 @@ "unavailableTitle": "无法取消订阅。" }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "此链接已不再可用。", + "invalidDescription": "此范本分享链接无效、已禁用或已过期。", + "byPublisher": "发布者:{publisherName}", + "includes": "此范本包含", + "tryItOut": "立即体验", + "signInToInstall": "登录以安装", + "selectWorkspace": "选择一个工作区", + "install": "安装", + "installStarted": "安装已开始", + "noEligibleWorkspaces": "您没有可安装此范本的合适工作区。" }, "userPersistentMenus": { "title": "用户常驻菜单" diff --git a/apps/builder/messages/zh-TW.json b/apps/builder/messages/zh-TW.json index be417554e..fecaef01f 100644 --- a/apps/builder/messages/zh-TW.json +++ b/apps/builder/messages/zh-TW.json @@ -4192,53 +4192,56 @@ "title": "範本", "description": "建立並管理您的範本。", "share": { - "label": "Share", - "enabled": "Shared", - "disabled": "Not shared" + "label": "分享", + "enabled": "已分享", + "disabled": "未分享", + "dialogTitle": "分享範本", + "dialogDescription": "任何擁有此連結的人都可以將此範本的副本安裝到您所在租戶的工作區中。", + "enableLabel": "啟用分享連結", + "linkLabel": "分享連結" }, "installs": { - "title": "Installs", - "resources": "Resources", - "warnings": "Warnings", - "completedAt": "Completed at", - "autoUpdate": "Auto-update", - "updateNow": "Update now", - "updateStarted": "Update started" + "title": "安裝記錄", + "resources": "資源", + "warnings": "警告", + "completedAt": "完成時間", + "autoUpdate": "自動更新" }, "form": { - "contents": "Template contents", - "comingSoon": "Coming soon", - "selectAll": "Select all", - "selectedCount": "{count} selected", - "details": "Details", - "permissions": "Default permissions", - "allowEdit": "Allow editing after install", - "allowDelete": "Allow deleting after install", - "publisherName": "Publisher name", - "youtubeVideoId": "YouTube video ID", - "testLink": "Test link", - "imageUrl": "Cover image", - "installBehavior": "Install behavior", - "createInstallFolder": "Install into a dedicated folder", - "createInstallFolderDescription": "Nest every installed resource under one new folder named after this template.", - "defaultAutoUpdate": "Flag installs for updates by default", - "defaultAutoUpdateDescription": "New installs will show an update available notice whenever you republish this template." + "contents": "範本內容", + "comingSoon": "即將推出", + "selectAll": "全選", + "selectedCount": "已選取 {count} 項", + "details": "詳細資料", + "permissions": "預設權限", + "allowEdit": "允許安裝後編輯", + "allowDelete": "允許安裝後刪除", + "publisherName": "發布者名稱", + "youtubeVideoId": "YouTube 影片 ID", + "youtubeVideoIdDescription": "影片網址中的 11 位字元 ID,例如 youtube.com/watch?v=dQw4w9WgXcQ 中的 \"dQw4w9WgXcQ\"", + "testLink": "測試連結", + "imageUrl": "封面圖片", + "installBehavior": "安裝行為", + "createInstallFolder": "安裝到專屬資料夾", + "createInstallFolderDescription": "將每個已安裝的資源都歸入一個以此範本命名的新資料夾中。", + "defaultAutoUpdate": "預設將安裝標記為需要更新", + "defaultAutoUpdateDescription": "每次重新發布此範本時,新安裝都會顯示可用更新的提示。" }, "categories": { - "flows": "Flows", - "customFields": "Custom fields", - "tags": "Tags", - "products": "Products", - "productCategories": "Product categories", - "aiFunctions": "AI functions", - "aiAgents": "AI agents", - "calendars": "Calendars", - "webchats": "Webchats", - "keywords": "Keywords", - "entryPointLinks": "Entry point links", - "triggers": "Triggers", - "fbCommentAutomations": "Facebook comment automations", - "settings": "Settings" + "flows": "流程", + "customFields": "自訂欄位", + "tags": "標籤", + "products": "產品", + "productCategories": "產品分類", + "aiFunctions": "人工智慧功能", + "aiAgents": "AI Agent", + "calendars": "預約日曆", + "webchats": "網路聊天", + "keywords": "關鍵字", + "entryPointLinks": "入口點連結", + "triggers": "觸發器", + "fbCommentAutomations": "Facebook 留言自動化", + "settings": "設定" } }, "qrCodeGenerator": { @@ -4356,16 +4359,16 @@ "unavailableDescription": "此工作區不再可用。" }, "templatesPublicPage": { - "invalidTitle": "This link is no longer available.", - "invalidDescription": "This template share link is invalid, disabled, or has expired.", - "byPublisher": "By {publisherName}", - "includes": "This template includes", - "tryItOut": "Try it out", - "signInToInstall": "Sign in to install", - "selectWorkspace": "Select a workspace", - "install": "Install", - "installStarted": "Install started", - "noEligibleWorkspaces": "You don't have a workspace eligible to install this template." + "invalidTitle": "此連結已不再可用。", + "invalidDescription": "此範本分享連結無效、已停用或已過期。", + "byPublisher": "發布者:{publisherName}", + "includes": "此範本包含", + "tryItOut": "立即體驗", + "signInToInstall": "登入以安裝", + "selectWorkspace": "選擇一個工作區", + "install": "安裝", + "installStarted": "安裝已開始", + "noEligibleWorkspaces": "您沒有適合安裝此範本的工作區。" }, "extensionsMe": { "actions": { diff --git a/apps/builder/src/app/t/[shareToken]/page.tsx b/apps/builder/src/app/t/[shareToken]/page.tsx index 92cd2cfb0..740b83825 100644 --- a/apps/builder/src/app/t/[shareToken]/page.tsx +++ b/apps/builder/src/app/t/[shareToken]/page.tsx @@ -7,14 +7,41 @@ import { getTenantSettings } from "@/features/tenant/utils" import { hasWorkspacePermission } from "@/lib/auth/permission-routes" import { getCurrentUser } from "@/lib/auth/utils" -export const metadata: Metadata = { - title: "Template", -} - type PublicTemplatePageProps = { params: Promise<{ shareToken: string }> } +/** + * Runs the same lookup as the page body so a shared link gets a real OG + * preview — a disabled/expired/unknown token falls back to a generic title + * rather than leaking whether the token ever existed. + */ +export async function generateMetadata( + props: PublicTemplatePageProps, +): Promise { + const { shareToken } = await props.params + const [t, template, { storageUrl }] = await Promise.all([ + getTranslations("templatesPublicPage"), + templateService.findPublicByShareToken(shareToken), + getTenantSettings(), + ]) + if (!template) { + return { title: t("invalidTitle") } + } + const imageUrl = template.imageUrl + ? getPublicFileUrl(template.imageUrl, storageUrl) + : null + return { + title: template.name, + description: template.description ?? undefined, + openGraph: { + title: template.name, + description: template.description ?? undefined, + images: imageUrl ? [imageUrl] : undefined, + }, + } +} + /** * Every failure mode — bad token, disabled share, expired — collapses into * the same generic invalid-link message via one try/catch, mirroring @@ -70,6 +97,17 @@ export default async function PublicTemplatePage( {template.description ? (

{template.description}

) : null} + {template.youtubeVideoId ? ( +
+