From 0a60905587a5de96728f46fa62049eb05d0c498c Mon Sep 17 00:00:00 2001
From: Hung Phan Viet
Date: Tue, 18 Aug 2026 13:11:14 +0700
Subject: [PATCH 1/3] feat(coexist): add option to skip synced history for ai
context
---
.../__tests__/coexist-messenger-api.test.ts | 27 +-
apps/builder/__tests__/coexist-popup.test.tsx | 182 +
.../__tests__/coexist-whatsapp-api.test.ts | 77 +-
apps/builder/messages/ar.json | 2 +
apps/builder/messages/da.json | 2 +
apps/builder/messages/de.json | 2 +
apps/builder/messages/en.json | 2 +
apps/builder/messages/es.json | 2 +
apps/builder/messages/fi.json | 2 +
apps/builder/messages/fr.json | 2 +
apps/builder/messages/he.json | 2 +
apps/builder/messages/id.json | 2 +
apps/builder/messages/it.json | 2 +
apps/builder/messages/ja.json | 2 +
apps/builder/messages/nl.json | 2 +
apps/builder/messages/pt-BR.json | 2 +
apps/builder/messages/pt-PT.json | 2 +
apps/builder/messages/ro.json | 2 +
apps/builder/messages/sv.json | 2 +
apps/builder/messages/tr.json | 2 +
apps/builder/messages/vi.json | 2 +
apps/builder/messages/zh-CN.json | 2 +
apps/builder/messages/zh-TW.json | 2 +
.../integration-instagram/api/coexist.ts | 2 +
.../integration-messenger/api/coexist.ts | 4 +-
.../integration-whatsapp/api/coexist.ts | 12 +-
.../src/features/shared/coexist-popup.tsx | 22 +-
.../__tests__/bulk-historical-import.test.ts | 105 +-
.../__tests__/bulk-import-messages.test.ts | 345 +-
.../__tests__/coexist-instagram-sync.test.ts | 53 +
.../__tests__/coexist-messenger-sync.test.ts | 94 +-
.../__tests__/coexist-whatsapp-flush.test.ts | 30 +
.../coexist/bulk-historical-import.ts | 267 +-
.../handlers/coexist/instagram-sync.ts | 18 +-
.../handlers/coexist/messenger-sync.ts | 26 +-
.../handlers/coexist/whatsapp-flush.ts | 1 +
.../__tests__/conversation-service.test.ts | 213 +-
packages/business/src/coexist/service.ts | 4 +
packages/business/src/conversation/service.ts | 55 +
.../migration.sql | 3 +
.../snapshot.json | 36221 ++++++++++++++++
.../coexist-sync-run/repository.ts | 33 +-
.../src/schema/integration-instagram.ts | 1 +
.../src/schema/integration-messenger.ts | 1 +
.../src/schema/integration-whatsapp.ts | 1 +
45 files changed, 37623 insertions(+), 214 deletions(-)
create mode 100644 apps/builder/__tests__/coexist-popup.test.tsx
create mode 100644 packages/database/drizzle/20260818035559_coexist-skip-ai-context/migration.sql
create mode 100644 packages/database/drizzle/20260818035559_coexist-skip-ai-context/snapshot.json
diff --git a/apps/builder/__tests__/coexist-messenger-api.test.ts b/apps/builder/__tests__/coexist-messenger-api.test.ts
index 17dced017..42a59e401 100644
--- a/apps/builder/__tests__/coexist-messenger-api.test.ts
+++ b/apps/builder/__tests__/coexist-messenger-api.test.ts
@@ -74,7 +74,7 @@ describe("coexist APIs", () => {
mockDisable.mockResolvedValue({ success: true })
})
- test("Messenger enabled:true delegates to coexistService.enable", async () => {
+ test("Messenger enabled:true delegates to coexistService.enable with skipAiContext defaulted to false", async () => {
const result = await call(
integrationMessengerCoexistAPIs.setCoexistMessengerAPI,
{ workspaceId: "ws-1", integrationId: "int-1", enabled: true },
@@ -86,10 +86,32 @@ describe("coexist APIs", () => {
workspaceId: "ws-1",
integrationId: "int-1",
channel: "messenger",
+ skipAiContext: false,
})
expect(mockDisable).not.toHaveBeenCalled()
})
+ test("Messenger enabled:true, skipAiContext:true delegates it through to coexistService.enable", async () => {
+ const result = await call(
+ integrationMessengerCoexistAPIs.setCoexistMessengerAPI,
+ {
+ workspaceId: "ws-1",
+ integrationId: "int-1",
+ enabled: true,
+ skipAiContext: true,
+ },
+ { context: stubContext },
+ )
+
+ expect(result).toEqual({ success: true })
+ expect(mockEnable).toHaveBeenCalledWith({
+ workspaceId: "ws-1",
+ integrationId: "int-1",
+ channel: "messenger",
+ skipAiContext: true,
+ })
+ })
+
test("Messenger enabled:false delegates to coexistService.disable", async () => {
const result = await call(
integrationMessengerCoexistAPIs.setCoexistMessengerAPI,
@@ -105,7 +127,7 @@ describe("coexist APIs", () => {
})
})
- test("Instagram endpoint delegates with channel instagram", async () => {
+ test("Instagram endpoint delegates with channel instagram and skipAiContext defaulted to false", async () => {
const result = await call(
integrationInstagramCoexistAPIs.setCoexistInstagramAPI,
{ workspaceId: "ws-1", integrationId: "ig-1", enabled: true },
@@ -117,6 +139,7 @@ describe("coexist APIs", () => {
workspaceId: "ws-1",
integrationId: "ig-1",
channel: "instagram",
+ skipAiContext: false,
})
})
diff --git a/apps/builder/__tests__/coexist-popup.test.tsx b/apps/builder/__tests__/coexist-popup.test.tsx
new file mode 100644
index 000000000..c39b501e2
--- /dev/null
+++ b/apps/builder/__tests__/coexist-popup.test.tsx
@@ -0,0 +1,182 @@
+import type { ReactNode } from "react"
+import { act } from "react"
+import { createRoot, type Root } from "react-dom/client"
+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"
+
+// ---------------------------------------------------------------------------
+// Mocks
+// ---------------------------------------------------------------------------
+
+const { mockKyPost } = vi.hoisted(() => ({
+ mockKyPost: vi.fn(),
+}))
+
+/** Echoes the key back so assertions never depend on the English copy. */
+vi.mock("next-intl", () => ({
+ useTranslations: () => (key: string) => key,
+}))
+
+vi.mock("ky", () => ({
+ default: { post: mockKyPost },
+}))
+
+vi.mock("sonner", () => ({
+ toast: { error: vi.fn(), success: vi.fn() },
+}))
+
+vi.mock("@/lib/errors/client-handler", () => ({
+ clientErrorHandler: vi.fn(),
+}))
+
+vi.mock("@chatbotx.io/ui/components/ui/dialog", () => ({
+ Dialog: ({ children }: { children: ReactNode }) => {children}
,
+ DialogContent: ({ children }: { children: ReactNode }) => (
+ {children}
+ ),
+ DialogDescription: ({ children }: { children: ReactNode }) => (
+ {children}
+ ),
+ DialogFooter: ({ children }: { children: ReactNode }) => (
+ {children}
+ ),
+ DialogHeader: ({ children }: { children: ReactNode }) => (
+ {children}
+ ),
+ DialogTitle: ({ children }: { children: ReactNode }) => {children} ,
+}))
+
+// jsdom ships no ResizeObserver, and Radix measures the switch thumb through it.
+Object.assign(globalThis, {
+ ResizeObserver: class {
+ observe = vi.fn()
+ unobserve = vi.fn()
+ disconnect = vi.fn()
+ },
+})
+
+// jsdom ships no PointerEvent constructor; the Switch's click handler
+// re-dispatches one to drive its underlying .
+if (typeof globalThis.PointerEvent === "undefined") {
+ class PointerEventPolyfill extends MouseEvent {
+ constructor(type: string, params: MouseEventInit = {}) {
+ super(type, params)
+ }
+ }
+ Object.assign(globalThis, { PointerEvent: PointerEventPolyfill })
+}
+
+const { CoexistPopup } = await import("@/features/shared/coexist-popup")
+
+// ---------------------------------------------------------------------------
+// Tests
+// ---------------------------------------------------------------------------
+
+describe("CoexistPopup", () => {
+ let container: HTMLDivElement
+ let root: Root
+ const onDone = vi.fn()
+
+ beforeEach(() => {
+ vi.clearAllMocks()
+ Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true })
+ container = document.createElement("div")
+ document.body.append(container)
+ root = createRoot(container)
+ mockKyPost.mockReturnValue({
+ json: vi.fn().mockResolvedValue({ success: true }),
+ })
+
+ act(() => {
+ root.render(
+ ,
+ )
+ })
+ })
+
+ afterEach(() => {
+ act(() => {
+ root.unmount()
+ })
+ container.remove()
+ })
+
+ const switchEl = () =>
+ container.querySelector('[role="switch"]')
+ const enableButton = () =>
+ Array.from(container.querySelectorAll("button")).find((button) =>
+ button.textContent?.includes("coexist.enable"),
+ )
+ const declineButton = () =>
+ Array.from(container.querySelectorAll("button")).find((button) =>
+ button.textContent?.includes("coexist.decline"),
+ )
+
+ test("renders the skip-AI-context switch defaulted OFF", () => {
+ expect(switchEl()).not.toBeNull()
+ expect(switchEl()?.getAttribute("aria-checked")).toBe("false")
+ })
+
+ test("POSTs skipAiContext: false by default when confirming enable", async () => {
+ await act(async () => {
+ enableButton()?.click()
+ await Promise.resolve()
+ })
+
+ expect(mockKyPost).toHaveBeenCalledWith(
+ expect.any(String),
+ expect.objectContaining({
+ json: expect.objectContaining({
+ workspaceId: "ws-1",
+ integrationId: "int-1",
+ enabled: true,
+ skipAiContext: false,
+ }),
+ }),
+ )
+ })
+
+ test("POSTs skipAiContext: true after toggling the switch on", async () => {
+ act(() => {
+ switchEl()?.click()
+ })
+ expect(switchEl()?.getAttribute("aria-checked")).toBe("true")
+
+ await act(async () => {
+ enableButton()?.click()
+ await Promise.resolve()
+ })
+
+ expect(mockKyPost).toHaveBeenCalledWith(
+ expect.any(String),
+ expect.objectContaining({
+ json: expect.objectContaining({ skipAiContext: true }),
+ }),
+ )
+ })
+
+ test("POSTs skipAiContext in the decline body too (enabled: false)", async () => {
+ act(() => {
+ switchEl()?.click()
+ })
+
+ await act(async () => {
+ declineButton()?.click()
+ await Promise.resolve()
+ })
+
+ expect(mockKyPost).toHaveBeenCalledWith(
+ expect.any(String),
+ expect.objectContaining({
+ json: expect.objectContaining({
+ enabled: false,
+ skipAiContext: true,
+ }),
+ }),
+ )
+ })
+})
diff --git a/apps/builder/__tests__/coexist-whatsapp-api.test.ts b/apps/builder/__tests__/coexist-whatsapp-api.test.ts
index 989999b86..9b1c3e03a 100644
--- a/apps/builder/__tests__/coexist-whatsapp-api.test.ts
+++ b/apps/builder/__tests__/coexist-whatsapp-api.test.ts
@@ -167,7 +167,11 @@ describe("setCoexistWhatsappAPI", () => {
// Flag flipped on via the atomic UPDATE … RETURNING (one update on success).
expect(db.update).toHaveBeenCalledTimes(1)
- expect(dbUpdateBuilder.set).toHaveBeenCalledWith({ coexistEnabled: true })
+ // skipAiContext defaults to false (zod default) and is written on enable.
+ expect(dbUpdateBuilder.set).toHaveBeenCalledWith({
+ coexistEnabled: true,
+ coexistSkipAiContext: false,
+ })
// CoexistSyncRun insert with the init-row values.
expect(db.insert).toHaveBeenCalledTimes(1)
@@ -188,6 +192,25 @@ describe("setCoexistWhatsappAPI", () => {
expect(mockQueueAdd).not.toHaveBeenCalled()
})
+ test("enabled:true, skipAiContext:true — writes coexistSkipAiContext alongside coexistEnabled", async () => {
+ const result = await call(
+ procedure,
+ {
+ workspaceId: "ws-1",
+ integrationId: "int-1",
+ enabled: true,
+ skipAiContext: true,
+ },
+ { context: stubContext },
+ )
+
+ expect(result).toEqual({ success: true })
+ expect(dbUpdateBuilder.set).toHaveBeenCalledWith({
+ coexistEnabled: true,
+ coexistSkipAiContext: true,
+ })
+ })
+
test("enabled:false — flag-only: flips coexistEnabled, no run insert, no delete, no job", async () => {
const result = await call(
procedure,
@@ -208,6 +231,24 @@ describe("setCoexistWhatsappAPI", () => {
expect(mockQueueAdd).not.toHaveBeenCalled()
})
+ test("enabled:false (decline) — never writes coexistSkipAiContext, even when the popup sent skipAiContext:true", async () => {
+ const result = await call(
+ procedure,
+ {
+ workspaceId: "ws-1",
+ integrationId: "int-1",
+ enabled: false,
+ skipAiContext: true,
+ },
+ { context: stubContext },
+ )
+
+ expect(result).toEqual({ success: true })
+ // The UPDATE runs BEFORE the `if (enabled)` branch — decline must never
+ // write coexistSkipAiContext, regardless of what the popup sent.
+ expect(dbUpdateBuilder.set).toHaveBeenCalledWith({ coexistEnabled: false })
+ })
+
test("enabled:true — surfaces failure reason and marks the run failed when smb_app_data fails", async () => {
// smb_app_state_sync fails → handler returns the reason and marks the run.
mockTriggerSmbAppDataSync
@@ -294,6 +335,40 @@ describe("i18n key presence (H12)", () => {
).toBeDefined()
})
+ test("coexist.skipAiContextLabel is defined in en.json and vi.json", () => {
+ expect(
+ (
+ enMessages as unknown as Record & {
+ coexist: Record
+ }
+ ).coexist.skipAiContextLabel,
+ ).toBeDefined()
+ expect(
+ (
+ viMessages as unknown as Record & {
+ coexist: Record
+ }
+ ).coexist.skipAiContextLabel,
+ ).toBeDefined()
+ })
+
+ test("coexist.skipAiContextHelper is defined in en.json and vi.json", () => {
+ expect(
+ (
+ enMessages as unknown as Record & {
+ coexist: Record
+ }
+ ).coexist.skipAiContextHelper,
+ ).toBeDefined()
+ expect(
+ (
+ viMessages as unknown as Record & {
+ coexist: Record
+ }
+ ).coexist.skipAiContextHelper,
+ ).toBeDefined()
+ })
+
test("whatsapp.fillRequiredFields is defined in en.json and vi.json", () => {
expect(
(
diff --git a/apps/builder/messages/ar.json b/apps/builder/messages/ar.json
index a4b24d0d1..cc46a29c4 100644
--- a/apps/builder/messages/ar.json
+++ b/apps/builder/messages/ar.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "لا تنجح إعادة التفعيل إلا إذا كانت Meta لا تزال تحتفظ بالبيانات مؤقتًا (خلال 24 ساعة من الإعداد). وإلا، فاقطع الاتصال ثم أعده.",
"toggleHelperMessenger": "لا تنجح إعادة التفعيل إلا إذا كانت Meta لا تزال تحتفظ بالبيانات مؤقتًا (خلال 24 ساعة من الإعداد). وإلا، فاقطع اتصال صفحة Messenger ثم أعده.",
"toggleHelperWhatsapp": "لا تنجح إعادة التفعيل إلا إذا كانت Meta لا تزال تحتفظ بالبيانات مؤقتًا (خلال 24 ساعة من الإعداد). وإلا، فاقطع اتصال رقم WhatsApp ثم أعده.",
+ "skipAiContextLabel": "يتجاهل الذكاء الاصطناعي السجل المتزامن",
+ "skipAiContextHelper": "عند التفعيل، يتجاهل الذكاء الاصطناعي الرسائل المستوردة من هذه المزامنة ويأخذ في الاعتبار الرسائل الجديدة فقط.",
"success": {
"enabled": "بدأت المزامنة. ستظهر جهات الاتصال والرسائل السابقة قريبًا.",
"disabled": "تم تعطيل المزامنة."
diff --git a/apps/builder/messages/da.json b/apps/builder/messages/da.json
index 49638c773..6a7e48459 100644
--- a/apps/builder/messages/da.json
+++ b/apps/builder/messages/da.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "Re-enabling kun works hvis Meta har buffered data (within 24 timer af onboarding). Otherwise afbryd og forbind igen.",
"toggleHelperMessenger": "Re-enabling kun works hvis Meta har buffered data (within 24 timer af onboarding). Otherwise afbryd og forbind igen den Messenger page.",
"toggleHelperWhatsapp": "Re-enabling kun works hvis Meta har buffered data (within 24 timer af onboarding). Otherwise afbryd og forbind igen den WhatsApp nummer.",
+ "skipAiContextLabel": "AI springer synket historik over",
+ "skipAiContextHelper": "Når dette er slået til, ignorerer AI'en beskeder importeret af denne synkronisering og overvejer kun nye beskeder.",
"success": {
"enabled": "Synkroniser started. Historical kontakter og beskeder vil appear shortly.",
"disabled": "Synkroniser deaktiveret."
diff --git a/apps/builder/messages/de.json b/apps/builder/messages/de.json
index b559606eb..93f15e2d6 100644
--- a/apps/builder/messages/de.json
+++ b/apps/builder/messages/de.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "Eine erneute Aktivierung funktioniert nur, wenn Meta Daten gepuffert hat (innerhalb von 24 Stunden nach dem Onboarding). Andernfalls trennen und erneut verbinden.",
"toggleHelperMessenger": "Eine erneute Aktivierung funktioniert nur, wenn Meta Daten gepuffert hat (innerhalb von 24 Stunden nach dem Onboarding). Andernfalls die Messenger-Seite trennen und erneut verbinden.",
"toggleHelperWhatsapp": "Eine erneute Aktivierung funktioniert nur, wenn Meta Daten gepuffert hat (innerhalb von 24 Stunden nach dem Onboarding). Andernfalls die WhatsApp-Nummer trennen und erneut verbinden.",
+ "skipAiContextLabel": "KI ignoriert Synchronverlauf",
+ "skipAiContextHelper": "Wenn aktiviert, ignoriert die KI die durch diese Synchronisierung importierten Nachrichten und berücksichtigt nur neue Nachrichten.",
"success": {
"enabled": "Synchronisierung gestartet. Historische Kontakte und Nachrichten werden in Kürze angezeigt.",
"disabled": "Synchronisierung deaktiviert."
diff --git a/apps/builder/messages/en.json b/apps/builder/messages/en.json
index 637f4f244..7ae0e3433 100644
--- a/apps/builder/messages/en.json
+++ b/apps/builder/messages/en.json
@@ -3041,6 +3041,8 @@
"toggleHelper": "Re-enabling only works if Meta has buffered data (within 24 hours of onboarding). Otherwise disconnect and reconnect.",
"toggleHelperMessenger": "Re-enabling only works if Meta has buffered data (within 24 hours of onboarding). Otherwise disconnect and reconnect the Messenger page.",
"toggleHelperWhatsapp": "Re-enabling only works if Meta has buffered data (within 24 hours of onboarding). Otherwise disconnect and reconnect the WhatsApp number.",
+ "skipAiContextLabel": "AI skips synced history",
+ "skipAiContextHelper": "When on, the AI ignores messages imported by this sync and only considers new messages.",
"success": {
"enabled": "Sync started. Historical contacts and messages will appear shortly.",
"disabled": "Sync disabled."
diff --git a/apps/builder/messages/es.json b/apps/builder/messages/es.json
index 85ef11e6d..97207abbd 100644
--- a/apps/builder/messages/es.json
+++ b/apps/builder/messages/es.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "Re-enabling only works si Meta tiene buffered datos (within 24 horas de onboarding). Otherwise Desconectar y reconnect.",
"toggleHelperMessenger": "Re-enabling only works si Meta tiene buffered datos (within 24 horas de onboarding). Otherwise Desconectar y reConectar el Messenger página.",
"toggleHelperWhatsapp": "Re-enabling only works si Meta tiene buffered datos (within 24 horas de onboarding). Otherwise Desconectar y reConectar el WhatsApp number.",
+ "skipAiContextLabel": "La IA omite el historial sincronizado",
+ "skipAiContextHelper": "Cuando está activado, la IA ignora los mensajes importados por esta sincronización y solo considera los mensajes nuevos.",
"success": {
"enabled": "Sync started. Historical contactoos y mensajes se appear shortly.",
"disabled": "Sync desactivado."
diff --git a/apps/builder/messages/fi.json b/apps/builder/messages/fi.json
index a02cd6336..bc318806f 100644
--- a/apps/builder/messages/fi.json
+++ b/apps/builder/messages/fi.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "Uudelleen käyttöönotto toimii vain, jos Metalla on puskuroidut tiedot (24 tunnin kuluessa käyttöönotosta). Muussa tapauksessa katkaise yhteys ja yhdistä uudelleen.",
"toggleHelperMessenger": "Uudelleen käyttöönotto toimii vain, jos Metalla on puskuroidut tiedot (24 tunnin kuluessa käyttöönotosta). Muussa tapauksessa katkaise Messenger-sivun yhteys ja yhdistä uudelleen.",
"toggleHelperWhatsapp": "Uudelleen käyttöönotto toimii vain, jos Metalla on puskuroidut tiedot (24 tunnin kuluessa käyttöönotosta). Muussa tapauksessa katkaise WhatsApp-numeron yhteys ja yhdistä uudelleen.",
+ "skipAiContextLabel": "Tekoäly ohittaa synkronoidun historian",
+ "skipAiContextHelper": "Kun tämä on käytössä, tekoäly jättää huomiotta tämän synkronoinnin tuomat viestit ja ottaa huomioon vain uudet viestit.",
"success": {
"enabled": "Synkronointi aloitettu. Historialliset yhteystiedot ja viestit tulevat pian näkyviin.",
"disabled": "Synkronointi poistettu käytöstä."
diff --git a/apps/builder/messages/fr.json b/apps/builder/messages/fr.json
index 2428b2005..cc4c481a5 100644
--- a/apps/builder/messages/fr.json
+++ b/apps/builder/messages/fr.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "La réactivation ne fonctionne que si Meta dispose encore de données en mémoire tampon, dans les 24 heures suivant l’intégration. Sinon, déconnectez et reconnectez.",
"toggleHelperMessenger": "La réactivation ne fonctionne que si Meta dispose encore de données en mémoire tampon, dans les 24 heures suivant l’intégration. Sinon, déconnectez et reconnectez la page Messenger.",
"toggleHelperWhatsapp": "La réactivation ne fonctionne que si Meta dispose encore de données en mémoire tampon, dans les 24 heures suivant l’intégration. Sinon, déconnectez et reconnectez le numéro WhatsApp.",
+ "skipAiContextLabel": "L'IA ignore l'historique synchronisé",
+ "skipAiContextHelper": "Lorsque cette option est activée, l'IA ignore les messages importés par cette synchronisation et ne prend en compte que les nouveaux messages.",
"success": {
"enabled": "Synchronisation démarrée. Les anciens contacts et messages apparaîtront prochainement.",
"disabled": "Synchronisation désactivée."
diff --git a/apps/builder/messages/he.json b/apps/builder/messages/he.json
index 5bef2bb0f..9a0d84d92 100644
--- a/apps/builder/messages/he.json
+++ b/apps/builder/messages/he.json
@@ -1319,6 +1319,8 @@
"toggleHelper": "הפעלה מחדש פועלת רק אם Meta שמרה נתונים במאגר (בתוך 24 שעות מההצטרפות). אחרת יש לנתק ולחבר מחדש.",
"toggleHelperMessenger": "הפעלה מחדש פועלת רק אם Meta שמרה נתונים במאגר (בתוך 24 שעות מההצטרפות). אחרת יש לנתק ולחבר מחדש את דף Messenger.",
"toggleHelperWhatsapp": "הפעלה מחדש פועלת רק אם Meta שמרה נתונים במאגר (בתוך 24 שעות מההצטרפות). אחרת יש לנתק ולחבר מחדש את מספר WhatsApp.",
+ "skipAiContextLabel": "ה-AI מדלג על היסטוריה מסונכרנת",
+ "skipAiContextHelper": "כאשר האפשרות פעילה, ה-AI מתעלם מהודעות שיובאו על ידי סנכרון זה ומתחשב רק בהודעות חדשות.",
"success": {
"enabled": "הסנכרון התחיל. אנשי קשר והודעות היסטוריים יופיעו בקרוב.",
"disabled": "הסנכרון הושבת."
diff --git a/apps/builder/messages/id.json b/apps/builder/messages/id.json
index 5598f79a4..ed5c6d539 100644
--- a/apps/builder/messages/id.json
+++ b/apps/builder/messages/id.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "Pengaktifan kembali hanya berfungsi jika Meta masih menyimpan data (dalam 24 jam sejak orientasi). Jika tidak, putuskan lalu hubungkan kembali.",
"toggleHelperMessenger": "Pengaktifan kembali hanya berfungsi jika Meta masih menyimpan data (dalam 24 jam sejak orientasi). Jika tidak, putuskan lalu hubungkan kembali halaman Messenger.",
"toggleHelperWhatsapp": "Pengaktifan kembali hanya berfungsi jika Meta masih menyimpan data (dalam 24 jam sejak orientasi). Jika tidak, putuskan lalu hubungkan kembali nomor WhatsApp.",
+ "skipAiContextLabel": "AI melewati riwayat sinkronisasi",
+ "skipAiContextHelper": "Jika diaktifkan, AI akan mengabaikan pesan yang diimpor oleh sinkronisasi ini dan hanya mempertimbangkan pesan baru.",
"success": {
"enabled": "Sinkronisasi dimulai. Kontak dan pesan historis akan segera muncul.",
"disabled": "Sinkronisasi dinonaktifkan."
diff --git a/apps/builder/messages/it.json b/apps/builder/messages/it.json
index 442a5a5b5..cc83b9b86 100644
--- a/apps/builder/messages/it.json
+++ b/apps/builder/messages/it.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "La riattivazione funziona solo se Meta dispone ancora dei dati nel buffer (entro 24 ore dall'onboarding). In caso contrario, disconnetti e riconnetti.",
"toggleHelperMessenger": "La riattivazione funziona solo se Meta dispone ancora dei dati nel buffer (entro 24 ore dall'onboarding). In caso contrario, disconnetti e riconnetti la Pagina Messenger.",
"toggleHelperWhatsapp": "La riattivazione funziona solo se Meta dispone ancora dei dati nel buffer (entro 24 ore dall'onboarding). In caso contrario, disconnetti e riconnetti il numero WhatsApp.",
+ "skipAiContextLabel": "L'IA ignora la cronologia sincronizzata",
+ "skipAiContextHelper": "Se attivo, l'IA ignora i messaggi importati da questa sincronizzazione e considera solo i nuovi messaggi.",
"success": {
"enabled": "Sincronizzazione avviata. I contatti e i messaggi storici appariranno a breve.",
"disabled": "Sincronizzazione disattivata."
diff --git a/apps/builder/messages/ja.json b/apps/builder/messages/ja.json
index 553002ff0..51d0d88f4 100644
--- a/apps/builder/messages/ja.json
+++ b/apps/builder/messages/ja.json
@@ -2929,6 +2929,8 @@
"toggleHelper": "再有効化できるのは、Metaにバッファーデータが残っている場合(オンボーディング後24時間以内)のみです。それ以外の場合は切断して再接続してください。",
"toggleHelperMessenger": "再有効化できるのは、Metaにバッファーデータが残っている場合(オンボーディング後24時間以内)のみです。それ以外の場合はMessengerページを切断して再接続してください。",
"toggleHelperWhatsapp": "再有効化できるのは、Metaにバッファーデータが残っている場合(オンボーディング後24時間以内)のみです。それ以外の場合はWhatsApp番号を切断して再接続してください。",
+ "skipAiContextLabel": "AIは同期履歴をスキップ",
+ "skipAiContextHelper": "オンにすると、AIはこの同期でインポートされたメッセージを無視し、新しいメッセージのみを考慮します。",
"success": {
"enabled": "同期を開始しました。過去の連絡先とメッセージはまもなく表示されます。",
"disabled": "同期を無効にしました。"
diff --git a/apps/builder/messages/nl.json b/apps/builder/messages/nl.json
index f53ca23bc..1acd7a3c4 100644
--- a/apps/builder/messages/nl.json
+++ b/apps/builder/messages/nl.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "Opnieuw inschakelen werkt alleen als Meta gegevens heeft gebufferd (binnen 24 uur na onboarding). Koppel anders los en opnieuw.",
"toggleHelperMessenger": "Opnieuw inschakelen werkt alleen als Meta gegevens heeft gebufferd (binnen 24 uur na onboarding). Koppel anders de Messenger-pagina los en opnieuw.",
"toggleHelperWhatsapp": "Opnieuw inschakelen werkt alleen als Meta gegevens heeft gebufferd (binnen 24 uur na onboarding). Koppel anders het WhatsApp-nummer los en opnieuw.",
+ "skipAiContextLabel": "AI slaat gesynchroniseerde geschiedenis over",
+ "skipAiContextHelper": "Indien ingeschakeld, negeert de AI berichten die door deze synchronisatie zijn geïmporteerd en houdt alleen rekening met nieuwe berichten.",
"success": {
"enabled": "Synchronisatie gestart. Historische contacten en berichten verschijnen binnenkort.",
"disabled": "Synchronisatie uitgeschakeld."
diff --git a/apps/builder/messages/pt-BR.json b/apps/builder/messages/pt-BR.json
index 22bf314b1..30403f1c4 100644
--- a/apps/builder/messages/pt-BR.json
+++ b/apps/builder/messages/pt-BR.json
@@ -2929,6 +2929,8 @@
"toggleHelper": "A reativação só funciona se a Meta tiver dados armazenados em buffer (dentro de 24 horas após a integração). Caso contrário, desconecte e reconecte.",
"toggleHelperMessenger": "A reativação só funciona se a Meta tiver dados armazenados em buffer (dentro de 24 horas após a integração). Caso contrário, desconecte e reconecte a página do Messenger.",
"toggleHelperWhatsapp": "A reativação só funciona se a Meta tiver dados armazenados em buffer (dentro de 24 horas após a integração). Caso contrário, desconecte e reconecte o número do WhatsApp.",
+ "skipAiContextLabel": "A IA ignora o histórico sincronizado",
+ "skipAiContextHelper": "Quando ativado, a IA ignora as mensagens importadas por esta sincronização e considera apenas as novas mensagens.",
"success": {
"enabled": "Sincronização iniciada. Os contatos e as mensagens do histórico aparecerão em breve.",
"disabled": "Sincronização desativada."
diff --git a/apps/builder/messages/pt-PT.json b/apps/builder/messages/pt-PT.json
index e2b1605ae..f42ccadcb 100644
--- a/apps/builder/messages/pt-PT.json
+++ b/apps/builder/messages/pt-PT.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "A reativação só funciona se a Meta tiver dados em memória intermédia (nas 24 horas após a integração). Caso contrário, desligue e volte a ligar.",
"toggleHelperMessenger": "A reativação só funciona se a Meta tiver dados em memória intermédia (nas 24 horas após a integração). Caso contrário, desligue e volte a ligar a página do Messenger.",
"toggleHelperWhatsapp": "A reativação só funciona se a Meta tiver dados em memória intermédia (nas 24 horas após a integração). Caso contrário, desligue e volte a ligar o número do WhatsApp.",
+ "skipAiContextLabel": "A IA ignora o histórico sincronizado",
+ "skipAiContextHelper": "Quando ativado, a IA ignora as mensagens importadas por esta sincronização e considera apenas as mensagens novas.",
"success": {
"enabled": "Sincronização iniciada. Os contactos e as mensagens do histórico aparecerão em breve.",
"disabled": "Sincronização desativada."
diff --git a/apps/builder/messages/ro.json b/apps/builder/messages/ro.json
index 218995afc..d68a04f85 100644
--- a/apps/builder/messages/ro.json
+++ b/apps/builder/messages/ro.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "Reactivarea funcționează doar dacă Meta are date puse în tampon (în 24 de ore de la conectare). În caz contrar, deconectează și reconectează.",
"toggleHelperMessenger": "Reactivarea funcționează doar dacă Meta are date puse în tampon (în 24 de ore de la conectare). În caz contrar, deconectează și reconectează pagina Messenger.",
"toggleHelperWhatsapp": "Reactivarea funcționează doar dacă Meta are date puse în tampon (în 24 de ore de la conectare). În caz contrar, deconectează și reconectează numărul WhatsApp.",
+ "skipAiContextLabel": "AI ignoră istoricul sincronizat",
+ "skipAiContextHelper": "Când este activat, AI-ul ignoră mesajele importate prin această sincronizare și ia în considerare doar mesajele noi.",
"success": {
"enabled": "Sincronizarea a început. Contactele și mesajele istorice vor apărea în curând.",
"disabled": "Sincronizare dezactivată."
diff --git a/apps/builder/messages/sv.json b/apps/builder/messages/sv.json
index ed3f4b918..8cb14d65f 100644
--- a/apps/builder/messages/sv.json
+++ b/apps/builder/messages/sv.json
@@ -610,6 +610,8 @@
"toggleHelper": "Återaktivering fungerar endast om Meta har buffrad data (inom 24 timmar efter introduktionen). Annars behöver du koppla från och återansluta.",
"toggleHelperMessenger": "Återaktivering fungerar endast om Meta har buffrad data (inom 24 timmar efter introduktionen). Annars behöver du koppla från och återansluta Messenger-sidan.",
"toggleHelperWhatsapp": "Återaktivering fungerar endast om Meta har buffrad data (inom 24 timmar efter introduktionen). Annars behöver du koppla från och återansluta WhatsApp-numret.",
+ "skipAiContextLabel": "AI hoppar över synkad historik",
+ "skipAiContextHelper": "När det är aktiverat ignorerar AI:n meddelanden som importerats av denna synkronisering och tar endast hänsyn till nya meddelanden.",
"toggleLabel": "Synkronisera befintliga kontakter och chatthistorik"
},
"condition": {
diff --git a/apps/builder/messages/tr.json b/apps/builder/messages/tr.json
index b79bcd3db..a6b97def6 100644
--- a/apps/builder/messages/tr.json
+++ b/apps/builder/messages/tr.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "Yeniden etkinleştirme yalnızca Meta'da arabelleğe alınmış veri varsa (katılımdan itibaren 24 saat içinde) çalışır. Aksi halde bağlantıyı kesip yeniden bağlayın.",
"toggleHelperMessenger": "Yeniden etkinleştirme yalnızca Meta'da arabelleğe alınmış veri varsa (katılımdan itibaren 24 saat içinde) çalışır. Aksi halde Messenger sayfasının bağlantısını kesip yeniden bağlayın.",
"toggleHelperWhatsapp": "Yeniden etkinleştirme yalnızca Meta'da arabelleğe alınmış veri varsa (katılımdan itibaren 24 saat içinde) çalışır. Aksi halde WhatsApp numarasının bağlantısını kesip yeniden bağlayın.",
+ "skipAiContextLabel": "AI senkronize geçmişi atlar",
+ "skipAiContextHelper": "Açıkken, yapay zeka bu senkronizasyonla içe aktarılan mesajları yok sayar ve yalnızca yeni mesajları dikkate alır.",
"success": {
"enabled": "Senkronizasyon başlatıldı. Geçmiş kişiler ve mesajlar kısa süre içinde görünecek.",
"disabled": "Senkronizasyon devre dışı bırakıldı."
diff --git a/apps/builder/messages/vi.json b/apps/builder/messages/vi.json
index 2a7c959ee..acc55f6f1 100644
--- a/apps/builder/messages/vi.json
+++ b/apps/builder/messages/vi.json
@@ -2945,6 +2945,8 @@
"toggleHelper": "Bật lại chỉ hoạt động nếu Meta còn đệm dữ liệu (trong vòng 24 giờ kể từ khi onboarding). Nếu không, hãy ngắt kết nối và kết nối lại.",
"toggleHelperMessenger": "Bật lại chỉ hoạt động nếu Meta còn đệm dữ liệu (trong vòng 24 giờ kể từ khi onboarding). Nếu không, hãy ngắt kết nối và kết nối lại trang Messenger.",
"toggleHelperWhatsapp": "Bật lại chỉ hoạt động nếu Meta còn đệm dữ liệu (trong vòng 24 giờ kể từ khi onboarding). Nếu không, hãy ngắt kết nối và kết nối lại số WhatsApp.",
+ "skipAiContextLabel": "AI bỏ qua lịch sử đồng bộ",
+ "skipAiContextHelper": "Khi bật, AI bỏ qua tin nhắn được nhập từ lần đồng bộ này và chỉ xét tin nhắn mới.",
"success": {
"enabled": "Đã bắt đầu đồng bộ. Liên hệ và tin nhắn lịch sử sẽ xuất hiện sớm.",
"disabled": "Đã tắt đồng bộ."
diff --git a/apps/builder/messages/zh-CN.json b/apps/builder/messages/zh-CN.json
index a875cf8eb..3685bfd35 100644
--- a/apps/builder/messages/zh-CN.json
+++ b/apps/builder/messages/zh-CN.json
@@ -775,6 +775,8 @@
"toggleHelper": "仅当Meta 有缓冲数据时(启动后 24 小时内),重新激活才有效。否则断开并重新连接。",
"toggleHelperMessenger": "仅当Meta 有缓冲数据时(启动后 24 小时内),重新激活才有效。否则断开并重新连接Messenger页面。",
"toggleHelperWhatsapp": "仅当Meta 有缓冲数据时(启动后 24 小时内),重新激活才有效。否则,请断开并重新连接WhatsApp号码。",
+ "skipAiContextLabel": "AI 跳过同步历史",
+ "skipAiContextHelper": "开启后,AI 将忽略此次同步导入的消息,仅考虑新消息。",
"toggleLabel": "同步现有联系人与聊天记录"
},
"condition": {
diff --git a/apps/builder/messages/zh-TW.json b/apps/builder/messages/zh-TW.json
index 22229e7ab..aaebb82d0 100644
--- a/apps/builder/messages/zh-TW.json
+++ b/apps/builder/messages/zh-TW.json
@@ -2978,6 +2978,8 @@
"toggleHelper": "僅當Meta 有緩衝資料時(啟動後 24 小時內),重新啟用才有效。否則斷開並重新連接。",
"toggleHelperMessenger": "僅當Meta 有緩衝資料時(啟動後 24 小時內),重新啟用才有效。否則斷開並重新連接Messenger頁面。",
"toggleHelperWhatsapp": "僅當Meta 有緩衝資料時(啟動後 24 小時內),重新啟用才有效。否則,請斷開並重新連接WhatsApp號碼。",
+ "skipAiContextLabel": "AI 略過同步歷史",
+ "skipAiContextHelper": "開啟後,AI 將忽略此次同步匯入的訊息,僅考慮新訊息。",
"success": {
"enabled": "同步已開始。歷史聯絡人和訊息很快就會出現。",
"disabled": "同步已停用。"
diff --git a/apps/builder/src/features/integration-instagram/api/coexist.ts b/apps/builder/src/features/integration-instagram/api/coexist.ts
index 067666d50..e3fe37aea 100644
--- a/apps/builder/src/features/integration-instagram/api/coexist.ts
+++ b/apps/builder/src/features/integration-instagram/api/coexist.ts
@@ -7,6 +7,7 @@ const setCoexistInstagramRequest = z.object({
workspaceId: z.string(),
integrationId: z.string(),
enabled: z.boolean(),
+ skipAiContext: z.boolean().optional().default(false),
})
export type SetCoexistInstagramRequest = z.infer<
typeof setCoexistInstagramRequest
@@ -41,6 +42,7 @@ export const integrationInstagramCoexistAPIs = {
workspaceId: input.workspaceId,
integrationId: input.integrationId,
channel: "instagram",
+ skipAiContext: input.skipAiContext,
})
: coexistService.disable({
workspaceId: input.workspaceId,
diff --git a/apps/builder/src/features/integration-messenger/api/coexist.ts b/apps/builder/src/features/integration-messenger/api/coexist.ts
index 280e83c0f..dade1b08f 100644
--- a/apps/builder/src/features/integration-messenger/api/coexist.ts
+++ b/apps/builder/src/features/integration-messenger/api/coexist.ts
@@ -7,6 +7,7 @@ const setCoexistMessengerRequest = z.object({
workspaceId: z.string(),
integrationId: z.string(),
enabled: z.boolean(),
+ skipAiContext: z.boolean().optional().default(false),
})
export type SetCoexistMessengerRequest = z.infer<
typeof setCoexistMessengerRequest
@@ -36,12 +37,13 @@ export const integrationMessengerCoexistAPIs = {
.output(setCoexistMessengerResponse)
.use(workspaceAuthorizedMidddleware, (input) => input.workspaceId)
.handler(async ({ input }) => {
- const { workspaceId, integrationId, enabled } = input
+ const { workspaceId, integrationId, enabled, skipAiContext } = input
return await (enabled
? coexistService.enable({
workspaceId,
integrationId,
channel: "messenger",
+ skipAiContext,
})
: coexistService.disable({
workspaceId,
diff --git a/apps/builder/src/features/integration-whatsapp/api/coexist.ts b/apps/builder/src/features/integration-whatsapp/api/coexist.ts
index dddf05ba8..925393893 100644
--- a/apps/builder/src/features/integration-whatsapp/api/coexist.ts
+++ b/apps/builder/src/features/integration-whatsapp/api/coexist.ts
@@ -15,6 +15,7 @@ const setCoexistWhatsappRequest = z.object({
workspaceId: z.string(),
integrationId: z.string(),
enabled: z.boolean(),
+ skipAiContext: z.boolean().optional().default(false),
})
export type SetCoexistWhatsappRequest = z.infer<
typeof setCoexistWhatsappRequest
@@ -52,14 +53,21 @@ export const integrationWhatsappCoexistAPIs = {
.output(setCoexistWhatsappResponse)
.use(workspaceAuthorizedMidddleware, (input) => input.workspaceId)
.handler(async ({ input }) => {
- const { workspaceId, integrationId, enabled } = input
+ const { workspaceId, integrationId, enabled, skipAiContext } = input
// Atomic UPDATE + RETURNING gates on workspaceId (tenancy) and yields
// phoneNumberId + auth in one round trip — no separate findFirst, no
// race window between flag write and queue enqueue.
+ //
+ // `coexistSkipAiContext` is set ONLY when enabling — the popup also
+ // POSTs on decline (`enabled: false`), and this UPDATE runs before the
+ // `if (enabled)` branch below, so a decline must never write it.
const [updated] = await db
.update(integrationWhatsappModel)
- .set({ coexistEnabled: enabled })
+ .set({
+ coexistEnabled: enabled,
+ ...(enabled ? { coexistSkipAiContext: skipAiContext } : {}),
+ })
.where(
and(
eq(integrationWhatsappModel.id, integrationId),
diff --git a/apps/builder/src/features/shared/coexist-popup.tsx b/apps/builder/src/features/shared/coexist-popup.tsx
index 86f601a96..530ca943b 100644
--- a/apps/builder/src/features/shared/coexist-popup.tsx
+++ b/apps/builder/src/features/shared/coexist-popup.tsx
@@ -9,6 +9,7 @@ import {
DialogHeader,
DialogTitle,
} from "@chatbotx.io/ui/components/ui/dialog"
+import { Switch } from "@chatbotx.io/ui/components/ui/switch"
import ky from "ky"
import { Loader2Icon } from "lucide-react"
import { useTranslations } from "next-intl"
@@ -65,6 +66,9 @@ export function CoexistPopup({
}: CoexistPopupProps) {
const t = useTranslations()
const [pending, setPending] = useState<"enable" | "decline" | null>(null)
+ // Default OFF: coexist-synced history feeds the AI unless explicitly opted
+ // out.
+ const [skipAiContext, setSkipAiContext] = useState(false)
const handleChoice = async (enabled: boolean) => {
setPending(enabled ? "enable" : "decline")
@@ -72,7 +76,7 @@ export function CoexistPopup({
const endpoint = `/api/workspaces/${workspaceId}/integrations/${channel}/${integrationId}/coexist`
const result = await ky
.post(endpoint, {
- json: { workspaceId, integrationId, enabled },
+ json: { workspaceId, integrationId, enabled, skipAiContext },
})
.json()
@@ -125,6 +129,22 @@ export function CoexistPopup({
{t("coexist.billingNote")}
+
+
+
+
+ {t("coexist.skipAiContextLabel")}
+
+
+
+ {t("coexist.skipAiContextHelper")}
+
+
+
{
const mockBulkCreate = vi.fn().mockResolvedValue([])
const mockBulkCreateAttachments = vi.fn().mockResolvedValue([])
@@ -45,6 +46,9 @@ const {
mockCreateMessageRepository,
mockWorkspaceFind: vi.fn(),
mockWorkspaceUsageIncrement: vi.fn().mockResolvedValue(undefined),
+ mockBulkAdvanceActivityAndAiContextMarker: vi
+ .fn()
+ .mockResolvedValue(undefined),
}
})
@@ -114,6 +118,10 @@ vi.mock("@chatbotx.io/business", () => ({
contactInboxService: {
bulkUpdateTracking: mockBulkUpdateTracking,
},
+ conversationService: {
+ bulkAdvanceActivityAndAiContextMarker:
+ mockBulkAdvanceActivityAndAiContextMarker,
+ },
messageCleanupService: {
cancelByInboxSource: vi.fn().mockResolvedValue(undefined),
},
@@ -324,6 +332,7 @@ describe("bulkImportHistorical", () => {
// Re-wire repository mock after clearAllMocks.
mockBulkCreate.mockResolvedValue([])
mockBulkUpdateTracking.mockResolvedValue(null)
+ mockBulkAdvanceActivityAndAiContextMarker.mockResolvedValue(undefined)
mockCreateMessageRepository.mockResolvedValue({
bulkCreate: mockBulkCreate,
bulkCreateAttachments: vi.fn().mockResolvedValue([]),
@@ -340,6 +349,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
+ skipAiContext: false,
batch: [],
})
@@ -372,6 +382,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
+ skipAiContext: false,
batch: [{ contact: contact("src-1"), messages: [msg("m-src-1")] }],
})
@@ -397,6 +408,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
+ skipAiContext: false,
batch: [{ contact: contact("src-1"), messages: [msg("m-src-1")] }],
})
@@ -424,6 +436,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
+ skipAiContext: false,
batch: [{ contact: contact("src-1"), messages: [] }],
})
@@ -455,6 +468,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
+ skipAiContext: false,
batch: [
{
contact: contact("src-1"),
@@ -490,6 +504,88 @@ describe("bulkImportHistorical", () => {
})
})
+ it("advances the AI-context marker via conversationService when skipAiContext is true", async () => {
+ stubNewContactsTransaction([
+ {
+ sourceId: "src-1",
+ contactId: "contact-1",
+ contactInboxId: "ci-1",
+ conversationId: "conv-1",
+ },
+ ])
+ // Numeric ids so `maxMessageId` (BigInt-based) resolves a real marker.
+ mockBulkCreate.mockResolvedValueOnce([
+ { id: "100000000000001", sourceId: "m-src-1" },
+ { id: "200000000000002", sourceId: "m-src-2" },
+ ])
+
+ await bulkImportHistorical({
+ inbox,
+ workspaceId,
+ runId: "12345",
+ skipAiContext: true,
+ batch: [
+ {
+ contact: contact("src-1"),
+ messages: [msg("m-src-1"), msg("m-src-2")],
+ },
+ ],
+ })
+
+ expect(mockBulkAdvanceActivityAndAiContextMarker).toHaveBeenCalledTimes(1)
+ expect(mockBulkAdvanceActivityAndAiContextMarker).toHaveBeenCalledWith(
+ expect.objectContaining({
+ workspaceId: "ws-1",
+ rows: expect.arrayContaining([
+ expect.objectContaining({
+ conversationId: "conv-1",
+ aiMarkerMessageId: "200000000000002",
+ }),
+ ]),
+ }),
+ )
+ })
+
+ it("passes a null aiMarkerMessageId to conversationService for every row when skipAiContext is false", async () => {
+ stubNewContactsTransaction([
+ {
+ sourceId: "src-1",
+ contactId: "contact-1",
+ contactInboxId: "ci-1",
+ conversationId: "conv-1",
+ },
+ ])
+ mockBulkCreate.mockResolvedValueOnce([
+ { id: "100000000000001", sourceId: "m-src-1" },
+ ])
+
+ await bulkImportHistorical({
+ inbox,
+ workspaceId,
+ runId: "12345",
+ skipAiContext: false,
+ batch: [
+ {
+ contact: contact("src-1"),
+ // A valid API createdAt so the activity row still carries a
+ // non-null `newestMessageAt` and reaches conversationService: with
+ // skipAiContext=false AND no valid timestamp at all, no row would
+ // be pushed at all (see bulk-import-messages.test.ts's
+ // applyCoexistActivityUpdates suite for that absence case).
+ messages: [
+ msg("m-src-1", { createdAt: new Date("2026-07-01T00:00:00Z") }),
+ ],
+ },
+ ],
+ })
+
+ expect(mockBulkAdvanceActivityAndAiContextMarker).toHaveBeenCalledTimes(1)
+ const [call] = mockBulkAdvanceActivityAndAiContextMarker.mock.calls[0]
+ for (const row of call.rows) {
+ expect(row.aiMarkerMessageId).toBeNull()
+ }
+ })
+
it("counts duplicates as skippedMessages when message INSERT returns fewer rows than input", async () => {
stubNewContactsTransaction([
{
@@ -506,6 +602,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
+ skipAiContext: false,
batch: [
{
contact: contact("src-1"),
@@ -535,6 +632,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
+ skipAiContext: false,
batch: [
{ contact: contact("src-1"), messages: [msg("m-1"), msg("m-2")] },
],
@@ -557,14 +655,15 @@ describe("bulkImportHistorical", () => {
},
])
mockBulkCreate.mockResolvedValueOnce([
- { id: "m-1", sourceId: "m-a" },
- { id: "m-2", sourceId: "m-b" },
+ { id: "100000000000001", sourceId: "m-a" },
+ { id: "100000000000002", sourceId: "m-b" },
])
const result = await bulkImportHistorical({
inbox,
workspaceId,
runId: "12345",
+ skipAiContext: false,
batch: [
{ contact: contact("src-shared"), messages: [msg("m-a")] },
{ contact: contact("src-shared"), messages: [msg("m-b")] },
@@ -637,6 +736,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
+ skipAiContext: false,
batch,
})
@@ -731,6 +831,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
+ skipAiContext: false,
batch,
})
diff --git a/apps/worker/__tests__/bulk-import-messages.test.ts b/apps/worker/__tests__/bulk-import-messages.test.ts
index 4bfa314a8..1f0002f02 100644
--- a/apps/worker/__tests__/bulk-import-messages.test.ts
+++ b/apps/worker/__tests__/bulk-import-messages.test.ts
@@ -254,8 +254,8 @@ describe("bulkImportMessages", () => {
test("returns correct importedMessages count from bulkCreate result", async () => {
mockBulkCreate.mockResolvedValue([
- { id: "msg-1", sourceId: "src-1" },
- { id: "msg-2", sourceId: "src-2" },
+ { id: "100000000000001", sourceId: "src-1" },
+ { id: "100000000000002", sourceId: "src-2" },
])
const result = await bulkImportMessages({
@@ -346,8 +346,8 @@ describe("bulkImportMessages", () => {
const newest = new Date("2026-06-20T10:00:00.000Z")
const older = new Date("2026-06-19T08:00:00.000Z")
mockBulkCreate.mockResolvedValue([
- { id: "msg-1", sourceId: "src-1" },
- { id: "msg-2", sourceId: "src-2" },
+ { id: "100000000000001", sourceId: "src-1" },
+ { id: "100000000000002", sourceId: "src-2" },
])
const result = await bulkImportMessages({
@@ -367,8 +367,8 @@ describe("bulkImportMessages", () => {
test("reports newest and oldest message timestamps only from API message timestamps", async () => {
const apiTimestamp = new Date("2026-06-19T08:00:00.000Z")
mockBulkCreate.mockResolvedValue([
- { id: "msg-1", sourceId: "src-with-api-time" },
- { id: "msg-2", sourceId: "src-without-api-time" },
+ { id: "100000000000001", sourceId: "src-with-api-time" },
+ { id: "100000000000002", sourceId: "src-without-api-time" },
])
const result = await bulkImportMessages({
@@ -396,8 +396,8 @@ describe("bulkImportMessages", () => {
const incomingTimestamp = new Date("2026-06-19T08:00:00.000Z")
const newerOutgoingTimestamp = new Date("2026-06-20T10:00:00.000Z")
mockBulkCreate.mockResolvedValue([
- { id: "msg-1", sourceId: "src-incoming" },
- { id: "msg-2", sourceId: "src-outgoing" },
+ { id: "100000000000001", sourceId: "src-incoming" },
+ { id: "100000000000002", sourceId: "src-outgoing" },
])
const result = await bulkImportMessages({
@@ -432,6 +432,70 @@ describe("bulkImportMessages", () => {
).rejects.toThrow("fk violation")
expect(mockBulkCreate).toHaveBeenCalledTimes(1)
})
+
+ test("newestMessageId returns null when nothing is inserted", async () => {
+ mockBulkCreate.mockResolvedValue([])
+
+ const result = await bulkImportMessages({
+ ...BASE_PROPS,
+ messages: [makeMessage("src-1")],
+ })
+
+ expect(result.newestMessageId).toBeNull()
+ })
+
+ test("newestMessageId is the OUTGOING message's id when the newest inserted message is outgoing", async () => {
+ // Direction-agnostic: id 200000000000002 (outgoing) is newer than
+ // 100000000000001 (incoming) purely by numeric id, independent of
+ // messageType.
+ mockBulkCreate.mockResolvedValue([
+ { id: "100000000000001", sourceId: "src-incoming" },
+ { id: "200000000000002", sourceId: "src-outgoing" },
+ ])
+
+ const result = await bulkImportMessages({
+ ...BASE_PROPS,
+ messages: [
+ { ...makeMessage("src-incoming"), messageType: "incoming" },
+ { ...makeMessage("src-outgoing"), messageType: "outgoing" },
+ ],
+ })
+
+ expect(result.newestMessageId).toBe("200000000000002")
+ })
+
+ test("newestMessageId is the INCOMING message's id when the newest inserted message is incoming (mirror case)", async () => {
+ mockBulkCreate.mockResolvedValue([
+ { id: "200000000000002", sourceId: "src-outgoing" },
+ { id: "300000000000003", sourceId: "src-incoming" },
+ ])
+
+ const result = await bulkImportMessages({
+ ...BASE_PROPS,
+ messages: [
+ { ...makeMessage("src-outgoing"), messageType: "outgoing" },
+ { ...makeMessage("src-incoming"), messageType: "incoming" },
+ ],
+ })
+
+ expect(result.newestMessageId).toBe("300000000000003")
+ })
+
+ test("newestMessageId is non-null even when every message used fallbackCreatedAt (invalid API timestamps)", async () => {
+ // HIGH fix from review: newestMessageId is computed from ALL insertedRows,
+ // independent of newestMessageAt (which only counts valid API timestamps).
+ mockBulkCreate.mockResolvedValue([
+ { id: "400000000000004", sourceId: "src-1" },
+ ])
+
+ const result = await bulkImportMessages({
+ ...BASE_PROPS,
+ messages: [{ ...makeMessage("src-1"), createdAt: undefined }],
+ })
+
+ expect(result.newestMessageAt).toBeNull()
+ expect(result.newestMessageId).toBe("400000000000004")
+ })
})
describe("applyCoexistActivityUpdates", () => {
@@ -440,33 +504,38 @@ describe("applyCoexistActivityUpdates", () => {
})
test("issues exactly ONE UPDATE per table for the whole bulk (not per contact)", async () => {
- await applyCoexistActivityUpdates([
- {
- contactInboxId: "ci-1",
- contactId: "contact-1",
- workspaceId: "ws-1",
- conversationId: "conv-1",
- newestMessageAt: new Date("2026-06-20T10:00:00.000Z"),
- oldestMessageAt: new Date("2026-06-20T09:00:00.000Z"),
- newestIncomingMessageAt: null,
- },
- {
- contactInboxId: "ci-2",
- contactId: "contact-2",
- workspaceId: "ws-1",
- conversationId: "conv-2",
- newestMessageAt: new Date("2026-06-21T10:00:00.000Z"),
- oldestMessageAt: new Date("2026-06-21T09:00:00.000Z"),
- newestIncomingMessageAt: null,
- },
- {
- contactInboxId: "ci-3",
- conversationId: "conv-3",
- newestMessageAt: new Date("2026-06-22T10:00:00.000Z"),
- oldestMessageAt: new Date("2026-06-22T09:00:00.000Z"),
- newestIncomingMessageAt: null,
- },
- ])
+ await applyCoexistActivityUpdates(
+ [
+ {
+ contactInboxId: "ci-1",
+ contactId: "contact-1",
+ conversationId: "conv-1",
+ newestMessageAt: new Date("2026-06-20T10:00:00.000Z"),
+ oldestMessageAt: new Date("2026-06-20T09:00:00.000Z"),
+ newestIncomingMessageAt: null,
+ aiMarkerMessageId: "100000000000001",
+ },
+ {
+ contactInboxId: "ci-2",
+ contactId: "contact-2",
+ conversationId: "conv-2",
+ newestMessageAt: new Date("2026-06-21T10:00:00.000Z"),
+ oldestMessageAt: new Date("2026-06-21T09:00:00.000Z"),
+ newestIncomingMessageAt: null,
+ aiMarkerMessageId: "200000000000002",
+ },
+ {
+ contactInboxId: "ci-3",
+ contactId: "contact-3",
+ conversationId: "conv-3",
+ newestMessageAt: new Date("2026-06-22T10:00:00.000Z"),
+ oldestMessageAt: new Date("2026-06-22T09:00:00.000Z"),
+ newestIncomingMessageAt: null,
+ aiMarkerMessageId: "300000000000003",
+ },
+ ],
+ { workspaceId: "ws-1" },
+ )
// 3 contacts → still 2 statements total (ContactInbox + Conversation),
// not 6. This is the "limit queries in the loop" guarantee.
@@ -477,17 +546,20 @@ describe("applyCoexistActivityUpdates", () => {
const incomingAt = new Date("2026-06-19T08:00:00.000Z")
const firstAt = new Date("2026-06-18T08:00:00.000Z")
const latestAt = new Date("2026-06-20T10:00:00.000Z")
- await applyCoexistActivityUpdates([
- {
- contactInboxId: "ci-1",
- contactId: "contact-1",
- workspaceId: "ws-1",
- conversationId: "conv-1",
- newestMessageAt: latestAt,
- oldestMessageAt: firstAt,
- newestIncomingMessageAt: incomingAt,
- },
- ])
+ await applyCoexistActivityUpdates(
+ [
+ {
+ contactInboxId: "ci-1",
+ contactId: "contact-1",
+ conversationId: "conv-1",
+ newestMessageAt: latestAt,
+ oldestMessageAt: firstAt,
+ newestIncomingMessageAt: incomingAt,
+ aiMarkerMessageId: "100000000000001",
+ },
+ ],
+ { workspaceId: "ws-1" },
+ )
const contactInboxSql = mockDbExecute.mock.calls[0]?.[0] as
| { strings?: TemplateStringsArray; values?: unknown[] }
@@ -520,21 +592,27 @@ describe("applyCoexistActivityUpdates", () => {
expect(conversationSql?.strings?.join("")).not.toContain('"createdAt"')
expect(conversationSql?.strings?.join("")).toContain("VALUES")
expect(conversationSql?.strings?.join("")).not.toContain("unnest")
+ expect(conversationSql?.strings?.join("")).toContain(
+ '"aiContextLastMessageId"',
+ )
})
test("does not derive ContactInbox.lastIncomingMessageAt from an outgoing-only latest message", async () => {
const outgoingAt = new Date("2026-06-20T10:00:00.000Z")
- await applyCoexistActivityUpdates([
- {
- contactInboxId: "ci-1",
- contactId: "contact-1",
- workspaceId: "ws-1",
- conversationId: "conv-1",
- newestMessageAt: outgoingAt,
- oldestMessageAt: outgoingAt,
- newestIncomingMessageAt: null,
- },
- ])
+ await applyCoexistActivityUpdates(
+ [
+ {
+ contactInboxId: "ci-1",
+ contactId: "contact-1",
+ conversationId: "conv-1",
+ newestMessageAt: outgoingAt,
+ oldestMessageAt: outgoingAt,
+ newestIncomingMessageAt: null,
+ aiMarkerMessageId: "100000000000001",
+ },
+ ],
+ { workspaceId: "ws-1" },
+ )
const contactInboxSql = mockDbExecute.mock.calls[0]?.[0] as
| { values?: unknown[] }
@@ -560,26 +638,29 @@ describe("applyCoexistActivityUpdates", () => {
const olderIncoming = new Date("2026-06-19T07:00:00.000Z")
const newerIncoming = new Date("2026-06-20T09:00:00.000Z")
- await applyCoexistActivityUpdates([
- {
- contactInboxId: "ci-1",
- contactId: "contact-1",
- workspaceId: "ws-1",
- conversationId: "conv-1",
- newestMessageAt: newerMessage,
- oldestMessageAt: olderMessage,
- newestIncomingMessageAt: olderIncoming,
- },
- {
- contactInboxId: "ci-1",
- contactId: "contact-1",
- workspaceId: "ws-1",
- conversationId: "conv-1",
- newestMessageAt: olderMessage,
- oldestMessageAt: oldestMessage,
- newestIncomingMessageAt: newerIncoming,
- },
- ])
+ await applyCoexistActivityUpdates(
+ [
+ {
+ contactInboxId: "ci-1",
+ contactId: "contact-1",
+ conversationId: "conv-1",
+ newestMessageAt: newerMessage,
+ oldestMessageAt: olderMessage,
+ newestIncomingMessageAt: olderIncoming,
+ aiMarkerMessageId: "100000000000001",
+ },
+ {
+ contactInboxId: "ci-1",
+ contactId: "contact-1",
+ conversationId: "conv-1",
+ newestMessageAt: olderMessage,
+ oldestMessageAt: oldestMessage,
+ newestIncomingMessageAt: newerIncoming,
+ aiMarkerMessageId: "200000000000002",
+ },
+ ],
+ { workspaceId: "ws-1" },
+ )
const contactInboxSql = mockDbExecute.mock.calls[0]?.[0] as
| { values?: unknown[] }
@@ -604,14 +685,18 @@ describe("applyCoexistActivityUpdates", () => {
| { __join?: Array<{ values?: unknown[] }> }
| undefined
expect(conversationRows?.__join).toHaveLength(1)
+ // Newest message TIME comes from the first update (newerMessage), but the
+ // newest message ID is independently deduped (max BigInt) — the second
+ // update's id (200000000000002) is numerically larger.
expect(conversationRows?.__join?.[0]?.values).toEqual([
"conv-1",
newerMessage,
+ "200000000000002",
])
})
test("is a no-op (no query) when there are no updates", async () => {
- await applyCoexistActivityUpdates([])
+ await applyCoexistActivityUpdates([], { workspaceId: "ws-1" })
expect(mockDbExecute).not.toHaveBeenCalled()
})
@@ -619,15 +704,113 @@ describe("applyCoexistActivityUpdates", () => {
mockDbExecute.mockRejectedValueOnce(new Error("bad activity update"))
await expect(
- applyCoexistActivityUpdates([
+ applyCoexistActivityUpdates(
+ [
+ {
+ contactInboxId: "ci-1",
+ contactId: "contact-1",
+ conversationId: "conv-1",
+ newestMessageAt: new Date("2026-06-20T10:00:00.000Z"),
+ oldestMessageAt: new Date("2026-06-20T09:00:00.000Z"),
+ newestIncomingMessageAt: null,
+ aiMarkerMessageId: "100000000000001",
+ },
+ ],
+ { workspaceId: "ws-1" },
+ ),
+ ).rejects.toThrow("bad activity update")
+ })
+
+ test("passes a non-null aiMarkerMessageId through to the Conversation update unchanged (pure passthrough)", async () => {
+ await applyCoexistActivityUpdates(
+ [
{
contactInboxId: "ci-1",
+ contactId: "contact-1",
conversationId: "conv-1",
newestMessageAt: new Date("2026-06-20T10:00:00.000Z"),
oldestMessageAt: new Date("2026-06-20T09:00:00.000Z"),
newestIncomingMessageAt: null,
+ aiMarkerMessageId: "100000000000001",
},
- ]),
- ).rejects.toThrow("bad activity update")
+ ],
+ { workspaceId: "ws-1" },
+ )
+
+ const conversationSql = mockDbExecute.mock.calls[1]?.[0] as
+ | { values?: unknown[] }
+ | undefined
+ const conversationRows = conversationSql?.values?.[0] as
+ | { __join?: Array<{ values?: unknown[] }> }
+ | undefined
+ expect(conversationRows?.__join?.[0]?.values?.[2]).toBe("100000000000001")
+ })
+
+ test("passes a null aiMarkerMessageId through to the Conversation update for EVERY row whose marker is null (pure passthrough)", async () => {
+ await applyCoexistActivityUpdates(
+ [
+ {
+ contactInboxId: "ci-1",
+ contactId: "contact-1",
+ conversationId: "conv-1",
+ newestMessageAt: new Date("2026-06-20T10:00:00.000Z"),
+ oldestMessageAt: new Date("2026-06-20T09:00:00.000Z"),
+ newestIncomingMessageAt: null,
+ aiMarkerMessageId: null,
+ },
+ {
+ contactInboxId: "ci-2",
+ contactId: "contact-2",
+ conversationId: "conv-2",
+ newestMessageAt: new Date("2026-06-21T10:00:00.000Z"),
+ oldestMessageAt: new Date("2026-06-21T09:00:00.000Z"),
+ newestIncomingMessageAt: null,
+ aiMarkerMessageId: null,
+ },
+ ],
+ { workspaceId: "ws-1" },
+ )
+
+ const conversationSql = mockDbExecute.mock.calls[1]?.[0] as
+ | { values?: unknown[] }
+ | undefined
+ const conversationRows = conversationSql?.values?.[0] as
+ | { __join?: Array<{ values?: unknown[] }> }
+ | undefined
+ for (const row of conversationRows?.__join ?? []) {
+ expect(row.values?.[2]).toBeNull()
+ }
+ })
+
+ test("still reaches the Conversation update (and skips the ContactInbox bump) when dates are null but a marker id is present", async () => {
+ await applyCoexistActivityUpdates(
+ [
+ {
+ contactInboxId: "ci-1",
+ contactId: "contact-1",
+ conversationId: "conv-1",
+ newestMessageAt: null,
+ oldestMessageAt: null,
+ newestIncomingMessageAt: null,
+ aiMarkerMessageId: "100000000000001",
+ },
+ ],
+ { workspaceId: "ws-1" },
+ )
+
+ // Only the Conversation statement fires — no ContactInbox bump for a
+ // row whose messages all used fallbackCreatedAt.
+ expect(mockDbExecute).toHaveBeenCalledTimes(1)
+ const conversationSql = mockDbExecute.mock.calls[0]?.[0] as
+ | { values?: unknown[] }
+ | undefined
+ const conversationRows = conversationSql?.values?.[0] as
+ | { __join?: Array<{ values?: unknown[] }> }
+ | undefined
+ expect(conversationRows?.__join?.[0]?.values).toEqual([
+ "conv-1",
+ null,
+ "100000000000001",
+ ])
})
})
diff --git a/apps/worker/__tests__/coexist-instagram-sync.test.ts b/apps/worker/__tests__/coexist-instagram-sync.test.ts
index d9bf073cc..fb92b77d8 100644
--- a/apps/worker/__tests__/coexist-instagram-sync.test.ts
+++ b/apps/worker/__tests__/coexist-instagram-sync.test.ts
@@ -139,6 +139,7 @@ describe("coexistInstagramSync", () => {
mockLoadContext.mockResolvedValue({
inbox: { id: "inbox-1" },
workspaceId: "workspace-1",
+ integration: { coexistSkipAiContext: false },
})
mockClaimRun.mockResolvedValue({
attempts: 1,
@@ -176,6 +177,7 @@ describe("coexistInstagramSync", () => {
newestIncomingMessageAt: new Date("2026-08-01T00:00:00Z"),
newestMessageAt: new Date("2026-08-01T00:00:00Z"),
oldestMessageAt: new Date("2026-08-01T00:00:00Z"),
+ newestMessageId: "100000000000001",
skippedMessages: 0,
}),
)
@@ -243,6 +245,57 @@ describe("coexistInstagramSync", () => {
expect(mockMarkSucceeded).toHaveBeenCalledWith({ runId: "run-ig-1" })
})
+ it("threads coexistSkipAiContext=true into the row's aiMarkerMessageId, carrying the newest inserted message id", async () => {
+ mockLoadContext.mockResolvedValue({
+ inbox: { id: "inbox-1" },
+ workspaceId: "workspace-1",
+ integration: { coexistSkipAiContext: true },
+ })
+ mockFetchConversationMessages.mockResolvedValue({
+ messages: [{ id: "message-1", message: "hi" }],
+ })
+ mockToHistoricalMessage.mockReturnValue({
+ sourceId: "message-1",
+ messageType: "incoming",
+ contentType: "text",
+ text: "hi",
+ })
+
+ await coexistInstagramSync(syncData)
+
+ expect(mockApplyCoexistActivityUpdates).toHaveBeenCalledWith(
+ expect.any(Array),
+ { workspaceId: "workspace-1" },
+ )
+ const [updates] = mockApplyCoexistActivityUpdates.mock.calls[0] as [
+ Array<{ aiMarkerMessageId: string | null }>,
+ ]
+ expect(updates[0]?.aiMarkerMessageId).toBe("100000000000001")
+ })
+
+ it("passes a null aiMarkerMessageId when coexistSkipAiContext is off", async () => {
+ mockFetchConversationMessages.mockResolvedValue({
+ messages: [{ id: "message-1", message: "hi" }],
+ })
+ mockToHistoricalMessage.mockReturnValue({
+ sourceId: "message-1",
+ messageType: "incoming",
+ contentType: "text",
+ text: "hi",
+ })
+
+ await coexistInstagramSync(syncData)
+
+ expect(mockApplyCoexistActivityUpdates).toHaveBeenCalledWith(
+ expect.any(Array),
+ { workspaceId: "workspace-1" },
+ )
+ const [updates] = mockApplyCoexistActivityUpdates.mock.calls[0] as [
+ Array<{ aiMarkerMessageId: string | null }>,
+ ]
+ expect(updates[0]?.aiMarkerMessageId).toBeNull()
+ })
+
it("does not wipe the resume watermark when a page processes no conversation", async () => {
// Resume from a prior watermark: the only conversation (updated 2026-08-01,
// per the mocked getConversationUpdatedAt) is newer than the frontier, so it
diff --git a/apps/worker/__tests__/coexist-messenger-sync.test.ts b/apps/worker/__tests__/coexist-messenger-sync.test.ts
index 973c6f848..9bd034f65 100644
--- a/apps/worker/__tests__/coexist-messenger-sync.test.ts
+++ b/apps/worker/__tests__/coexist-messenger-sync.test.ts
@@ -19,6 +19,7 @@ const {
mockUpdate,
mockQueueAdd,
mockConcurrencyForUsage,
+ mockApplyCoexistActivityUpdates,
} = vi.hoisted(() => ({
mockFindFirstMessenger: vi.fn(),
mockFindFirstWorkspace: vi.fn(),
@@ -34,6 +35,7 @@ const {
mockUpdate: vi.fn(),
mockQueueAdd: vi.fn(),
mockConcurrencyForUsage: vi.fn(() => 5),
+ mockApplyCoexistActivityUpdates: vi.fn().mockResolvedValue(undefined),
}))
// ---------------------------------------------------------------------------
@@ -126,7 +128,21 @@ vi.mock("../src/integration/handlers/coexist/bulk-historical-import", () => ({
bulkImportMessages: mockBulkImportMessages,
bulkImportContacts: mockBulkImportContacts,
createHistoricalIdFactory: mockCreateIdFactory,
- applyCoexistActivityUpdates: vi.fn().mockResolvedValue(undefined),
+ applyCoexistActivityUpdates: mockApplyCoexistActivityUpdates,
+ // Real pure implementation (mirrors bulk-historical-import.ts) — the
+ // messenger-sync source under test imports this as a named export from
+ // this module to fold per-page `newestMessageId`s into a per-conversation
+ // `aiMarkerMessageId`, so it must behave exactly like production, not be
+ // a bare vi.fn().
+ maxNumericId: (a: string | null, b: string | null): string | null => {
+ if (a === null) {
+ return b
+ }
+ if (b === null) {
+ return a
+ }
+ return BigInt(a) < BigInt(b) ? b : a
+ },
}))
// Break the pino import chain that comes through @chatbotx.io/business →
@@ -155,6 +171,7 @@ const fakeIntegration = {
workspaceId,
pageId: PAGE_ID,
coexistEnabled: true,
+ coexistSkipAiContext: false,
inboxId: "inbox-messenger-1",
auth: {
tokens: { accessToken: "access-token-abc" },
@@ -211,6 +228,10 @@ const emptyBulkMessagesResult = () => ({
importedMessages: 0,
skippedMessages: 0,
insertedAttachmentIds: [],
+ newestMessageAt: null as Date | null,
+ oldestMessageAt: null as Date | null,
+ newestIncomingMessageAt: null as Date | null,
+ newestMessageId: null as string | null,
})
const emptyBulkContactsResult = () => ({
@@ -422,6 +443,77 @@ describe("coexistMessengerSync", () => {
expect(bulkArgs.messages[0]?.sourceId).toBe("msg-xyz")
})
+ it("threads coexistSkipAiContext=true into the row's aiMarkerMessageId, carrying the newest message id", async () => {
+ mockFindFirstMessenger.mockResolvedValue({
+ ...fakeIntegration,
+ coexistSkipAiContext: true,
+ })
+ mockFindOrFail.mockResolvedValue(fakeInbox)
+
+ mockListConversations.mockResolvedValueOnce({
+ data: [makeConversation("conv-abc", "user-999")],
+ after: undefined,
+ })
+ mockListMessages.mockResolvedValueOnce({
+ data: [makeMessage("msg-xyz", "user-999")],
+ after: undefined,
+ })
+ mockBulkImportMessages.mockResolvedValueOnce({
+ importedMessages: 1,
+ skippedMessages: 0,
+ insertedAttachmentIds: [],
+ newestMessageAt: new Date(RECENT_TS),
+ oldestMessageAt: new Date(RECENT_TS),
+ newestIncomingMessageAt: new Date(RECENT_TS),
+ newestMessageId: "100000000000001",
+ })
+
+ await coexistMessengerSync({ runId, integrationId, workspaceId })
+
+ expect(mockApplyCoexistActivityUpdates).toHaveBeenCalledWith(
+ expect.any(Array),
+ { workspaceId: "ws-messenger-1" },
+ )
+ const [updates] = mockApplyCoexistActivityUpdates.mock.calls[0] as [
+ Array<{ aiMarkerMessageId: string | null }>,
+ ]
+ expect(updates[0]?.aiMarkerMessageId).toBe("100000000000001")
+ })
+
+ it("passes a null aiMarkerMessageId when coexistSkipAiContext is off", async () => {
+ mockFindFirstMessenger.mockResolvedValue(fakeIntegration)
+ mockFindOrFail.mockResolvedValue(fakeInbox)
+
+ mockListConversations.mockResolvedValueOnce({
+ data: [makeConversation("conv-abc", "user-999")],
+ after: undefined,
+ })
+ mockListMessages.mockResolvedValueOnce({
+ data: [makeMessage("msg-xyz", "user-999")],
+ after: undefined,
+ })
+ mockBulkImportMessages.mockResolvedValueOnce({
+ importedMessages: 1,
+ skippedMessages: 0,
+ insertedAttachmentIds: [],
+ newestMessageAt: new Date(RECENT_TS),
+ oldestMessageAt: new Date(RECENT_TS),
+ newestIncomingMessageAt: new Date(RECENT_TS),
+ newestMessageId: "100000000000001",
+ })
+
+ await coexistMessengerSync({ runId, integrationId, workspaceId })
+
+ expect(mockApplyCoexistActivityUpdates).toHaveBeenCalledWith(
+ expect.any(Array),
+ { workspaceId: "ws-messenger-1" },
+ )
+ const [updates] = mockApplyCoexistActivityUpdates.mock.calls[0] as [
+ Array<{ aiMarkerMessageId: string | null }>,
+ ]
+ expect(updates[0]?.aiMarkerMessageId).toBeNull()
+ })
+
it("paginates messages within a conversation — flushes bulkImportMessages per message page", async () => {
mockFindFirstMessenger.mockResolvedValue(fakeIntegration)
mockFindOrFail.mockResolvedValue(fakeInbox)
diff --git a/apps/worker/__tests__/coexist-whatsapp-flush.test.ts b/apps/worker/__tests__/coexist-whatsapp-flush.test.ts
index 5d5fa222a..419ee65a1 100644
--- a/apps/worker/__tests__/coexist-whatsapp-flush.test.ts
+++ b/apps/worker/__tests__/coexist-whatsapp-flush.test.ts
@@ -153,6 +153,7 @@ const fakeIntegration = {
workspaceId: "ws-1",
phoneNumberId,
coexistEnabled: true,
+ coexistSkipAiContext: false,
inboxId: "inbox-1",
}
@@ -377,6 +378,35 @@ describe("coexistWhatsappFlush", () => {
expect(bulkArgs.batch[0]?.messages[0]?.sourceId).toBe("msg-row-1")
})
+ it("passes skipAiContext=false through to bulkImportHistorical when coexistSkipAiContext is off", async () => {
+ mockFindFirst.mockResolvedValue(fakeIntegration)
+ mockFindOrFail.mockResolvedValue(fakeInbox)
+ wireSelect(defaultRunRow(), [makeStagedRow("row-1")])
+
+ await coexistWhatsappFlush({ runId, phoneNumberId })
+
+ const [bulkArgs] = mockBulkImport.mock.calls[0] as [
+ { skipAiContext: boolean },
+ ]
+ expect(bulkArgs.skipAiContext).toBe(false)
+ })
+
+ it("passes skipAiContext=true through to bulkImportHistorical when coexistSkipAiContext is on", async () => {
+ mockFindFirst.mockResolvedValue({
+ ...fakeIntegration,
+ coexistSkipAiContext: true,
+ })
+ mockFindOrFail.mockResolvedValue(fakeInbox)
+ wireSelect(defaultRunRow(), [makeStagedRow("row-1")])
+
+ await coexistWhatsappFlush({ runId, phoneNumberId })
+
+ const [bulkArgs] = mockBulkImport.mock.calls[0] as [
+ { skipAiContext: boolean },
+ ]
+ expect(bulkArgs.skipAiContext).toBe(true)
+ })
+
it("does not synthesize system time when a WhatsApp history message has no API timestamp", async () => {
mockFindFirst.mockResolvedValue(fakeIntegration)
mockFindOrFail.mockResolvedValue(fakeInbox)
diff --git a/apps/worker/src/integration/handlers/coexist/bulk-historical-import.ts b/apps/worker/src/integration/handlers/coexist/bulk-historical-import.ts
index d856d5c25..15538aa69 100644
--- a/apps/worker/src/integration/handlers/coexist/bulk-historical-import.ts
+++ b/apps/worker/src/integration/handlers/coexist/bulk-historical-import.ts
@@ -2,6 +2,7 @@
import {
contactInboxService,
+ conversationService,
messageCleanupService,
workspaceUsageService,
} from "@chatbotx.io/business"
@@ -124,6 +125,30 @@ export const decodeHistoricalId = (
}
}
+/** Keep the numerically larger of two message-id strings (null-safe). The
+ * single "newest id wins" rule shared by `maxMessageId`, the per-conversation
+ * merge below, and messenger-sync's per-page fold. */
+export const maxNumericId = (
+ a: string | null,
+ b: string | null,
+): string | null => {
+ if (a === null) {
+ return b
+ }
+ if (b === null) {
+ return a
+ }
+ return BigInt(a) < BigInt(b) ? b : a
+}
+
+/** Ids are time-ordered snowflakes (ORDER BY id ≡ ORDER BY createdAt), so the
+ * max id over the rows bulkCreate actually inserted IS the newest
+ * sync-inserted message — direction-agnostic (incoming and outgoing both
+ * count). Duplicates skipped by onConflictDoNothing are absent from
+ * insertedRows and never drive the marker. */
+const maxMessageId = (rows: ReadonlyArray<{ id: string }>): string | null =>
+ rows.reduce((max, row) => maxNumericId(max, row.id), null)
+
const isUniqueMessagePkViolation = (err: unknown): boolean => {
// Drizzle wraps the pg error, so code/constraint live on `.cause` (sometimes
// nested). Walk the cause chain. pg exposes the constraint as `constraint`
@@ -184,115 +209,177 @@ export type BulkImportMessagesResult = {
/** Newest API-provided incoming message createdAt in this call (null when
* none). Used only for ContactInbox.lastIncomingMessageAt. */
newestIncomingMessageAt: Date | null
+ /** Id of the newest message actually inserted by this call, either
+ * direction; null when nothing was inserted. Computed from ALL
+ * `insertedRows`, independent of `newestMessageAt` — a message inserted
+ * with `fallbackCreatedAt` (invalid/missing API timestamp) still counts
+ * here even though it never counts toward `newestMessageAt`. */
+ newestMessageId: string | null
}
-/** One contact's activity-timestamp bump, collected by a batching caller. */
+/** One contact's activity-timestamp bump, collected by a batching caller.
+ * A whole batch belongs to one workspace — the caller passes `workspaceId`
+ * to `applyCoexistActivityUpdates` instead of repeating it per row. */
export type CoexistActivityUpdate = {
contactInboxId: string
contactId: string
- workspaceId: string
conversationId: string
+ /** Null when no message in this update carried a valid API timestamp
+ * (e.g. all inserted with `fallbackCreatedAt`) — the row can still exist
+ * purely to carry `aiMarkerMessageId` for the AI-context marker. */
+ newestMessageAt: Date | null
+ oldestMessageAt: Date | null
+ newestIncomingMessageAt: Date | null
+ /** Id of the newest sync-inserted message for this conversation (either
+ * direction), set by callers ONLY when the integration opted into
+ * skipping synced history for AI; null = do not advance the marker. */
+ aiMarkerMessageId: string | null
+}
+
+type ContactInboxMerge = {
newestMessageAt: Date
oldestMessageAt: Date
newestIncomingMessageAt: Date | null
+ contactId: string
+}
+
+type ConversationMerge = {
+ newestMessageAt: Date | null
+ aiMarkerMessageId: string | null
+}
+
+/** Fold one update into the per-ContactInbox tracking map. Rows without valid
+ * API timestamps carry nothing for ContactInbox and are skipped. */
+const mergeContactInboxUpdate = (
+ map: Map,
+ u: CoexistActivityUpdate,
+): void => {
+ if (u.newestMessageAt === null || u.oldestMessageAt === null) {
+ return
+ }
+ const existing = map.get(u.contactInboxId)
+ if (!existing) {
+ map.set(u.contactInboxId, {
+ contactId: u.contactId,
+ newestMessageAt: u.newestMessageAt,
+ oldestMessageAt: u.oldestMessageAt,
+ newestIncomingMessageAt: u.newestIncomingMessageAt,
+ })
+ return
+ }
+ if (existing.newestMessageAt < u.newestMessageAt) {
+ existing.newestMessageAt = u.newestMessageAt
+ }
+ if (existing.oldestMessageAt > u.oldestMessageAt) {
+ existing.oldestMessageAt = u.oldestMessageAt
+ }
+ if (
+ u.newestIncomingMessageAt &&
+ (!existing.newestIncomingMessageAt ||
+ existing.newestIncomingMessageAt < u.newestIncomingMessageAt)
+ ) {
+ existing.newestIncomingMessageAt = u.newestIncomingMessageAt
+ }
+}
+
+/** Fold one update into the per-Conversation map: newest timestamp and newest
+ * marker id advance independently of each other. */
+const mergeConversationUpdate = (
+ map: Map,
+ u: CoexistActivityUpdate,
+): void => {
+ const existing = map.get(u.conversationId)
+ if (!existing) {
+ map.set(u.conversationId, {
+ newestMessageAt: u.newestMessageAt,
+ aiMarkerMessageId: u.aiMarkerMessageId,
+ })
+ return
+ }
+ if (
+ u.newestMessageAt &&
+ (!existing.newestMessageAt || existing.newestMessageAt < u.newestMessageAt)
+ ) {
+ existing.newestMessageAt = u.newestMessageAt
+ }
+ existing.aiMarkerMessageId = maxNumericId(
+ existing.aiMarkerMessageId,
+ u.aiMarkerMessageId,
+ )
}
/**
- * Bump activity timestamps for a whole bulk in ONE statement per table (not two
- * queries per contact in the import loop). In coexist these columns must mirror
- * the newest API-provided message time, not the sync worker's wall clock:
+ * Bump activity timestamps (and the AI-context marker, when the caller set
+ * `aiMarkerMessageId` on its rows) for a whole bulk in ONE statement per
+ * table (not two+ queries per contact in the import loop). In coexist these
+ * columns must mirror the newest API-provided message time, not the sync
+ * worker's wall clock:
*
* - ContactInbox.firstInteractionAt: set once from the oldest message.
* - ContactInbox.lastMessageAt: set from the newest message.
* - ContactInbox.lastIncomingMessageAt: advance from the newest incoming
* message only; outgoing history must not move this field.
* - Conversation.lastActivityAt: set from the newest message.
+ * - Conversation.aiContextLastMessageId: advance to `aiMarkerMessageId`
+ * (rows where the caller left it null leave the marker untouched).
+ *
+ * Rows with a null `newestMessageAt`/`oldestMessageAt` (every message in that
+ * update used `fallbackCreatedAt`) skip the ContactInbox tracking bump — a
+ * row can exist purely to carry `aiMarkerMessageId` — but still reach the
+ * Conversation update so the marker still advances.
*
- * Each UPDATE joins a VALUES table of the deduped rows. This keeps the write
- * batched while avoiding pg array-parameter casting differences. Failures must
+ * The conversation UPDATE routes through `conversationService` (not raw
+ * `db.execute`) so it gets the same advance-only, NULL-guarded semantics for
+ * both columns plus the required cache invalidation. Failures must
* propagate: otherwise a coexist run can be marked succeeded while these
* denormalized activity columns remain null or stuck at row-creation time.
*/
export const applyCoexistActivityUpdates = async (
updates: CoexistActivityUpdate[],
+ options: { workspaceId: string },
): Promise => {
if (updates.length === 0) {
return
}
- // Dedup by id, keeping the newest ts. ids are unique per contact within a
- // batch, but a resumed/overlapping batch could repeat one — and a duplicate
- // join key in VALUES would update the row twice with no defined winner.
- const newestByContactInbox = new Map<
- string,
- {
- newestMessageAt: Date
- oldestMessageAt: Date
- newestIncomingMessageAt: Date | null
- contactId: string
- workspaceId: string
- }
- >()
- const newestByConversation = new Map()
+ // Dedup by id, keeping the newest ts (and newest marker id). ids are
+ // unique per contact within a batch, but a resumed/overlapping batch could
+ // repeat one — and a duplicate join key in VALUES would update the row
+ // twice with no defined winner.
+ const newestByContactInbox = new Map()
+ const newestByConversation = new Map()
for (const u of updates) {
- const ci = newestByContactInbox.get(u.contactInboxId)
- if (ci) {
- if (ci.newestMessageAt < u.newestMessageAt) {
- ci.newestMessageAt = u.newestMessageAt
- }
- if (ci.oldestMessageAt > u.oldestMessageAt) {
- ci.oldestMessageAt = u.oldestMessageAt
- }
- if (
- u.newestIncomingMessageAt &&
- (!ci.newestIncomingMessageAt ||
- ci.newestIncomingMessageAt < u.newestIncomingMessageAt)
- ) {
- ci.newestIncomingMessageAt = u.newestIncomingMessageAt
- }
- } else {
- newestByContactInbox.set(u.contactInboxId, {
- contactId: u.contactId,
- workspaceId: u.workspaceId,
- newestMessageAt: u.newestMessageAt,
- oldestMessageAt: u.oldestMessageAt,
- newestIncomingMessageAt: u.newestIncomingMessageAt,
- })
- }
- const cv = newestByConversation.get(u.conversationId)
- if (!cv || cv < u.newestMessageAt) {
- newestByConversation.set(u.conversationId, u.newestMessageAt)
- }
+ mergeContactInboxUpdate(newestByContactInbox, u)
+ mergeConversationUpdate(newestByConversation, u)
}
- if (newestByContactInbox.size > 0) {
- await contactInboxService.bulkUpdateTracking({
- rows: [...newestByContactInbox.entries()].map(([id, update]) => ({
- contactInboxId: id,
- contactId: update.contactId,
- workspaceId: update.workspaceId,
- firstInteractionAt: update.oldestMessageAt,
- lastMessageAt: update.newestMessageAt,
- lastIncomingMessageAt: update.newestIncomingMessageAt,
- })),
- })
- }
-
- if (newestByConversation.size > 0) {
- const conversationRows = [...newestByConversation.entries()].map(
- ([id, ts]) => sql`(${id}::int8, ${ts}::timestamptz)`,
- )
-
- await db.execute(sql`
- UPDATE "Conversation" AS t
- SET "lastActivityAt" = CASE
- WHEN t."lastActivityAt" IS NULL OR t."lastActivityAt" < u.ts THEN u.ts
- ELSE t."lastActivityAt"
- END
- FROM (VALUES ${sql.join(conversationRows, sql`, `)}) AS u(id, ts)
- WHERE t."id" = u.id
- `)
- }
+ // The two writes touch disjoint tables from disjoint maps — run in parallel.
+ await Promise.all([
+ newestByContactInbox.size > 0
+ ? contactInboxService.bulkUpdateTracking({
+ rows: [...newestByContactInbox.entries()].map(([id, update]) => ({
+ contactInboxId: id,
+ contactId: update.contactId,
+ workspaceId: options.workspaceId,
+ firstInteractionAt: update.oldestMessageAt,
+ lastMessageAt: update.newestMessageAt,
+ lastIncomingMessageAt: update.newestIncomingMessageAt,
+ })),
+ })
+ : Promise.resolve(),
+ newestByConversation.size > 0
+ ? conversationService.bulkAdvanceActivityAndAiContextMarker({
+ workspaceId: options.workspaceId,
+ rows: [...newestByConversation.entries()].map(
+ ([conversationId, v]) => ({
+ conversationId,
+ newestMessageAt: v.newestMessageAt,
+ aiMarkerMessageId: v.aiMarkerMessageId,
+ }),
+ ),
+ })
+ : Promise.resolve(),
+ ])
}
const isValidDate = (date: Date | undefined): date is Date =>
@@ -737,6 +824,7 @@ export const bulkImportMessages = async (props: {
newestMessageAt: null,
oldestMessageAt: null,
newestIncomingMessageAt: null,
+ newestMessageId: null,
}
const hasEnrichment =
@@ -953,6 +1041,11 @@ export const bulkImportMessages = async (props: {
null,
)
+ // Independent of `newestMessageAt` — computed from ALL insertedRows so a
+ // message inserted with `fallbackCreatedAt` (no valid API timestamp) still
+ // counts for the AI-context marker. See `maxMessageId` doc comment.
+ const newestMessageId = maxMessageId(insertedRows)
+
return {
importedMessages,
skippedMessages,
@@ -960,6 +1053,7 @@ export const bulkImportMessages = async (props: {
newestMessageAt,
oldestMessageAt,
newestIncomingMessageAt,
+ newestMessageId,
}
}
@@ -974,8 +1068,12 @@ export const bulkImportHistorical = async (props: {
workspaceId: string
runId: string
batch: HistoricalContactMessages[]
+ /** `IntegrationWhatsapp.coexistSkipAiContext` — when true, advance
+ * `Conversation.aiContextLastMessageId` to the newest sync-inserted
+ * message id so the AI ignores this synced history. */
+ skipAiContext: boolean
}): Promise => {
- const { inbox, workspaceId, runId, batch } = props
+ const { inbox, workspaceId, runId, batch, skipAiContext } = props
const contactsResult = await bulkImportContacts({
inbox,
@@ -1027,19 +1125,16 @@ export const bulkImportHistorical = async (props: {
for (const id of res.insertedAttachmentIds) {
insertedAttachmentIds.push(id)
}
- if (res.newestMessageAt) {
- let oldestMessageAt = res.oldestMessageAt
- if (!oldestMessageAt) {
- oldestMessageAt = res.newestMessageAt
- }
+ const aiMarkerMessageId = skipAiContext ? res.newestMessageId : null
+ if (res.newestMessageAt !== null || aiMarkerMessageId !== null) {
activityUpdates.push({
contactInboxId: link.contactInboxId,
contactId: link.contactId,
- workspaceId,
conversationId: link.conversationId,
newestMessageAt: res.newestMessageAt,
- oldestMessageAt,
+ oldestMessageAt: res.oldestMessageAt ?? res.newestMessageAt,
newestIncomingMessageAt: res.newestIncomingMessageAt,
+ aiMarkerMessageId,
})
}
} catch (error) {
@@ -1054,7 +1149,7 @@ export const bulkImportHistorical = async (props: {
)
// One UPDATE per table for the whole bulk (not two per contact in the loop).
- await applyCoexistActivityUpdates(activityUpdates)
+ await applyCoexistActivityUpdates(activityUpdates, { workspaceId })
return {
importedContacts: contactsResult.importedContacts,
diff --git a/apps/worker/src/integration/handlers/coexist/instagram-sync.ts b/apps/worker/src/integration/handlers/coexist/instagram-sync.ts
index e9c83d1bb..6f1d72e35 100644
--- a/apps/worker/src/integration/handlers/coexist/instagram-sync.ts
+++ b/apps/worker/src/integration/handlers/coexist/instagram-sync.ts
@@ -38,7 +38,10 @@ type InstagramIntegrationType = IntegrationInstagramModel["type"]
// import are identical. `Ctx` must carry the resolved inbox and `Conv` an id so
// the engine can drive imports without knowing the provider.
const runInstagramCoexistPull = async <
- Ctx extends { inbox: InboxModel },
+ Ctx extends {
+ inbox: InboxModel
+ integration: { coexistSkipAiContext: boolean }
+ },
Conv extends { id: string },
Msg,
>(
@@ -299,15 +302,22 @@ const runInstagramCoexistPull = async <
pageSkipped += imported.skippedMessages
attachmentIds.push(...imported.insertedAttachmentIds)
- if (imported.newestMessageAt && imported.oldestMessageAt) {
+ const aiMarkerMessageId = context.integration
+ .coexistSkipAiContext
+ ? imported.newestMessageId
+ : null
+ if (
+ imported.newestMessageAt !== null ||
+ aiMarkerMessageId !== null
+ ) {
activityUpdates.push({
contactInboxId: contactLink.contactInboxId,
contactId: contactLink.contactId,
- workspaceId,
conversationId: contactLink.conversationId,
newestMessageAt: imported.newestMessageAt,
oldestMessageAt: imported.oldestMessageAt,
newestIncomingMessageAt: imported.newestIncomingMessageAt,
+ aiMarkerMessageId,
})
}
@@ -338,7 +348,7 @@ const runInstagramCoexistPull = async <
),
)
- await applyCoexistActivityUpdates(activityUpdates)
+ await applyCoexistActivityUpdates(activityUpdates, { workspaceId })
importedContactTotal += pageImportedContacts
importedMessageTotal += pageImportedMessages
skippedTotal += pageSkipped
diff --git a/apps/worker/src/integration/handlers/coexist/messenger-sync.ts b/apps/worker/src/integration/handlers/coexist/messenger-sync.ts
index 5ccf80fcc..94a80e73b 100644
--- a/apps/worker/src/integration/handlers/coexist/messenger-sync.ts
+++ b/apps/worker/src/integration/handlers/coexist/messenger-sync.ts
@@ -39,6 +39,7 @@ import {
type CoexistActivityUpdate,
type ContactImportLink,
createHistoricalIdFactory,
+ maxNumericId,
} from "./bulk-historical-import"
import {
fetchConvMessages,
@@ -172,6 +173,10 @@ type SyncContext = {
jobStart: number
/** Mutated by handlers to surface non-fatal failures into currentError. */
errorRef: { current: string | undefined }
+ /** `IntegrationMessenger.coexistSkipAiContext` — when true, advance
+ * `Conversation.aiContextLastMessageId` to the newest sync-inserted
+ * message id so the AI ignores this synced history. */
+ skipAiContext: boolean
}
type PhaseResult = {
@@ -480,6 +485,7 @@ async function runMessagesPhase(ctx: SyncContext): Promise {
let convNewest: Date | null = null
let convOldest: Date | null = null
let convNewestIncoming: Date | null = null
+ let convNewestMessageId: string | null = null
try {
await fetchConvMessages({
@@ -529,22 +535,25 @@ async function runMessagesPhase(ctx: SyncContext): Promise {
) {
convNewestIncoming = result.newestIncomingMessageAt
}
+ convNewestMessageId = maxNumericId(
+ convNewestMessageId,
+ result.newestMessageId,
+ )
},
})
- if (convNewest) {
- let oldestMessageAt: Date = convNewest
- if (convOldest) {
- oldestMessageAt = convOldest
- }
+ const aiMarkerMessageId = ctx.skipAiContext
+ ? convNewestMessageId
+ : null
+ if (convNewest || aiMarkerMessageId) {
activityUpdates.push({
contactInboxId: link.contactInboxId,
contactId: link.contactId,
- workspaceId: ctx.workspaceId,
conversationId: link.conversationId,
newestMessageAt: convNewest,
- oldestMessageAt,
+ oldestMessageAt: convOldest ?? convNewest,
newestIncomingMessageAt: convNewestIncoming,
+ aiMarkerMessageId,
})
}
@@ -568,7 +577,7 @@ async function runMessagesPhase(ctx: SyncContext): Promise {
)
// One UPDATE per table for the whole chunk (not per conv/page in the loop).
- await applyCoexistActivityUpdates(activityUpdates)
+ await applyCoexistActivityUpdates(activityUpdates, { workspaceId })
// Bulk-enqueue per-attachment download jobs. The handler is idempotent
// (prefix-checked + jobId-dedup'd), so a retry of this whole chunk
@@ -817,6 +826,7 @@ export const coexistMessengerSync = async (
getLimit: () => currentLimit,
jobStart,
errorRef,
+ skipAiContext: integration.coexistSkipAiContext,
}
let finalStatus: "succeeded" | "failed" | "partial" | null = null
diff --git a/apps/worker/src/integration/handlers/coexist/whatsapp-flush.ts b/apps/worker/src/integration/handlers/coexist/whatsapp-flush.ts
index 86f7faaa7..c6226c9bc 100644
--- a/apps/worker/src/integration/handlers/coexist/whatsapp-flush.ts
+++ b/apps/worker/src/integration/handlers/coexist/whatsapp-flush.ts
@@ -964,6 +964,7 @@ export const coexistWhatsappFlush = async (
workspaceId: integration.workspaceId,
runId,
batch: flat,
+ skipAiContext: integration.coexistSkipAiContext,
})
} catch (error) {
// Count every message in this batch as failed; staging rows are NOT
diff --git a/packages/business/__tests__/conversation-service.test.ts b/packages/business/__tests__/conversation-service.test.ts
index 81fe250ab..60e57a28b 100644
--- a/packages/business/__tests__/conversation-service.test.ts
+++ b/packages/business/__tests__/conversation-service.test.ts
@@ -1,6 +1,7 @@
import { beforeEach, describe, expect, test, vi } from "vitest"
const {
+ execute,
invalidateCacheByTags,
invalidateTracking,
set,
@@ -13,6 +14,7 @@ const {
const set = vi.fn(() => ({ where }))
const update = vi.fn(() => ({ set }))
return {
+ execute: vi.fn().mockResolvedValue(undefined),
invalidateCacheByTags: vi.fn().mockResolvedValue(undefined),
invalidateTracking: vi.fn().mockResolvedValue(undefined),
set,
@@ -32,7 +34,7 @@ const {
vi.mock("@chatbotx.io/database/client", async (importOriginal) => {
const original =
await importOriginal()
- return { ...original, db: { transaction, update } }
+ return { ...original, db: { transaction, update, execute } }
})
vi.mock("../src/contact-inbox/service", () => ({
contactInboxService: {
@@ -48,35 +50,124 @@ vi.mock("@chatbotx.io/redis", () => ({
const { conversationService } = await import("../src/conversation/service")
-// Recursively collect bound parameter values from a Drizzle SQL object.
-// Drizzle stores user-supplied values as { value: T } nodes inside queryChunks.
-function collectSqlValues(
+/**
+ * Shared recursive, WeakSet-guarded traversal of a Drizzle SQL object tree.
+ * Calls `visit(node)` for every reached node — primitives and `Date`
+ * instances included (neither is added to `seen` or recursed into, mirroring
+ * how Drizzle's own leaf values behave) — then recurses into arrays/object
+ * properties unless `visit` returns `true` to prune that subtree. Each
+ * `collectSql*` helper below is a thin wrapper supplying its own `visit`
+ * predicate; none of their extraction semantics changed.
+ */
+function walkSqlNode(
node: unknown,
- seen = new WeakSet(),
- out: unknown[] = [],
-): unknown[] {
- if (!node || typeof node !== "object") {
- return out
+ visit: (node: unknown) => boolean | undefined,
+ seen: WeakSet = new WeakSet(),
+): void {
+ if (node === null || node === undefined) {
+ return
+ }
+ if (node instanceof Date || typeof node !== "object") {
+ visit(node)
+ return
+ }
+ if (seen.has(node)) {
+ return
}
- if (seen.has(node as object)) {
- return out
+ seen.add(node)
+ if (visit(node)) {
+ return
}
- seen.add(node as object)
if (Array.isArray(node)) {
for (const item of node) {
- collectSqlValues(item, seen, out)
+ walkSqlNode(item, visit, seen)
}
- return out
+ return
}
- const obj = node as Record
- if ("value" in obj && obj.value !== null && typeof obj.value !== "object") {
- out.push(obj.value)
- }
- for (const val of Object.values(obj)) {
- if (val && typeof val === "object") {
- collectSqlValues(val, seen, out)
- }
+ for (const val of Object.values(node as Record)) {
+ walkSqlNode(val, visit, seen)
}
+}
+
+// Recursively collect bound parameter values from a Drizzle SQL object.
+// Drizzle stores user-supplied values as { value: T } nodes inside queryChunks.
+function collectSqlValues(
+ node: unknown,
+ seen = new WeakSet(),
+ out: unknown[] = [],
+): unknown[] {
+ walkSqlNode(
+ node,
+ (n) => {
+ if (n === null || typeof n !== "object" || Array.isArray(n)) {
+ return
+ }
+ const obj = n as Record
+ if (
+ "value" in obj &&
+ obj.value !== null &&
+ typeof obj.value !== "object"
+ ) {
+ out.push(obj.value)
+ }
+ },
+ seen,
+ )
+ return out
+}
+
+// Recursively collect literal SQL text from a Drizzle SQL object's
+// StringChunks (`{ value: string[] }` nodes), joined in traversal order.
+function collectSqlText(
+ node: unknown,
+ seen = new WeakSet(),
+ out: string[] = [],
+): string {
+ walkSqlNode(
+ node,
+ (n) => {
+ if (n === null || typeof n !== "object" || Array.isArray(n)) {
+ return
+ }
+ const obj = n as Record
+ if (
+ Array.isArray(obj.value) &&
+ obj.value.every((v) => typeof v === "string")
+ ) {
+ out.push(...(obj.value as string[]))
+ }
+ },
+ seen,
+ )
+ return out.join("")
+}
+
+// `collectSqlValues` above only finds values Drizzle wraps as `{ value }`
+// nodes (e.g. via `eq()`/`Param`). Raw ``sql`...${x}...``` template literals
+// (used by `bulkAdvanceActivityAndAiContextMarker`) embed interpolated values
+// directly in `queryChunks`, skipping only the literal-text `StringChunk`
+// nodes. This walks those raw params instead.
+function collectSqlParams(
+ node: unknown,
+ seen = new WeakSet(),
+ out: unknown[] = [],
+): unknown[] {
+ walkSqlNode(
+ node,
+ (n) => {
+ if (n instanceof Date || (n !== null && typeof n !== "object")) {
+ out.push(n)
+ return true
+ }
+ const ctorName = (n as { constructor?: { name?: string } }).constructor
+ ?.name
+ if (ctorName === "StringChunk") {
+ return true
+ }
+ return false
+ },
+ seen,
+ )
return out
}
@@ -121,6 +212,84 @@ describe("conversationService.updateAIContextLastMessageId", () => {
})
})
+describe("conversationService.bulkAdvanceActivityAndAiContextMarker", () => {
+ beforeEach(() => {
+ vi.clearAllMocks()
+ })
+
+ test("is a no-op (no query, no invalidation) when rows is empty", async () => {
+ await conversationService.bulkAdvanceActivityAndAiContextMarker({
+ workspaceId: "ws-1",
+ rows: [],
+ })
+
+ expect(execute).not.toHaveBeenCalled()
+ expect(invalidateCacheByTags).not.toHaveBeenCalled()
+ })
+
+ test("issues exactly ONE advance-only, NULL-guarded UPDATE for the whole bulk", async () => {
+ const newestMessageAt = new Date("2026-07-01T00:00:00.000Z")
+ await conversationService.bulkAdvanceActivityAndAiContextMarker({
+ workspaceId: "ws-1",
+ rows: [
+ {
+ conversationId: "conv-1",
+ newestMessageAt,
+ aiMarkerMessageId: "100000000000001",
+ },
+ {
+ // A row can carry only a marker — dates null, marker set.
+ conversationId: "conv-2",
+ newestMessageAt: null,
+ aiMarkerMessageId: "200000000000002",
+ },
+ ],
+ })
+
+ expect(execute).toHaveBeenCalledTimes(1)
+ const sqlArg = execute.mock.calls[0][0]
+ const sqlText = collectSqlText(sqlArg)
+
+ // Advance-only CASE expressions guard both columns.
+ expect(sqlText).toContain('"lastActivityAt"')
+ expect(sqlText).toContain('"aiContextLastMessageId"')
+ expect(sqlText).toContain("u.ts IS NOT NULL")
+ expect(sqlText).toContain("u.marker IS NOT NULL")
+
+ const params = collectSqlParams(sqlArg)
+ expect(params).toContain("conv-1")
+ expect(params).toContain("conv-2")
+ expect(params).toContain("100000000000001")
+ expect(params).toContain("200000000000002")
+ expect(params).toContainEqual(newestMessageAt)
+ })
+
+ test("invalidates conversation cache tags for every affected conversation id", async () => {
+ await conversationService.bulkAdvanceActivityAndAiContextMarker({
+ workspaceId: "ws-1",
+ rows: [
+ {
+ conversationId: "conv-1",
+ newestMessageAt: new Date("2026-07-01T00:00:00.000Z"),
+ aiMarkerMessageId: "100000000000001",
+ },
+ {
+ conversationId: "conv-2",
+ newestMessageAt: null,
+ aiMarkerMessageId: null,
+ },
+ ],
+ })
+
+ expect(invalidateCacheByTags).toHaveBeenCalledWith([
+ "conversations",
+ "conversations:ws-1",
+ "conversations:conv-1",
+ "conversations:conv-2",
+ ])
+ })
+})
+
describe("conversationService.markReadByContact", () => {
beforeEach(() => {
vi.clearAllMocks()
diff --git a/packages/business/src/coexist/service.ts b/packages/business/src/coexist/service.ts
index 53e89585e..c19ff6ae1 100644
--- a/packages/business/src/coexist/service.ts
+++ b/packages/business/src/coexist/service.ts
@@ -18,6 +18,10 @@ export type CoexistEnableInput = {
integrationId: string
channel: CoexistChannel
triggerSource?: CoexistTriggerSource
+ /** When true, coexist-synced history advances
+ * `Conversation.aiContextLastMessageId` so the AI ignores it. Written only
+ * on enable — `disable` never touches the column. */
+ skipAiContext?: boolean
}
export type CoexistEnableResult =
diff --git a/packages/business/src/conversation/service.ts b/packages/business/src/conversation/service.ts
index 50250262b..832468e48 100644
--- a/packages/business/src/conversation/service.ts
+++ b/packages/business/src/conversation/service.ts
@@ -639,6 +639,61 @@ class ConversationService extends BaseService {
await this.invalidate({ workspaceId, ids: [conversationId] })
}
+ /**
+ * Batched activity + AI-context-marker advance for coexist sync writes.
+ * ONE VALUES-join UPDATE for the whole bulk (mirrors the pre-existing
+ * `lastActivityAt`-only UPDATE in `applyCoexistActivityUpdates`), extended
+ * to also advance `aiContextLastMessageId`.
+ *
+ * Both columns are advance-only and NULL-guarded per row: a null
+ * `newestMessageAt` leaves `lastActivityAt` untouched, and a null
+ * `aiMarkerMessageId` leaves `aiContextLastMessageId` untouched. The marker
+ * only ever moves FORWARD to a message id actually inserted by a coexist
+ * sync for that conversation (either direction) — never backwards, and
+ * never to an arbitrary id — so a stale/replayed batch can never regress
+ * it. Callers dedup rows by `conversationId` before calling this.
+ */
+ async bulkAdvanceActivityAndAiContextMarker(props: {
+ workspaceId: string
+ rows: Array<{
+ conversationId: string
+ newestMessageAt: Date | null
+ /** Id of the newest sync-inserted message (either direction); null = leave marker untouched. */
+ aiMarkerMessageId: string | null
+ }>
+ tx?: DatabaseClient
+ }): Promise {
+ const { workspaceId, rows, tx = db } = props
+ if (rows.length === 0) {
+ return
+ }
+
+ const valueRows = rows.map(
+ (row) => sql`(
+ ${row.conversationId}::int8,
+ ${row.newestMessageAt}::timestamptz,
+ ${row.aiMarkerMessageId}::int8
+ )`,
+ )
+
+ await tx.execute(sql`
+ UPDATE "Conversation" AS t
+ SET "lastActivityAt" = CASE
+ WHEN u.ts IS NOT NULL AND (t."lastActivityAt" IS NULL OR t."lastActivityAt" < u.ts) THEN u.ts
+ ELSE t."lastActivityAt" END,
+ "aiContextLastMessageId" = CASE
+ WHEN u.marker IS NOT NULL AND (t."aiContextLastMessageId" IS NULL OR t."aiContextLastMessageId" < u.marker) THEN u.marker
+ ELSE t."aiContextLastMessageId" END
+ FROM (VALUES ${sql.join(valueRows, sql`, `)}) AS u(id, ts, marker)
+ WHERE t."id" = u.id AND t."workspaceId" = ${workspaceId}::int8
+ `)
+
+ await this.invalidate({
+ workspaceId,
+ ids: rows.map((row) => row.conversationId),
+ })
+ }
+
async updateFlowStepState(props: {
workspaceId: string
conversationId: string
diff --git a/packages/database/drizzle/20260818035559_coexist-skip-ai-context/migration.sql b/packages/database/drizzle/20260818035559_coexist-skip-ai-context/migration.sql
new file mode 100644
index 000000000..8e76ef5e0
--- /dev/null
+++ b/packages/database/drizzle/20260818035559_coexist-skip-ai-context/migration.sql
@@ -0,0 +1,3 @@
+ALTER TABLE "IntegrationInstagram" ADD COLUMN "coexistSkipAiContext" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "IntegrationMessenger" ADD COLUMN "coexistSkipAiContext" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "IntegrationWhatsapp" ADD COLUMN "coexistSkipAiContext" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/database/drizzle/20260818035559_coexist-skip-ai-context/snapshot.json b/packages/database/drizzle/20260818035559_coexist-skip-ai-context/snapshot.json
new file mode 100644
index 000000000..c4580a872
--- /dev/null
+++ b/packages/database/drizzle/20260818035559_coexist-skip-ai-context/snapshot.json
@@ -0,0 +1,36221 @@
+{
+ "version": "8",
+ "dialect": "postgres",
+ "id": "89bbf5d4-f236-4619-959b-4b1fc8a19885",
+ "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": ["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": "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": "coexistSkipAiContext",
+ "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": "coexistSkipAiContext",
+ "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": "coexistSkipAiContext",
+ "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": "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
+ },
+ {
+ "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": ["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": "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/repositories/coexist-sync-run/repository.ts b/packages/database/src/repositories/coexist-sync-run/repository.ts
index 1bfb63013..e1325bf6a 100644
--- a/packages/database/src/repositories/coexist-sync-run/repository.ts
+++ b/packages/database/src/repositories/coexist-sync-run/repository.ts
@@ -362,11 +362,17 @@ export class CoexistSyncRunRepository {
})
}
+ /**
+ * `skipAiContext` is optional and only written when provided —
+ * `undefined` leaves `coexistSkipAiContext` untouched (e.g. `disable`
+ * must never clear a previously-set value).
+ */
setIntegrationCoexistEnabled(input: {
channel: CoexistChannel
workspaceId: string
integrationId: string
enabled: boolean
+ skipAiContext?: boolean
tx?: DatabaseClient
}): Promise {
const { tx = db } = input
@@ -376,6 +382,7 @@ export class CoexistSyncRunRepository {
workspaceId: input.workspaceId,
integrationId: input.integrationId,
enabled: input.enabled,
+ skipAiContext: input.skipAiContext,
})
}
}
@@ -388,6 +395,8 @@ type IntegrationAccessInput = {
type IntegrationUpdateInput = IntegrationAccessInput & {
enabled: boolean
+ /** Undefined = leave `coexistSkipAiContext` untouched. */
+ skipAiContext?: boolean
}
const integrationLookups = {
@@ -435,10 +444,16 @@ const integrationUpdates = {
workspaceId,
integrationId,
enabled,
+ skipAiContext,
}: IntegrationUpdateInput): Promise => {
const [row] = await tx
.update(integrationMessengerModel)
- .set({ coexistEnabled: enabled })
+ .set({
+ coexistEnabled: enabled,
+ ...(skipAiContext === undefined
+ ? {}
+ : { coexistSkipAiContext: skipAiContext }),
+ })
.where(
and(
eq(integrationMessengerModel.id, integrationId),
@@ -453,10 +468,16 @@ const integrationUpdates = {
workspaceId,
integrationId,
enabled,
+ skipAiContext,
}: IntegrationUpdateInput): Promise => {
const [row] = await tx
.update(integrationInstagramModel)
- .set({ coexistEnabled: enabled })
+ .set({
+ coexistEnabled: enabled,
+ ...(skipAiContext === undefined
+ ? {}
+ : { coexistSkipAiContext: skipAiContext }),
+ })
.where(
and(
eq(integrationInstagramModel.id, integrationId),
@@ -471,10 +492,16 @@ const integrationUpdates = {
workspaceId,
integrationId,
enabled,
+ skipAiContext,
}: IntegrationUpdateInput): Promise => {
const [row] = await tx
.update(integrationWhatsappModel)
- .set({ coexistEnabled: enabled })
+ .set({
+ coexistEnabled: enabled,
+ ...(skipAiContext === undefined
+ ? {}
+ : { coexistSkipAiContext: skipAiContext }),
+ })
.where(
and(
eq(integrationWhatsappModel.id, integrationId),
diff --git a/packages/database/src/schema/integration-instagram.ts b/packages/database/src/schema/integration-instagram.ts
index d4474a9df..be793da46 100644
--- a/packages/database/src/schema/integration-instagram.ts
+++ b/packages/database/src/schema/integration-instagram.ts
@@ -34,6 +34,7 @@ export const integrationInstagramModel = pgTable(
name: text().notNull(),
username: text().notNull(),
coexistEnabled: boolean().notNull().default(false),
+ coexistSkipAiContext: boolean().notNull().default(false),
hasCapiScope: boolean().notNull().default(false),
capiScopeCheckedAt: timestamp(timestampConfig),
datasetId: text(),
diff --git a/packages/database/src/schema/integration-messenger.ts b/packages/database/src/schema/integration-messenger.ts
index 4cfb30475..7c270feb7 100644
--- a/packages/database/src/schema/integration-messenger.ts
+++ b/packages/database/src/schema/integration-messenger.ts
@@ -43,6 +43,7 @@ export const integrationMessengerModel = pgTable(
personas: jsonb().$type().default(sql`[]`).notNull(),
personaId: text(),
coexistEnabled: boolean().notNull().default(false),
+ coexistSkipAiContext: boolean().notNull().default(false),
hasCapiScope: boolean().notNull().default(false),
capiScopeCheckedAt: timestamp(timestampConfig),
datasetId: text(),
diff --git a/packages/database/src/schema/integration-whatsapp.ts b/packages/database/src/schema/integration-whatsapp.ts
index 7956badae..b112e645c 100644
--- a/packages/database/src/schema/integration-whatsapp.ts
+++ b/packages/database/src/schema/integration-whatsapp.ts
@@ -57,6 +57,7 @@ export const integrationWhatsappModel = pgTable(
name: text().notNull(),
displayPhoneNumber: text().notNull().default(""),
coexistEnabled: boolean().notNull().default(false),
+ coexistSkipAiContext: boolean().notNull().default(false),
isCoexist: boolean().notNull().default(false),
platformType: text().notNull().default(""),
historyDeclined: boolean().notNull().default(false),
From efbc0b043d77f4cd26df026a16df023011480ff5 Mon Sep 17 00:00:00 2001
From: Hung Phan Viet
Date: Tue, 18 Aug 2026 22:47:18 +0700
Subject: [PATCH 2/3] fix(coexist): ai ignores synced history by default
---
.../__tests__/coexist-messenger-api.test.ts | 14 ++++----
apps/builder/__tests__/coexist-popup.test.tsx | 14 ++++----
.../__tests__/coexist-whatsapp-api.test.ts | 29 +++++++++--------
apps/builder/messages/ar.json | 4 +--
apps/builder/messages/da.json | 4 +--
apps/builder/messages/de.json | 4 +--
apps/builder/messages/en.json | 4 +--
apps/builder/messages/es.json | 4 +--
apps/builder/messages/fi.json | 4 +--
apps/builder/messages/fr.json | 4 +--
apps/builder/messages/he.json | 4 +--
apps/builder/messages/id.json | 4 +--
apps/builder/messages/it.json | 4 +--
apps/builder/messages/ja.json | 4 +--
apps/builder/messages/nl.json | 4 +--
apps/builder/messages/pt-BR.json | 4 +--
apps/builder/messages/pt-PT.json | 4 +--
apps/builder/messages/ro.json | 4 +--
apps/builder/messages/sv.json | 4 +--
apps/builder/messages/tr.json | 4 +--
apps/builder/messages/vi.json | 4 +--
apps/builder/messages/zh-CN.json | 4 +--
apps/builder/messages/zh-TW.json | 4 +--
.../integration-instagram/api/coexist.ts | 4 +--
.../integration-messenger/api/coexist.ts | 7 ++--
.../integration-whatsapp/api/coexist.ts | 11 ++++---
.../src/features/shared/coexist-popup.tsx | 16 +++++-----
.../__tests__/bulk-historical-import.test.ts | 32 +++++++++----------
.../__tests__/coexist-instagram-sync.test.ts | 17 +++++-----
.../__tests__/coexist-messenger-sync.test.ts | 16 +++++-----
.../__tests__/coexist-whatsapp-flush.test.ts | 16 +++++-----
.../coexist/bulk-historical-import.ts | 20 +++++++-----
.../handlers/coexist/instagram-sync.ts | 8 ++---
.../handlers/coexist/messenger-sync.ts | 17 +++++-----
.../handlers/coexist/whatsapp-flush.ts | 2 +-
packages/business/src/coexist/service.ts | 9 +++---
.../migration.sql | 3 --
.../migration.sql | 3 ++
.../snapshot.json | 8 ++---
.../coexist-sync-run/repository.ts | 30 ++++++++---------
.../src/schema/integration-instagram.ts | 2 +-
.../src/schema/integration-messenger.ts | 2 +-
.../src/schema/integration-whatsapp.ts | 2 +-
43 files changed, 187 insertions(+), 175 deletions(-)
delete mode 100644 packages/database/drizzle/20260818035559_coexist-skip-ai-context/migration.sql
create mode 100644 packages/database/drizzle/20260818153651_coexist-ai-reads-synced-history/migration.sql
rename packages/database/drizzle/{20260818035559_coexist-skip-ai-context => 20260818153651_coexist-ai-reads-synced-history}/snapshot.json (99%)
diff --git a/apps/builder/__tests__/coexist-messenger-api.test.ts b/apps/builder/__tests__/coexist-messenger-api.test.ts
index 42a59e401..e365ef312 100644
--- a/apps/builder/__tests__/coexist-messenger-api.test.ts
+++ b/apps/builder/__tests__/coexist-messenger-api.test.ts
@@ -74,7 +74,7 @@ describe("coexist APIs", () => {
mockDisable.mockResolvedValue({ success: true })
})
- test("Messenger enabled:true delegates to coexistService.enable with skipAiContext defaulted to false", async () => {
+ test("Messenger enabled:true delegates to coexistService.enable with aiReadsSyncedHistory defaulted to false", async () => {
const result = await call(
integrationMessengerCoexistAPIs.setCoexistMessengerAPI,
{ workspaceId: "ws-1", integrationId: "int-1", enabled: true },
@@ -86,19 +86,19 @@ describe("coexist APIs", () => {
workspaceId: "ws-1",
integrationId: "int-1",
channel: "messenger",
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
})
expect(mockDisable).not.toHaveBeenCalled()
})
- test("Messenger enabled:true, skipAiContext:true delegates it through to coexistService.enable", async () => {
+ test("Messenger enabled:true, aiReadsSyncedHistory:true delegates it through to coexistService.enable", async () => {
const result = await call(
integrationMessengerCoexistAPIs.setCoexistMessengerAPI,
{
workspaceId: "ws-1",
integrationId: "int-1",
enabled: true,
- skipAiContext: true,
+ aiReadsSyncedHistory: true,
},
{ context: stubContext },
)
@@ -108,7 +108,7 @@ describe("coexist APIs", () => {
workspaceId: "ws-1",
integrationId: "int-1",
channel: "messenger",
- skipAiContext: true,
+ aiReadsSyncedHistory: true,
})
})
@@ -127,7 +127,7 @@ describe("coexist APIs", () => {
})
})
- test("Instagram endpoint delegates with channel instagram and skipAiContext defaulted to false", async () => {
+ test("Instagram endpoint delegates with channel instagram and aiReadsSyncedHistory defaulted to false", async () => {
const result = await call(
integrationInstagramCoexistAPIs.setCoexistInstagramAPI,
{ workspaceId: "ws-1", integrationId: "ig-1", enabled: true },
@@ -139,7 +139,7 @@ describe("coexist APIs", () => {
workspaceId: "ws-1",
integrationId: "ig-1",
channel: "instagram",
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
})
})
diff --git a/apps/builder/__tests__/coexist-popup.test.tsx b/apps/builder/__tests__/coexist-popup.test.tsx
index c39b501e2..c3aa8654f 100644
--- a/apps/builder/__tests__/coexist-popup.test.tsx
+++ b/apps/builder/__tests__/coexist-popup.test.tsx
@@ -116,12 +116,12 @@ describe("CoexistPopup", () => {
button.textContent?.includes("coexist.decline"),
)
- test("renders the skip-AI-context switch defaulted OFF", () => {
+ test("renders the AI-reads-synced-history switch defaulted OFF (AI ignores synced history by default)", () => {
expect(switchEl()).not.toBeNull()
expect(switchEl()?.getAttribute("aria-checked")).toBe("false")
})
- test("POSTs skipAiContext: false by default when confirming enable", async () => {
+ test("POSTs aiReadsSyncedHistory: false by default when confirming enable", async () => {
await act(async () => {
enableButton()?.click()
await Promise.resolve()
@@ -134,13 +134,13 @@ describe("CoexistPopup", () => {
workspaceId: "ws-1",
integrationId: "int-1",
enabled: true,
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
}),
}),
)
})
- test("POSTs skipAiContext: true after toggling the switch on", async () => {
+ test("POSTs aiReadsSyncedHistory: true after toggling the switch on", async () => {
act(() => {
switchEl()?.click()
})
@@ -154,12 +154,12 @@ describe("CoexistPopup", () => {
expect(mockKyPost).toHaveBeenCalledWith(
expect.any(String),
expect.objectContaining({
- json: expect.objectContaining({ skipAiContext: true }),
+ json: expect.objectContaining({ aiReadsSyncedHistory: true }),
}),
)
})
- test("POSTs skipAiContext in the decline body too (enabled: false)", async () => {
+ test("POSTs aiReadsSyncedHistory in the decline body too (enabled: false)", async () => {
act(() => {
switchEl()?.click()
})
@@ -174,7 +174,7 @@ describe("CoexistPopup", () => {
expect.objectContaining({
json: expect.objectContaining({
enabled: false,
- skipAiContext: true,
+ aiReadsSyncedHistory: true,
}),
}),
)
diff --git a/apps/builder/__tests__/coexist-whatsapp-api.test.ts b/apps/builder/__tests__/coexist-whatsapp-api.test.ts
index 9b1c3e03a..f4446596b 100644
--- a/apps/builder/__tests__/coexist-whatsapp-api.test.ts
+++ b/apps/builder/__tests__/coexist-whatsapp-api.test.ts
@@ -167,10 +167,11 @@ describe("setCoexistWhatsappAPI", () => {
// Flag flipped on via the atomic UPDATE … RETURNING (one update on success).
expect(db.update).toHaveBeenCalledTimes(1)
- // skipAiContext defaults to false (zod default) and is written on enable.
+ // aiReadsSyncedHistory defaults to false (zod default) and is written on
+ // enable — the default advances the AI marker (AI ignores synced history).
expect(dbUpdateBuilder.set).toHaveBeenCalledWith({
coexistEnabled: true,
- coexistSkipAiContext: false,
+ coexistAiReadsSyncedHistory: false,
})
// CoexistSyncRun insert with the init-row values.
@@ -192,14 +193,14 @@ describe("setCoexistWhatsappAPI", () => {
expect(mockQueueAdd).not.toHaveBeenCalled()
})
- test("enabled:true, skipAiContext:true — writes coexistSkipAiContext alongside coexistEnabled", async () => {
+ test("enabled:true, aiReadsSyncedHistory:true — writes coexistAiReadsSyncedHistory alongside coexistEnabled", async () => {
const result = await call(
procedure,
{
workspaceId: "ws-1",
integrationId: "int-1",
enabled: true,
- skipAiContext: true,
+ aiReadsSyncedHistory: true,
},
{ context: stubContext },
)
@@ -207,7 +208,7 @@ describe("setCoexistWhatsappAPI", () => {
expect(result).toEqual({ success: true })
expect(dbUpdateBuilder.set).toHaveBeenCalledWith({
coexistEnabled: true,
- coexistSkipAiContext: true,
+ coexistAiReadsSyncedHistory: true,
})
})
@@ -231,21 +232,21 @@ describe("setCoexistWhatsappAPI", () => {
expect(mockQueueAdd).not.toHaveBeenCalled()
})
- test("enabled:false (decline) — never writes coexistSkipAiContext, even when the popup sent skipAiContext:true", async () => {
+ test("enabled:false (decline) — never writes coexistAiReadsSyncedHistory, even when the popup sent aiReadsSyncedHistory:true", async () => {
const result = await call(
procedure,
{
workspaceId: "ws-1",
integrationId: "int-1",
enabled: false,
- skipAiContext: true,
+ aiReadsSyncedHistory: true,
},
{ context: stubContext },
)
expect(result).toEqual({ success: true })
// The UPDATE runs BEFORE the `if (enabled)` branch — decline must never
- // write coexistSkipAiContext, regardless of what the popup sent.
+ // write coexistAiReadsSyncedHistory, regardless of what the popup sent.
expect(dbUpdateBuilder.set).toHaveBeenCalledWith({ coexistEnabled: false })
})
@@ -335,37 +336,37 @@ describe("i18n key presence (H12)", () => {
).toBeDefined()
})
- test("coexist.skipAiContextLabel is defined in en.json and vi.json", () => {
+ test("coexist.aiReadsSyncedHistoryLabel is defined in en.json and vi.json", () => {
expect(
(
enMessages as unknown as Record & {
coexist: Record
}
- ).coexist.skipAiContextLabel,
+ ).coexist.aiReadsSyncedHistoryLabel,
).toBeDefined()
expect(
(
viMessages as unknown as Record & {
coexist: Record
}
- ).coexist.skipAiContextLabel,
+ ).coexist.aiReadsSyncedHistoryLabel,
).toBeDefined()
})
- test("coexist.skipAiContextHelper is defined in en.json and vi.json", () => {
+ test("coexist.aiReadsSyncedHistoryHelper is defined in en.json and vi.json", () => {
expect(
(
enMessages as unknown as Record & {
coexist: Record
}
- ).coexist.skipAiContextHelper,
+ ).coexist.aiReadsSyncedHistoryHelper,
).toBeDefined()
expect(
(
viMessages as unknown as Record & {
coexist: Record
}
- ).coexist.skipAiContextHelper,
+ ).coexist.aiReadsSyncedHistoryHelper,
).toBeDefined()
})
diff --git a/apps/builder/messages/ar.json b/apps/builder/messages/ar.json
index cc46a29c4..0e254af6b 100644
--- a/apps/builder/messages/ar.json
+++ b/apps/builder/messages/ar.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "لا تنجح إعادة التفعيل إلا إذا كانت Meta لا تزال تحتفظ بالبيانات مؤقتًا (خلال 24 ساعة من الإعداد). وإلا، فاقطع الاتصال ثم أعده.",
"toggleHelperMessenger": "لا تنجح إعادة التفعيل إلا إذا كانت Meta لا تزال تحتفظ بالبيانات مؤقتًا (خلال 24 ساعة من الإعداد). وإلا، فاقطع اتصال صفحة Messenger ثم أعده.",
"toggleHelperWhatsapp": "لا تنجح إعادة التفعيل إلا إذا كانت Meta لا تزال تحتفظ بالبيانات مؤقتًا (خلال 24 ساعة من الإعداد). وإلا، فاقطع اتصال رقم WhatsApp ثم أعده.",
- "skipAiContextLabel": "يتجاهل الذكاء الاصطناعي السجل المتزامن",
- "skipAiContextHelper": "عند التفعيل، يتجاهل الذكاء الاصطناعي الرسائل المستوردة من هذه المزامنة ويأخذ في الاعتبار الرسائل الجديدة فقط.",
+ "aiReadsSyncedHistoryLabel": "السماح للذكاء الاصطناعي بقراءة السجل المتزامن",
+ "aiReadsSyncedHistoryHelper": "عند التفعيل، يستخدم الذكاء الاصطناعي أيضًا الرسائل المستوردة من هذه المزامنة. عند الإيقاف، لا يراعي سوى الرسائل الجديدة.",
"success": {
"enabled": "بدأت المزامنة. ستظهر جهات الاتصال والرسائل السابقة قريبًا.",
"disabled": "تم تعطيل المزامنة."
diff --git a/apps/builder/messages/da.json b/apps/builder/messages/da.json
index 6a7e48459..2c1bb9ac7 100644
--- a/apps/builder/messages/da.json
+++ b/apps/builder/messages/da.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Re-enabling kun works hvis Meta har buffered data (within 24 timer af onboarding). Otherwise afbryd og forbind igen.",
"toggleHelperMessenger": "Re-enabling kun works hvis Meta har buffered data (within 24 timer af onboarding). Otherwise afbryd og forbind igen den Messenger page.",
"toggleHelperWhatsapp": "Re-enabling kun works hvis Meta har buffered data (within 24 timer af onboarding). Otherwise afbryd og forbind igen den WhatsApp nummer.",
- "skipAiContextLabel": "AI springer synket historik over",
- "skipAiContextHelper": "Når dette er slået til, ignorerer AI'en beskeder importeret af denne synkronisering og overvejer kun nye beskeder.",
+ "aiReadsSyncedHistoryLabel": "Lad AI læse synket historik",
+ "aiReadsSyncedHistoryHelper": "Når den er slået til, bruger AI'en også beskeder importeret af denne synkronisering. Når den er slået fra, tager AI'en kun nye beskeder i betragtning.",
"success": {
"enabled": "Synkroniser started. Historical kontakter og beskeder vil appear shortly.",
"disabled": "Synkroniser deaktiveret."
diff --git a/apps/builder/messages/de.json b/apps/builder/messages/de.json
index 93f15e2d6..0edc2b311 100644
--- a/apps/builder/messages/de.json
+++ b/apps/builder/messages/de.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Eine erneute Aktivierung funktioniert nur, wenn Meta Daten gepuffert hat (innerhalb von 24 Stunden nach dem Onboarding). Andernfalls trennen und erneut verbinden.",
"toggleHelperMessenger": "Eine erneute Aktivierung funktioniert nur, wenn Meta Daten gepuffert hat (innerhalb von 24 Stunden nach dem Onboarding). Andernfalls die Messenger-Seite trennen und erneut verbinden.",
"toggleHelperWhatsapp": "Eine erneute Aktivierung funktioniert nur, wenn Meta Daten gepuffert hat (innerhalb von 24 Stunden nach dem Onboarding). Andernfalls die WhatsApp-Nummer trennen und erneut verbinden.",
- "skipAiContextLabel": "KI ignoriert Synchronverlauf",
- "skipAiContextHelper": "Wenn aktiviert, ignoriert die KI die durch diese Synchronisierung importierten Nachrichten und berücksichtigt nur neue Nachrichten.",
+ "aiReadsSyncedHistoryLabel": "KI darf Synchronverlauf lesen",
+ "aiReadsSyncedHistoryHelper": "Wenn aktiviert, nutzt die KI auch die durch diese Synchronisierung importierten Nachrichten. Wenn deaktiviert, berücksichtigt die KI nur neue Nachrichten.",
"success": {
"enabled": "Synchronisierung gestartet. Historische Kontakte und Nachrichten werden in Kürze angezeigt.",
"disabled": "Synchronisierung deaktiviert."
diff --git a/apps/builder/messages/en.json b/apps/builder/messages/en.json
index 7ae0e3433..09ff39ded 100644
--- a/apps/builder/messages/en.json
+++ b/apps/builder/messages/en.json
@@ -3041,8 +3041,8 @@
"toggleHelper": "Re-enabling only works if Meta has buffered data (within 24 hours of onboarding). Otherwise disconnect and reconnect.",
"toggleHelperMessenger": "Re-enabling only works if Meta has buffered data (within 24 hours of onboarding). Otherwise disconnect and reconnect the Messenger page.",
"toggleHelperWhatsapp": "Re-enabling only works if Meta has buffered data (within 24 hours of onboarding). Otherwise disconnect and reconnect the WhatsApp number.",
- "skipAiContextLabel": "AI skips synced history",
- "skipAiContextHelper": "When on, the AI ignores messages imported by this sync and only considers new messages.",
+ "aiReadsSyncedHistoryLabel": "Let AI read synced history",
+ "aiReadsSyncedHistoryHelper": "When on, the AI also uses messages imported by this sync. When off, the AI only considers new messages.",
"success": {
"enabled": "Sync started. Historical contacts and messages will appear shortly.",
"disabled": "Sync disabled."
diff --git a/apps/builder/messages/es.json b/apps/builder/messages/es.json
index 97207abbd..ba275c817 100644
--- a/apps/builder/messages/es.json
+++ b/apps/builder/messages/es.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Re-enabling only works si Meta tiene buffered datos (within 24 horas de onboarding). Otherwise Desconectar y reconnect.",
"toggleHelperMessenger": "Re-enabling only works si Meta tiene buffered datos (within 24 horas de onboarding). Otherwise Desconectar y reConectar el Messenger página.",
"toggleHelperWhatsapp": "Re-enabling only works si Meta tiene buffered datos (within 24 horas de onboarding). Otherwise Desconectar y reConectar el WhatsApp number.",
- "skipAiContextLabel": "La IA omite el historial sincronizado",
- "skipAiContextHelper": "Cuando está activado, la IA ignora los mensajes importados por esta sincronización y solo considera los mensajes nuevos.",
+ "aiReadsSyncedHistoryLabel": "Permitir que la IA lea el historial sincronizado",
+ "aiReadsSyncedHistoryHelper": "Si está activado, la IA también usa los mensajes importados por esta sincronización. Si está desactivado, la IA solo considera los mensajes nuevos.",
"success": {
"enabled": "Sync started. Historical contactoos y mensajes se appear shortly.",
"disabled": "Sync desactivado."
diff --git a/apps/builder/messages/fi.json b/apps/builder/messages/fi.json
index bc318806f..026312143 100644
--- a/apps/builder/messages/fi.json
+++ b/apps/builder/messages/fi.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Uudelleen käyttöönotto toimii vain, jos Metalla on puskuroidut tiedot (24 tunnin kuluessa käyttöönotosta). Muussa tapauksessa katkaise yhteys ja yhdistä uudelleen.",
"toggleHelperMessenger": "Uudelleen käyttöönotto toimii vain, jos Metalla on puskuroidut tiedot (24 tunnin kuluessa käyttöönotosta). Muussa tapauksessa katkaise Messenger-sivun yhteys ja yhdistä uudelleen.",
"toggleHelperWhatsapp": "Uudelleen käyttöönotto toimii vain, jos Metalla on puskuroidut tiedot (24 tunnin kuluessa käyttöönotosta). Muussa tapauksessa katkaise WhatsApp-numeron yhteys ja yhdistä uudelleen.",
- "skipAiContextLabel": "Tekoäly ohittaa synkronoidun historian",
- "skipAiContextHelper": "Kun tämä on käytössä, tekoäly jättää huomiotta tämän synkronoinnin tuomat viestit ja ottaa huomioon vain uudet viestit.",
+ "aiReadsSyncedHistoryLabel": "Salli tekoälyn lukea synkronoitu historia",
+ "aiReadsSyncedHistoryHelper": "Kun päällä, tekoäly käyttää myös tämän synkronoinnin tuomia viestejä. Kun pois päältä, tekoäly huomioi vain uudet viestit.",
"success": {
"enabled": "Synkronointi aloitettu. Historialliset yhteystiedot ja viestit tulevat pian näkyviin.",
"disabled": "Synkronointi poistettu käytöstä."
diff --git a/apps/builder/messages/fr.json b/apps/builder/messages/fr.json
index cc4c481a5..011b6374b 100644
--- a/apps/builder/messages/fr.json
+++ b/apps/builder/messages/fr.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "La réactivation ne fonctionne que si Meta dispose encore de données en mémoire tampon, dans les 24 heures suivant l’intégration. Sinon, déconnectez et reconnectez.",
"toggleHelperMessenger": "La réactivation ne fonctionne que si Meta dispose encore de données en mémoire tampon, dans les 24 heures suivant l’intégration. Sinon, déconnectez et reconnectez la page Messenger.",
"toggleHelperWhatsapp": "La réactivation ne fonctionne que si Meta dispose encore de données en mémoire tampon, dans les 24 heures suivant l’intégration. Sinon, déconnectez et reconnectez le numéro WhatsApp.",
- "skipAiContextLabel": "L'IA ignore l'historique synchronisé",
- "skipAiContextHelper": "Lorsque cette option est activée, l'IA ignore les messages importés par cette synchronisation et ne prend en compte que les nouveaux messages.",
+ "aiReadsSyncedHistoryLabel": "Laisser l'IA lire l'historique synchronisé",
+ "aiReadsSyncedHistoryHelper": "Si activé, l'IA utilise aussi les messages importés par cette synchronisation. Si désactivé, l'IA ne prend en compte que les nouveaux messages.",
"success": {
"enabled": "Synchronisation démarrée. Les anciens contacts et messages apparaîtront prochainement.",
"disabled": "Synchronisation désactivée."
diff --git a/apps/builder/messages/he.json b/apps/builder/messages/he.json
index 9a0d84d92..3659e1835 100644
--- a/apps/builder/messages/he.json
+++ b/apps/builder/messages/he.json
@@ -1319,8 +1319,8 @@
"toggleHelper": "הפעלה מחדש פועלת רק אם Meta שמרה נתונים במאגר (בתוך 24 שעות מההצטרפות). אחרת יש לנתק ולחבר מחדש.",
"toggleHelperMessenger": "הפעלה מחדש פועלת רק אם Meta שמרה נתונים במאגר (בתוך 24 שעות מההצטרפות). אחרת יש לנתק ולחבר מחדש את דף Messenger.",
"toggleHelperWhatsapp": "הפעלה מחדש פועלת רק אם Meta שמרה נתונים במאגר (בתוך 24 שעות מההצטרפות). אחרת יש לנתק ולחבר מחדש את מספר WhatsApp.",
- "skipAiContextLabel": "ה-AI מדלג על היסטוריה מסונכרנת",
- "skipAiContextHelper": "כאשר האפשרות פעילה, ה-AI מתעלם מהודעות שיובאו על ידי סנכרון זה ומתחשב רק בהודעות חדשות.",
+ "aiReadsSyncedHistoryLabel": "אפשר ל-AI לקרוא היסטוריה מסונכרנת",
+ "aiReadsSyncedHistoryHelper": "כשמופעל, ה-AI משתמש גם בהודעות שיובאו בסנכרון זה. כשכבוי, ה-AI מתחשב רק בהודעות חדשות.",
"success": {
"enabled": "הסנכרון התחיל. אנשי קשר והודעות היסטוריים יופיעו בקרוב.",
"disabled": "הסנכרון הושבת."
diff --git a/apps/builder/messages/id.json b/apps/builder/messages/id.json
index ed5c6d539..b28e93d4c 100644
--- a/apps/builder/messages/id.json
+++ b/apps/builder/messages/id.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Pengaktifan kembali hanya berfungsi jika Meta masih menyimpan data (dalam 24 jam sejak orientasi). Jika tidak, putuskan lalu hubungkan kembali.",
"toggleHelperMessenger": "Pengaktifan kembali hanya berfungsi jika Meta masih menyimpan data (dalam 24 jam sejak orientasi). Jika tidak, putuskan lalu hubungkan kembali halaman Messenger.",
"toggleHelperWhatsapp": "Pengaktifan kembali hanya berfungsi jika Meta masih menyimpan data (dalam 24 jam sejak orientasi). Jika tidak, putuskan lalu hubungkan kembali nomor WhatsApp.",
- "skipAiContextLabel": "AI melewati riwayat sinkronisasi",
- "skipAiContextHelper": "Jika diaktifkan, AI akan mengabaikan pesan yang diimpor oleh sinkronisasi ini dan hanya mempertimbangkan pesan baru.",
+ "aiReadsSyncedHistoryLabel": "Izinkan AI membaca riwayat sinkronisasi",
+ "aiReadsSyncedHistoryHelper": "Saat aktif, AI juga menggunakan pesan yang diimpor oleh sinkronisasi ini. Saat nonaktif, AI hanya mempertimbangkan pesan baru.",
"success": {
"enabled": "Sinkronisasi dimulai. Kontak dan pesan historis akan segera muncul.",
"disabled": "Sinkronisasi dinonaktifkan."
diff --git a/apps/builder/messages/it.json b/apps/builder/messages/it.json
index cc83b9b86..90df751f3 100644
--- a/apps/builder/messages/it.json
+++ b/apps/builder/messages/it.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "La riattivazione funziona solo se Meta dispone ancora dei dati nel buffer (entro 24 ore dall'onboarding). In caso contrario, disconnetti e riconnetti.",
"toggleHelperMessenger": "La riattivazione funziona solo se Meta dispone ancora dei dati nel buffer (entro 24 ore dall'onboarding). In caso contrario, disconnetti e riconnetti la Pagina Messenger.",
"toggleHelperWhatsapp": "La riattivazione funziona solo se Meta dispone ancora dei dati nel buffer (entro 24 ore dall'onboarding). In caso contrario, disconnetti e riconnetti il numero WhatsApp.",
- "skipAiContextLabel": "L'IA ignora la cronologia sincronizzata",
- "skipAiContextHelper": "Se attivo, l'IA ignora i messaggi importati da questa sincronizzazione e considera solo i nuovi messaggi.",
+ "aiReadsSyncedHistoryLabel": "Consenti all'IA di leggere la cronologia sincronizzata",
+ "aiReadsSyncedHistoryHelper": "Se attivo, l'IA usa anche i messaggi importati da questa sincronizzazione. Se disattivo, l'IA considera solo i nuovi messaggi.",
"success": {
"enabled": "Sincronizzazione avviata. I contatti e i messaggi storici appariranno a breve.",
"disabled": "Sincronizzazione disattivata."
diff --git a/apps/builder/messages/ja.json b/apps/builder/messages/ja.json
index 51d0d88f4..457bbae90 100644
--- a/apps/builder/messages/ja.json
+++ b/apps/builder/messages/ja.json
@@ -2929,8 +2929,8 @@
"toggleHelper": "再有効化できるのは、Metaにバッファーデータが残っている場合(オンボーディング後24時間以内)のみです。それ以外の場合は切断して再接続してください。",
"toggleHelperMessenger": "再有効化できるのは、Metaにバッファーデータが残っている場合(オンボーディング後24時間以内)のみです。それ以外の場合はMessengerページを切断して再接続してください。",
"toggleHelperWhatsapp": "再有効化できるのは、Metaにバッファーデータが残っている場合(オンボーディング後24時間以内)のみです。それ以外の場合はWhatsApp番号を切断して再接続してください。",
- "skipAiContextLabel": "AIは同期履歴をスキップ",
- "skipAiContextHelper": "オンにすると、AIはこの同期でインポートされたメッセージを無視し、新しいメッセージのみを考慮します。",
+ "aiReadsSyncedHistoryLabel": "AIに同期履歴の読み取りを許可",
+ "aiReadsSyncedHistoryHelper": "オンにすると、AIはこの同期でインポートされたメッセージも利用します。オフにすると、AIは新しいメッセージのみを考慮します。",
"success": {
"enabled": "同期を開始しました。過去の連絡先とメッセージはまもなく表示されます。",
"disabled": "同期を無効にしました。"
diff --git a/apps/builder/messages/nl.json b/apps/builder/messages/nl.json
index 1acd7a3c4..d0a90a24e 100644
--- a/apps/builder/messages/nl.json
+++ b/apps/builder/messages/nl.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Opnieuw inschakelen werkt alleen als Meta gegevens heeft gebufferd (binnen 24 uur na onboarding). Koppel anders los en opnieuw.",
"toggleHelperMessenger": "Opnieuw inschakelen werkt alleen als Meta gegevens heeft gebufferd (binnen 24 uur na onboarding). Koppel anders de Messenger-pagina los en opnieuw.",
"toggleHelperWhatsapp": "Opnieuw inschakelen werkt alleen als Meta gegevens heeft gebufferd (binnen 24 uur na onboarding). Koppel anders het WhatsApp-nummer los en opnieuw.",
- "skipAiContextLabel": "AI slaat gesynchroniseerde geschiedenis over",
- "skipAiContextHelper": "Indien ingeschakeld, negeert de AI berichten die door deze synchronisatie zijn geïmporteerd en houdt alleen rekening met nieuwe berichten.",
+ "aiReadsSyncedHistoryLabel": "AI gesynchroniseerde geschiedenis laten lezen",
+ "aiReadsSyncedHistoryHelper": "Indien ingeschakeld gebruikt de AI ook berichten die door deze synchronisatie zijn geïmporteerd. Indien uitgeschakeld houdt de AI alleen rekening met nieuwe berichten.",
"success": {
"enabled": "Synchronisatie gestart. Historische contacten en berichten verschijnen binnenkort.",
"disabled": "Synchronisatie uitgeschakeld."
diff --git a/apps/builder/messages/pt-BR.json b/apps/builder/messages/pt-BR.json
index 30403f1c4..ae659937b 100644
--- a/apps/builder/messages/pt-BR.json
+++ b/apps/builder/messages/pt-BR.json
@@ -2929,8 +2929,8 @@
"toggleHelper": "A reativação só funciona se a Meta tiver dados armazenados em buffer (dentro de 24 horas após a integração). Caso contrário, desconecte e reconecte.",
"toggleHelperMessenger": "A reativação só funciona se a Meta tiver dados armazenados em buffer (dentro de 24 horas após a integração). Caso contrário, desconecte e reconecte a página do Messenger.",
"toggleHelperWhatsapp": "A reativação só funciona se a Meta tiver dados armazenados em buffer (dentro de 24 horas após a integração). Caso contrário, desconecte e reconecte o número do WhatsApp.",
- "skipAiContextLabel": "A IA ignora o histórico sincronizado",
- "skipAiContextHelper": "Quando ativado, a IA ignora as mensagens importadas por esta sincronização e considera apenas as novas mensagens.",
+ "aiReadsSyncedHistoryLabel": "Permitir que a IA leia o histórico sincronizado",
+ "aiReadsSyncedHistoryHelper": "Quando ativado, a IA também usa as mensagens importadas por esta sincronização. Quando desativado, a IA considera apenas mensagens novas.",
"success": {
"enabled": "Sincronização iniciada. Os contatos e as mensagens do histórico aparecerão em breve.",
"disabled": "Sincronização desativada."
diff --git a/apps/builder/messages/pt-PT.json b/apps/builder/messages/pt-PT.json
index f42ccadcb..f5311776a 100644
--- a/apps/builder/messages/pt-PT.json
+++ b/apps/builder/messages/pt-PT.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "A reativação só funciona se a Meta tiver dados em memória intermédia (nas 24 horas após a integração). Caso contrário, desligue e volte a ligar.",
"toggleHelperMessenger": "A reativação só funciona se a Meta tiver dados em memória intermédia (nas 24 horas após a integração). Caso contrário, desligue e volte a ligar a página do Messenger.",
"toggleHelperWhatsapp": "A reativação só funciona se a Meta tiver dados em memória intermédia (nas 24 horas após a integração). Caso contrário, desligue e volte a ligar o número do WhatsApp.",
- "skipAiContextLabel": "A IA ignora o histórico sincronizado",
- "skipAiContextHelper": "Quando ativado, a IA ignora as mensagens importadas por esta sincronização e considera apenas as mensagens novas.",
+ "aiReadsSyncedHistoryLabel": "Permitir que a IA leia o histórico sincronizado",
+ "aiReadsSyncedHistoryHelper": "Quando ativado, a IA também utiliza as mensagens importadas por esta sincronização. Quando desativado, a IA considera apenas mensagens novas.",
"success": {
"enabled": "Sincronização iniciada. Os contactos e as mensagens do histórico aparecerão em breve.",
"disabled": "Sincronização desativada."
diff --git a/apps/builder/messages/ro.json b/apps/builder/messages/ro.json
index d68a04f85..13161efe3 100644
--- a/apps/builder/messages/ro.json
+++ b/apps/builder/messages/ro.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Reactivarea funcționează doar dacă Meta are date puse în tampon (în 24 de ore de la conectare). În caz contrar, deconectează și reconectează.",
"toggleHelperMessenger": "Reactivarea funcționează doar dacă Meta are date puse în tampon (în 24 de ore de la conectare). În caz contrar, deconectează și reconectează pagina Messenger.",
"toggleHelperWhatsapp": "Reactivarea funcționează doar dacă Meta are date puse în tampon (în 24 de ore de la conectare). În caz contrar, deconectează și reconectează numărul WhatsApp.",
- "skipAiContextLabel": "AI ignoră istoricul sincronizat",
- "skipAiContextHelper": "Când este activat, AI-ul ignoră mesajele importate prin această sincronizare și ia în considerare doar mesajele noi.",
+ "aiReadsSyncedHistoryLabel": "Permite AI să citească istoricul sincronizat",
+ "aiReadsSyncedHistoryHelper": "Când este activat, AI folosește și mesajele importate de această sincronizare. Când este dezactivat, AI ia în considerare doar mesajele noi.",
"success": {
"enabled": "Sincronizarea a început. Contactele și mesajele istorice vor apărea în curând.",
"disabled": "Sincronizare dezactivată."
diff --git a/apps/builder/messages/sv.json b/apps/builder/messages/sv.json
index 8cb14d65f..6210428d5 100644
--- a/apps/builder/messages/sv.json
+++ b/apps/builder/messages/sv.json
@@ -610,8 +610,8 @@
"toggleHelper": "Återaktivering fungerar endast om Meta har buffrad data (inom 24 timmar efter introduktionen). Annars behöver du koppla från och återansluta.",
"toggleHelperMessenger": "Återaktivering fungerar endast om Meta har buffrad data (inom 24 timmar efter introduktionen). Annars behöver du koppla från och återansluta Messenger-sidan.",
"toggleHelperWhatsapp": "Återaktivering fungerar endast om Meta har buffrad data (inom 24 timmar efter introduktionen). Annars behöver du koppla från och återansluta WhatsApp-numret.",
- "skipAiContextLabel": "AI hoppar över synkad historik",
- "skipAiContextHelper": "När det är aktiverat ignorerar AI:n meddelanden som importerats av denna synkronisering och tar endast hänsyn till nya meddelanden.",
+ "aiReadsSyncedHistoryLabel": "Låt AI läsa synkad historik",
+ "aiReadsSyncedHistoryHelper": "När den är på använder AI:n även meddelanden som importerats av denna synkronisering. När den är av beaktar AI:n endast nya meddelanden.",
"toggleLabel": "Synkronisera befintliga kontakter och chatthistorik"
},
"condition": {
diff --git a/apps/builder/messages/tr.json b/apps/builder/messages/tr.json
index a6b97def6..ddf024524 100644
--- a/apps/builder/messages/tr.json
+++ b/apps/builder/messages/tr.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Yeniden etkinleştirme yalnızca Meta'da arabelleğe alınmış veri varsa (katılımdan itibaren 24 saat içinde) çalışır. Aksi halde bağlantıyı kesip yeniden bağlayın.",
"toggleHelperMessenger": "Yeniden etkinleştirme yalnızca Meta'da arabelleğe alınmış veri varsa (katılımdan itibaren 24 saat içinde) çalışır. Aksi halde Messenger sayfasının bağlantısını kesip yeniden bağlayın.",
"toggleHelperWhatsapp": "Yeniden etkinleştirme yalnızca Meta'da arabelleğe alınmış veri varsa (katılımdan itibaren 24 saat içinde) çalışır. Aksi halde WhatsApp numarasının bağlantısını kesip yeniden bağlayın.",
- "skipAiContextLabel": "AI senkronize geçmişi atlar",
- "skipAiContextHelper": "Açıkken, yapay zeka bu senkronizasyonla içe aktarılan mesajları yok sayar ve yalnızca yeni mesajları dikkate alır.",
+ "aiReadsSyncedHistoryLabel": "AI'nın eşitlenen geçmişi okumasına izin ver",
+ "aiReadsSyncedHistoryHelper": "Açıkken AI, bu eşitlemeyle içe aktarılan mesajları da kullanır. Kapalıyken AI yalnızca yeni mesajları dikkate alır.",
"success": {
"enabled": "Senkronizasyon başlatıldı. Geçmiş kişiler ve mesajlar kısa süre içinde görünecek.",
"disabled": "Senkronizasyon devre dışı bırakıldı."
diff --git a/apps/builder/messages/vi.json b/apps/builder/messages/vi.json
index acc55f6f1..4c066040f 100644
--- a/apps/builder/messages/vi.json
+++ b/apps/builder/messages/vi.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Bật lại chỉ hoạt động nếu Meta còn đệm dữ liệu (trong vòng 24 giờ kể từ khi onboarding). Nếu không, hãy ngắt kết nối và kết nối lại.",
"toggleHelperMessenger": "Bật lại chỉ hoạt động nếu Meta còn đệm dữ liệu (trong vòng 24 giờ kể từ khi onboarding). Nếu không, hãy ngắt kết nối và kết nối lại trang Messenger.",
"toggleHelperWhatsapp": "Bật lại chỉ hoạt động nếu Meta còn đệm dữ liệu (trong vòng 24 giờ kể từ khi onboarding). Nếu không, hãy ngắt kết nối và kết nối lại số WhatsApp.",
- "skipAiContextLabel": "AI bỏ qua lịch sử đồng bộ",
- "skipAiContextHelper": "Khi bật, AI bỏ qua tin nhắn được nhập từ lần đồng bộ này và chỉ xét tin nhắn mới.",
+ "aiReadsSyncedHistoryLabel": "Cho AI dùng lịch sử đồng bộ",
+ "aiReadsSyncedHistoryHelper": "Khi bật, AI dùng cả tin nhắn được nhập từ lần đồng bộ này. Khi tắt, AI chỉ xét tin nhắn mới.",
"success": {
"enabled": "Đã bắt đầu đồng bộ. Liên hệ và tin nhắn lịch sử sẽ xuất hiện sớm.",
"disabled": "Đã tắt đồng bộ."
diff --git a/apps/builder/messages/zh-CN.json b/apps/builder/messages/zh-CN.json
index 3685bfd35..ac968477d 100644
--- a/apps/builder/messages/zh-CN.json
+++ b/apps/builder/messages/zh-CN.json
@@ -775,8 +775,8 @@
"toggleHelper": "仅当Meta 有缓冲数据时(启动后 24 小时内),重新激活才有效。否则断开并重新连接。",
"toggleHelperMessenger": "仅当Meta 有缓冲数据时(启动后 24 小时内),重新激活才有效。否则断开并重新连接Messenger页面。",
"toggleHelperWhatsapp": "仅当Meta 有缓冲数据时(启动后 24 小时内),重新激活才有效。否则,请断开并重新连接WhatsApp号码。",
- "skipAiContextLabel": "AI 跳过同步历史",
- "skipAiContextHelper": "开启后,AI 将忽略此次同步导入的消息,仅考虑新消息。",
+ "aiReadsSyncedHistoryLabel": "允许 AI 读取同步历史",
+ "aiReadsSyncedHistoryHelper": "开启后,AI 也会使用此次同步导入的消息。关闭后,AI 仅考虑新消息。",
"toggleLabel": "同步现有联系人与聊天记录"
},
"condition": {
diff --git a/apps/builder/messages/zh-TW.json b/apps/builder/messages/zh-TW.json
index aaebb82d0..fbf4cf919 100644
--- a/apps/builder/messages/zh-TW.json
+++ b/apps/builder/messages/zh-TW.json
@@ -2978,8 +2978,8 @@
"toggleHelper": "僅當Meta 有緩衝資料時(啟動後 24 小時內),重新啟用才有效。否則斷開並重新連接。",
"toggleHelperMessenger": "僅當Meta 有緩衝資料時(啟動後 24 小時內),重新啟用才有效。否則斷開並重新連接Messenger頁面。",
"toggleHelperWhatsapp": "僅當Meta 有緩衝資料時(啟動後 24 小時內),重新啟用才有效。否則,請斷開並重新連接WhatsApp號碼。",
- "skipAiContextLabel": "AI 略過同步歷史",
- "skipAiContextHelper": "開啟後,AI 將忽略此次同步匯入的訊息,僅考慮新訊息。",
+ "aiReadsSyncedHistoryLabel": "允許 AI 讀取同步歷史",
+ "aiReadsSyncedHistoryHelper": "開啟後,AI 也會使用此次同步匯入的訊息。關閉後,AI 僅考慮新訊息。",
"success": {
"enabled": "同步已開始。歷史聯絡人和訊息很快就會出現。",
"disabled": "同步已停用。"
diff --git a/apps/builder/src/features/integration-instagram/api/coexist.ts b/apps/builder/src/features/integration-instagram/api/coexist.ts
index e3fe37aea..8b7eab0ee 100644
--- a/apps/builder/src/features/integration-instagram/api/coexist.ts
+++ b/apps/builder/src/features/integration-instagram/api/coexist.ts
@@ -7,7 +7,7 @@ const setCoexistInstagramRequest = z.object({
workspaceId: z.string(),
integrationId: z.string(),
enabled: z.boolean(),
- skipAiContext: z.boolean().optional().default(false),
+ aiReadsSyncedHistory: z.boolean().optional().default(false),
})
export type SetCoexistInstagramRequest = z.infer<
typeof setCoexistInstagramRequest
@@ -42,7 +42,7 @@ export const integrationInstagramCoexistAPIs = {
workspaceId: input.workspaceId,
integrationId: input.integrationId,
channel: "instagram",
- skipAiContext: input.skipAiContext,
+ aiReadsSyncedHistory: input.aiReadsSyncedHistory,
})
: coexistService.disable({
workspaceId: input.workspaceId,
diff --git a/apps/builder/src/features/integration-messenger/api/coexist.ts b/apps/builder/src/features/integration-messenger/api/coexist.ts
index dade1b08f..8b54b5df8 100644
--- a/apps/builder/src/features/integration-messenger/api/coexist.ts
+++ b/apps/builder/src/features/integration-messenger/api/coexist.ts
@@ -7,7 +7,7 @@ const setCoexistMessengerRequest = z.object({
workspaceId: z.string(),
integrationId: z.string(),
enabled: z.boolean(),
- skipAiContext: z.boolean().optional().default(false),
+ aiReadsSyncedHistory: z.boolean().optional().default(false),
})
export type SetCoexistMessengerRequest = z.infer<
typeof setCoexistMessengerRequest
@@ -37,13 +37,14 @@ export const integrationMessengerCoexistAPIs = {
.output(setCoexistMessengerResponse)
.use(workspaceAuthorizedMidddleware, (input) => input.workspaceId)
.handler(async ({ input }) => {
- const { workspaceId, integrationId, enabled, skipAiContext } = input
+ const { workspaceId, integrationId, enabled, aiReadsSyncedHistory } =
+ input
return await (enabled
? coexistService.enable({
workspaceId,
integrationId,
channel: "messenger",
- skipAiContext,
+ aiReadsSyncedHistory,
})
: coexistService.disable({
workspaceId,
diff --git a/apps/builder/src/features/integration-whatsapp/api/coexist.ts b/apps/builder/src/features/integration-whatsapp/api/coexist.ts
index 925393893..8e1747fa7 100644
--- a/apps/builder/src/features/integration-whatsapp/api/coexist.ts
+++ b/apps/builder/src/features/integration-whatsapp/api/coexist.ts
@@ -15,7 +15,7 @@ const setCoexistWhatsappRequest = z.object({
workspaceId: z.string(),
integrationId: z.string(),
enabled: z.boolean(),
- skipAiContext: z.boolean().optional().default(false),
+ aiReadsSyncedHistory: z.boolean().optional().default(false),
})
export type SetCoexistWhatsappRequest = z.infer<
typeof setCoexistWhatsappRequest
@@ -53,20 +53,23 @@ export const integrationWhatsappCoexistAPIs = {
.output(setCoexistWhatsappResponse)
.use(workspaceAuthorizedMidddleware, (input) => input.workspaceId)
.handler(async ({ input }) => {
- const { workspaceId, integrationId, enabled, skipAiContext } = input
+ const { workspaceId, integrationId, enabled, aiReadsSyncedHistory } =
+ input
// Atomic UPDATE + RETURNING gates on workspaceId (tenancy) and yields
// phoneNumberId + auth in one round trip — no separate findFirst, no
// race window between flag write and queue enqueue.
//
- // `coexistSkipAiContext` is set ONLY when enabling — the popup also
+ // `coexistAiReadsSyncedHistory` is set ONLY when enabling — the popup also
// POSTs on decline (`enabled: false`), and this UPDATE runs before the
// `if (enabled)` branch below, so a decline must never write it.
const [updated] = await db
.update(integrationWhatsappModel)
.set({
coexistEnabled: enabled,
- ...(enabled ? { coexistSkipAiContext: skipAiContext } : {}),
+ ...(enabled
+ ? { coexistAiReadsSyncedHistory: aiReadsSyncedHistory }
+ : {}),
})
.where(
and(
diff --git a/apps/builder/src/features/shared/coexist-popup.tsx b/apps/builder/src/features/shared/coexist-popup.tsx
index 530ca943b..2dd778e40 100644
--- a/apps/builder/src/features/shared/coexist-popup.tsx
+++ b/apps/builder/src/features/shared/coexist-popup.tsx
@@ -66,9 +66,9 @@ export function CoexistPopup({
}: CoexistPopupProps) {
const t = useTranslations()
const [pending, setPending] = useState<"enable" | "decline" | null>(null)
- // Default OFF: coexist-synced history feeds the AI unless explicitly opted
- // out.
- const [skipAiContext, setSkipAiContext] = useState(false)
+ // Default OFF: the AI ignores coexist-synced history (the marker advances)
+ // unless the user explicitly opts in.
+ const [aiReadsSyncedHistory, setAiReadsSyncedHistory] = useState(false)
const handleChoice = async (enabled: boolean) => {
setPending(enabled ? "enable" : "decline")
@@ -76,7 +76,7 @@ export function CoexistPopup({
const endpoint = `/api/workspaces/${workspaceId}/integrations/${channel}/${integrationId}/coexist`
const result = await ky
.post(endpoint, {
- json: { workspaceId, integrationId, enabled, skipAiContext },
+ json: { workspaceId, integrationId, enabled, aiReadsSyncedHistory },
})
.json()
@@ -132,16 +132,16 @@ export function CoexistPopup({
- {t("coexist.skipAiContextLabel")}
+ {t("coexist.aiReadsSyncedHistoryLabel")}
- {t("coexist.skipAiContextHelper")}
+ {t("coexist.aiReadsSyncedHistoryHelper")}
diff --git a/apps/worker/__tests__/bulk-historical-import.test.ts b/apps/worker/__tests__/bulk-historical-import.test.ts
index d989d62e1..9d3d977eb 100644
--- a/apps/worker/__tests__/bulk-historical-import.test.ts
+++ b/apps/worker/__tests__/bulk-historical-import.test.ts
@@ -349,7 +349,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
batch: [],
})
@@ -382,7 +382,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
batch: [{ contact: contact("src-1"), messages: [msg("m-src-1")] }],
})
@@ -408,7 +408,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
batch: [{ contact: contact("src-1"), messages: [msg("m-src-1")] }],
})
@@ -436,7 +436,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
batch: [{ contact: contact("src-1"), messages: [] }],
})
@@ -468,7 +468,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
batch: [
{
contact: contact("src-1"),
@@ -504,7 +504,7 @@ describe("bulkImportHistorical", () => {
})
})
- it("advances the AI-context marker via conversationService when skipAiContext is true", async () => {
+ it("advances the AI marker by default (aiReadsSyncedHistory: false) so the AI ignores synced history", async () => {
stubNewContactsTransaction([
{
sourceId: "src-1",
@@ -523,7 +523,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
- skipAiContext: true,
+ aiReadsSyncedHistory: false,
batch: [
{
contact: contact("src-1"),
@@ -546,7 +546,7 @@ describe("bulkImportHistorical", () => {
)
})
- it("passes a null aiMarkerMessageId to conversationService for every row when skipAiContext is false", async () => {
+ it("leaves the marker untouched (null) for every row when aiReadsSyncedHistory is true, so the AI reads synced history", async () => {
stubNewContactsTransaction([
{
sourceId: "src-1",
@@ -563,14 +563,14 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
- skipAiContext: false,
+ aiReadsSyncedHistory: true,
batch: [
{
contact: contact("src-1"),
// A valid API createdAt so the activity row still carries a
// non-null `newestMessageAt` and reaches conversationService: with
- // skipAiContext=false AND no valid timestamp at all, no row would
- // be pushed at all (see bulk-import-messages.test.ts's
+ // aiReadsSyncedHistory=true AND no valid timestamp at all, no row
+ // would be pushed at all (see bulk-import-messages.test.ts's
// applyCoexistActivityUpdates suite for that absence case).
messages: [
msg("m-src-1", { createdAt: new Date("2026-07-01T00:00:00Z") }),
@@ -602,7 +602,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
batch: [
{
contact: contact("src-1"),
@@ -632,7 +632,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
batch: [
{ contact: contact("src-1"), messages: [msg("m-1"), msg("m-2")] },
],
@@ -663,7 +663,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
batch: [
{ contact: contact("src-shared"), messages: [msg("m-a")] },
{ contact: contact("src-shared"), messages: [msg("m-b")] },
@@ -736,7 +736,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
batch,
})
@@ -831,7 +831,7 @@ describe("bulkImportHistorical", () => {
inbox,
workspaceId,
runId: "12345",
- skipAiContext: false,
+ aiReadsSyncedHistory: false,
batch,
})
diff --git a/apps/worker/__tests__/coexist-instagram-sync.test.ts b/apps/worker/__tests__/coexist-instagram-sync.test.ts
index fb92b77d8..27ce07be6 100644
--- a/apps/worker/__tests__/coexist-instagram-sync.test.ts
+++ b/apps/worker/__tests__/coexist-instagram-sync.test.ts
@@ -139,7 +139,7 @@ describe("coexistInstagramSync", () => {
mockLoadContext.mockResolvedValue({
inbox: { id: "inbox-1" },
workspaceId: "workspace-1",
- integration: { coexistSkipAiContext: false },
+ integration: { coexistAiReadsSyncedHistory: false },
})
mockClaimRun.mockResolvedValue({
attempts: 1,
@@ -245,12 +245,8 @@ describe("coexistInstagramSync", () => {
expect(mockMarkSucceeded).toHaveBeenCalledWith({ runId: "run-ig-1" })
})
- it("threads coexistSkipAiContext=true into the row's aiMarkerMessageId, carrying the newest inserted message id", async () => {
- mockLoadContext.mockResolvedValue({
- inbox: { id: "inbox-1" },
- workspaceId: "workspace-1",
- integration: { coexistSkipAiContext: true },
- })
+ it("advances the AI marker by default (coexistAiReadsSyncedHistory off), carrying the newest inserted message id", async () => {
+ // beforeEach already wires mockLoadContext with coexistAiReadsSyncedHistory: false.
mockFetchConversationMessages.mockResolvedValue({
messages: [{ id: "message-1", message: "hi" }],
})
@@ -273,7 +269,12 @@ describe("coexistInstagramSync", () => {
expect(updates[0]?.aiMarkerMessageId).toBe("100000000000001")
})
- it("passes a null aiMarkerMessageId when coexistSkipAiContext is off", async () => {
+ it("passes a null aiMarkerMessageId when coexistAiReadsSyncedHistory is on (AI reads synced history)", async () => {
+ mockLoadContext.mockResolvedValue({
+ inbox: { id: "inbox-1" },
+ workspaceId: "workspace-1",
+ integration: { coexistAiReadsSyncedHistory: true },
+ })
mockFetchConversationMessages.mockResolvedValue({
messages: [{ id: "message-1", message: "hi" }],
})
diff --git a/apps/worker/__tests__/coexist-messenger-sync.test.ts b/apps/worker/__tests__/coexist-messenger-sync.test.ts
index 9bd034f65..9c71bc84e 100644
--- a/apps/worker/__tests__/coexist-messenger-sync.test.ts
+++ b/apps/worker/__tests__/coexist-messenger-sync.test.ts
@@ -171,7 +171,7 @@ const fakeIntegration = {
workspaceId,
pageId: PAGE_ID,
coexistEnabled: true,
- coexistSkipAiContext: false,
+ coexistAiReadsSyncedHistory: false,
inboxId: "inbox-messenger-1",
auth: {
tokens: { accessToken: "access-token-abc" },
@@ -443,11 +443,8 @@ describe("coexistMessengerSync", () => {
expect(bulkArgs.messages[0]?.sourceId).toBe("msg-xyz")
})
- it("threads coexistSkipAiContext=true into the row's aiMarkerMessageId, carrying the newest message id", async () => {
- mockFindFirstMessenger.mockResolvedValue({
- ...fakeIntegration,
- coexistSkipAiContext: true,
- })
+ it("advances the AI marker by default (coexistAiReadsSyncedHistory off), carrying the newest message id", async () => {
+ mockFindFirstMessenger.mockResolvedValue(fakeIntegration)
mockFindOrFail.mockResolvedValue(fakeInbox)
mockListConversations.mockResolvedValueOnce({
@@ -480,8 +477,11 @@ describe("coexistMessengerSync", () => {
expect(updates[0]?.aiMarkerMessageId).toBe("100000000000001")
})
- it("passes a null aiMarkerMessageId when coexistSkipAiContext is off", async () => {
- mockFindFirstMessenger.mockResolvedValue(fakeIntegration)
+ it("passes a null aiMarkerMessageId when coexistAiReadsSyncedHistory is on (AI reads synced history)", async () => {
+ mockFindFirstMessenger.mockResolvedValue({
+ ...fakeIntegration,
+ coexistAiReadsSyncedHistory: true,
+ })
mockFindOrFail.mockResolvedValue(fakeInbox)
mockListConversations.mockResolvedValueOnce({
diff --git a/apps/worker/__tests__/coexist-whatsapp-flush.test.ts b/apps/worker/__tests__/coexist-whatsapp-flush.test.ts
index 419ee65a1..594275a70 100644
--- a/apps/worker/__tests__/coexist-whatsapp-flush.test.ts
+++ b/apps/worker/__tests__/coexist-whatsapp-flush.test.ts
@@ -153,7 +153,7 @@ const fakeIntegration = {
workspaceId: "ws-1",
phoneNumberId,
coexistEnabled: true,
- coexistSkipAiContext: false,
+ coexistAiReadsSyncedHistory: false,
inboxId: "inbox-1",
}
@@ -378,7 +378,7 @@ describe("coexistWhatsappFlush", () => {
expect(bulkArgs.batch[0]?.messages[0]?.sourceId).toBe("msg-row-1")
})
- it("passes skipAiContext=false through to bulkImportHistorical when coexistSkipAiContext is off", async () => {
+ it("passes aiReadsSyncedHistory=false through to bulkImportHistorical when coexistAiReadsSyncedHistory is off", async () => {
mockFindFirst.mockResolvedValue(fakeIntegration)
mockFindOrFail.mockResolvedValue(fakeInbox)
wireSelect(defaultRunRow(), [makeStagedRow("row-1")])
@@ -386,15 +386,15 @@ describe("coexistWhatsappFlush", () => {
await coexistWhatsappFlush({ runId, phoneNumberId })
const [bulkArgs] = mockBulkImport.mock.calls[0] as [
- { skipAiContext: boolean },
+ { aiReadsSyncedHistory: boolean },
]
- expect(bulkArgs.skipAiContext).toBe(false)
+ expect(bulkArgs.aiReadsSyncedHistory).toBe(false)
})
- it("passes skipAiContext=true through to bulkImportHistorical when coexistSkipAiContext is on", async () => {
+ it("passes aiReadsSyncedHistory=true through to bulkImportHistorical when coexistAiReadsSyncedHistory is on", async () => {
mockFindFirst.mockResolvedValue({
...fakeIntegration,
- coexistSkipAiContext: true,
+ coexistAiReadsSyncedHistory: true,
})
mockFindOrFail.mockResolvedValue(fakeInbox)
wireSelect(defaultRunRow(), [makeStagedRow("row-1")])
@@ -402,9 +402,9 @@ describe("coexistWhatsappFlush", () => {
await coexistWhatsappFlush({ runId, phoneNumberId })
const [bulkArgs] = mockBulkImport.mock.calls[0] as [
- { skipAiContext: boolean },
+ { aiReadsSyncedHistory: boolean },
]
- expect(bulkArgs.skipAiContext).toBe(true)
+ expect(bulkArgs.aiReadsSyncedHistory).toBe(true)
})
it("does not synthesize system time when a WhatsApp history message has no API timestamp", async () => {
diff --git a/apps/worker/src/integration/handlers/coexist/bulk-historical-import.ts b/apps/worker/src/integration/handlers/coexist/bulk-historical-import.ts
index 15538aa69..984f3c780 100644
--- a/apps/worker/src/integration/handlers/coexist/bulk-historical-import.ts
+++ b/apps/worker/src/integration/handlers/coexist/bulk-historical-import.ts
@@ -231,8 +231,9 @@ export type CoexistActivityUpdate = {
oldestMessageAt: Date | null
newestIncomingMessageAt: Date | null
/** Id of the newest sync-inserted message for this conversation (either
- * direction), set by callers ONLY when the integration opted into
- * skipping synced history for AI; null = do not advance the marker. */
+ * direction). Set by default so the AI ignores synced history; callers
+ * null it out only when the integration opted into letting the AI read
+ * synced history. Null = do not advance the marker. */
aiMarkerMessageId: string | null
}
@@ -1068,12 +1069,13 @@ export const bulkImportHistorical = async (props: {
workspaceId: string
runId: string
batch: HistoricalContactMessages[]
- /** `IntegrationWhatsapp.coexistSkipAiContext` — when true, advance
- * `Conversation.aiContextLastMessageId` to the newest sync-inserted
- * message id so the AI ignores this synced history. */
- skipAiContext: boolean
+ /** `IntegrationWhatsapp.coexistAiReadsSyncedHistory` — when false (the
+ * default), `Conversation.aiContextLastMessageId` is advanced to the newest
+ * sync-inserted message id so the AI ignores this synced history; when
+ * true, the marker is left untouched and the AI reads the history. */
+ aiReadsSyncedHistory: boolean
}): Promise => {
- const { inbox, workspaceId, runId, batch, skipAiContext } = props
+ const { inbox, workspaceId, runId, batch, aiReadsSyncedHistory } = props
const contactsResult = await bulkImportContacts({
inbox,
@@ -1125,7 +1127,9 @@ export const bulkImportHistorical = async (props: {
for (const id of res.insertedAttachmentIds) {
insertedAttachmentIds.push(id)
}
- const aiMarkerMessageId = skipAiContext ? res.newestMessageId : null
+ const aiMarkerMessageId = aiReadsSyncedHistory
+ ? null
+ : res.newestMessageId
if (res.newestMessageAt !== null || aiMarkerMessageId !== null) {
activityUpdates.push({
contactInboxId: link.contactInboxId,
diff --git a/apps/worker/src/integration/handlers/coexist/instagram-sync.ts b/apps/worker/src/integration/handlers/coexist/instagram-sync.ts
index 6f1d72e35..be83fedec 100644
--- a/apps/worker/src/integration/handlers/coexist/instagram-sync.ts
+++ b/apps/worker/src/integration/handlers/coexist/instagram-sync.ts
@@ -40,7 +40,7 @@ type InstagramIntegrationType = IntegrationInstagramModel["type"]
const runInstagramCoexistPull = async <
Ctx extends {
inbox: InboxModel
- integration: { coexistSkipAiContext: boolean }
+ integration: { coexistAiReadsSyncedHistory: boolean }
},
Conv extends { id: string },
Msg,
@@ -303,9 +303,9 @@ const runInstagramCoexistPull = async <
attachmentIds.push(...imported.insertedAttachmentIds)
const aiMarkerMessageId = context.integration
- .coexistSkipAiContext
- ? imported.newestMessageId
- : null
+ .coexistAiReadsSyncedHistory
+ ? null
+ : imported.newestMessageId
if (
imported.newestMessageAt !== null ||
aiMarkerMessageId !== null
diff --git a/apps/worker/src/integration/handlers/coexist/messenger-sync.ts b/apps/worker/src/integration/handlers/coexist/messenger-sync.ts
index 94a80e73b..c09d1914f 100644
--- a/apps/worker/src/integration/handlers/coexist/messenger-sync.ts
+++ b/apps/worker/src/integration/handlers/coexist/messenger-sync.ts
@@ -173,10 +173,11 @@ type SyncContext = {
jobStart: number
/** Mutated by handlers to surface non-fatal failures into currentError. */
errorRef: { current: string | undefined }
- /** `IntegrationMessenger.coexistSkipAiContext` — when true, advance
- * `Conversation.aiContextLastMessageId` to the newest sync-inserted
- * message id so the AI ignores this synced history. */
- skipAiContext: boolean
+ /** `IntegrationMessenger.coexistAiReadsSyncedHistory` — when false (the
+ * default), `Conversation.aiContextLastMessageId` is advanced to the newest
+ * sync-inserted message id so the AI ignores this synced history; when
+ * true, the marker is left untouched and the AI reads the history. */
+ aiReadsSyncedHistory: boolean
}
type PhaseResult = {
@@ -542,9 +543,9 @@ async function runMessagesPhase(ctx: SyncContext): Promise {
},
})
- const aiMarkerMessageId = ctx.skipAiContext
- ? convNewestMessageId
- : null
+ const aiMarkerMessageId = ctx.aiReadsSyncedHistory
+ ? null
+ : convNewestMessageId
if (convNewest || aiMarkerMessageId) {
activityUpdates.push({
contactInboxId: link.contactInboxId,
@@ -826,7 +827,7 @@ export const coexistMessengerSync = async (
getLimit: () => currentLimit,
jobStart,
errorRef,
- skipAiContext: integration.coexistSkipAiContext,
+ aiReadsSyncedHistory: integration.coexistAiReadsSyncedHistory,
}
let finalStatus: "succeeded" | "failed" | "partial" | null = null
diff --git a/apps/worker/src/integration/handlers/coexist/whatsapp-flush.ts b/apps/worker/src/integration/handlers/coexist/whatsapp-flush.ts
index c6226c9bc..41de20f8c 100644
--- a/apps/worker/src/integration/handlers/coexist/whatsapp-flush.ts
+++ b/apps/worker/src/integration/handlers/coexist/whatsapp-flush.ts
@@ -964,7 +964,7 @@ export const coexistWhatsappFlush = async (
workspaceId: integration.workspaceId,
runId,
batch: flat,
- skipAiContext: integration.coexistSkipAiContext,
+ aiReadsSyncedHistory: integration.coexistAiReadsSyncedHistory,
})
} catch (error) {
// Count every message in this batch as failed; staging rows are NOT
diff --git a/packages/business/src/coexist/service.ts b/packages/business/src/coexist/service.ts
index c19ff6ae1..2d7c7a27f 100644
--- a/packages/business/src/coexist/service.ts
+++ b/packages/business/src/coexist/service.ts
@@ -18,10 +18,11 @@ export type CoexistEnableInput = {
integrationId: string
channel: CoexistChannel
triggerSource?: CoexistTriggerSource
- /** When true, coexist-synced history advances
- * `Conversation.aiContextLastMessageId` so the AI ignores it. Written only
- * on enable — `disable` never touches the column. */
- skipAiContext?: boolean
+ /** When false (the default), coexist-synced history advances
+ * `Conversation.aiContextLastMessageId` so the AI ignores it; when true,
+ * the AI reads the synced history. Written only on enable — `disable`
+ * never touches the column. */
+ aiReadsSyncedHistory?: boolean
}
export type CoexistEnableResult =
diff --git a/packages/database/drizzle/20260818035559_coexist-skip-ai-context/migration.sql b/packages/database/drizzle/20260818035559_coexist-skip-ai-context/migration.sql
deleted file mode 100644
index 8e76ef5e0..000000000
--- a/packages/database/drizzle/20260818035559_coexist-skip-ai-context/migration.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE "IntegrationInstagram" ADD COLUMN "coexistSkipAiContext" boolean DEFAULT false NOT NULL;--> statement-breakpoint
-ALTER TABLE "IntegrationMessenger" ADD COLUMN "coexistSkipAiContext" boolean DEFAULT false NOT NULL;--> statement-breakpoint
-ALTER TABLE "IntegrationWhatsapp" ADD COLUMN "coexistSkipAiContext" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/database/drizzle/20260818153651_coexist-ai-reads-synced-history/migration.sql b/packages/database/drizzle/20260818153651_coexist-ai-reads-synced-history/migration.sql
new file mode 100644
index 000000000..711411213
--- /dev/null
+++ b/packages/database/drizzle/20260818153651_coexist-ai-reads-synced-history/migration.sql
@@ -0,0 +1,3 @@
+ALTER TABLE "IntegrationInstagram" ADD COLUMN "coexistAiReadsSyncedHistory" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "IntegrationMessenger" ADD COLUMN "coexistAiReadsSyncedHistory" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "IntegrationWhatsapp" ADD COLUMN "coexistAiReadsSyncedHistory" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/database/drizzle/20260818035559_coexist-skip-ai-context/snapshot.json b/packages/database/drizzle/20260818153651_coexist-ai-reads-synced-history/snapshot.json
similarity index 99%
rename from packages/database/drizzle/20260818035559_coexist-skip-ai-context/snapshot.json
rename to packages/database/drizzle/20260818153651_coexist-ai-reads-synced-history/snapshot.json
index c4580a872..4280b1c6c 100644
--- a/packages/database/drizzle/20260818035559_coexist-skip-ai-context/snapshot.json
+++ b/packages/database/drizzle/20260818153651_coexist-ai-reads-synced-history/snapshot.json
@@ -1,7 +1,7 @@
{
"version": "8",
"dialect": "postgres",
- "id": "89bbf5d4-f236-4619-959b-4b1fc8a19885",
+ "id": "e968e468-5978-4041-beb1-d80d960074d8",
"prevIds": ["c6c81c93-f885-4d75-a258-b2279580dd1e"],
"ddl": [
{
@@ -14165,7 +14165,7 @@
"default": "false",
"generated": null,
"identity": null,
- "name": "coexistSkipAiContext",
+ "name": "coexistAiReadsSyncedHistory",
"entityType": "columns",
"schema": "public",
"table": "IntegrationInstagram"
@@ -14724,7 +14724,7 @@
"default": "false",
"generated": null,
"identity": null,
- "name": "coexistSkipAiContext",
+ "name": "coexistAiReadsSyncedHistory",
"entityType": "columns",
"schema": "public",
"table": "IntegrationMessenger"
@@ -16570,7 +16570,7 @@
"default": "false",
"generated": null,
"identity": null,
- "name": "coexistSkipAiContext",
+ "name": "coexistAiReadsSyncedHistory",
"entityType": "columns",
"schema": "public",
"table": "IntegrationWhatsapp"
diff --git a/packages/database/src/repositories/coexist-sync-run/repository.ts b/packages/database/src/repositories/coexist-sync-run/repository.ts
index e1325bf6a..1616fd208 100644
--- a/packages/database/src/repositories/coexist-sync-run/repository.ts
+++ b/packages/database/src/repositories/coexist-sync-run/repository.ts
@@ -363,8 +363,8 @@ export class CoexistSyncRunRepository {
}
/**
- * `skipAiContext` is optional and only written when provided —
- * `undefined` leaves `coexistSkipAiContext` untouched (e.g. `disable`
+ * `aiReadsSyncedHistory` is optional and only written when provided —
+ * `undefined` leaves `coexistAiReadsSyncedHistory` untouched (e.g. `disable`
* must never clear a previously-set value).
*/
setIntegrationCoexistEnabled(input: {
@@ -372,7 +372,7 @@ export class CoexistSyncRunRepository {
workspaceId: string
integrationId: string
enabled: boolean
- skipAiContext?: boolean
+ aiReadsSyncedHistory?: boolean
tx?: DatabaseClient
}): Promise {
const { tx = db } = input
@@ -382,7 +382,7 @@ export class CoexistSyncRunRepository {
workspaceId: input.workspaceId,
integrationId: input.integrationId,
enabled: input.enabled,
- skipAiContext: input.skipAiContext,
+ aiReadsSyncedHistory: input.aiReadsSyncedHistory,
})
}
}
@@ -395,8 +395,8 @@ type IntegrationAccessInput = {
type IntegrationUpdateInput = IntegrationAccessInput & {
enabled: boolean
- /** Undefined = leave `coexistSkipAiContext` untouched. */
- skipAiContext?: boolean
+ /** Undefined = leave `coexistAiReadsSyncedHistory` untouched. */
+ aiReadsSyncedHistory?: boolean
}
const integrationLookups = {
@@ -444,15 +444,15 @@ const integrationUpdates = {
workspaceId,
integrationId,
enabled,
- skipAiContext,
+ aiReadsSyncedHistory,
}: IntegrationUpdateInput): Promise => {
const [row] = await tx
.update(integrationMessengerModel)
.set({
coexistEnabled: enabled,
- ...(skipAiContext === undefined
+ ...(aiReadsSyncedHistory === undefined
? {}
- : { coexistSkipAiContext: skipAiContext }),
+ : { coexistAiReadsSyncedHistory: aiReadsSyncedHistory }),
})
.where(
and(
@@ -468,15 +468,15 @@ const integrationUpdates = {
workspaceId,
integrationId,
enabled,
- skipAiContext,
+ aiReadsSyncedHistory,
}: IntegrationUpdateInput): Promise => {
const [row] = await tx
.update(integrationInstagramModel)
.set({
coexistEnabled: enabled,
- ...(skipAiContext === undefined
+ ...(aiReadsSyncedHistory === undefined
? {}
- : { coexistSkipAiContext: skipAiContext }),
+ : { coexistAiReadsSyncedHistory: aiReadsSyncedHistory }),
})
.where(
and(
@@ -492,15 +492,15 @@ const integrationUpdates = {
workspaceId,
integrationId,
enabled,
- skipAiContext,
+ aiReadsSyncedHistory,
}: IntegrationUpdateInput): Promise => {
const [row] = await tx
.update(integrationWhatsappModel)
.set({
coexistEnabled: enabled,
- ...(skipAiContext === undefined
+ ...(aiReadsSyncedHistory === undefined
? {}
- : { coexistSkipAiContext: skipAiContext }),
+ : { coexistAiReadsSyncedHistory: aiReadsSyncedHistory }),
})
.where(
and(
diff --git a/packages/database/src/schema/integration-instagram.ts b/packages/database/src/schema/integration-instagram.ts
index be793da46..4423f7cca 100644
--- a/packages/database/src/schema/integration-instagram.ts
+++ b/packages/database/src/schema/integration-instagram.ts
@@ -34,7 +34,7 @@ export const integrationInstagramModel = pgTable(
name: text().notNull(),
username: text().notNull(),
coexistEnabled: boolean().notNull().default(false),
- coexistSkipAiContext: boolean().notNull().default(false),
+ coexistAiReadsSyncedHistory: boolean().notNull().default(false),
hasCapiScope: boolean().notNull().default(false),
capiScopeCheckedAt: timestamp(timestampConfig),
datasetId: text(),
diff --git a/packages/database/src/schema/integration-messenger.ts b/packages/database/src/schema/integration-messenger.ts
index 7c270feb7..57db3c89c 100644
--- a/packages/database/src/schema/integration-messenger.ts
+++ b/packages/database/src/schema/integration-messenger.ts
@@ -43,7 +43,7 @@ export const integrationMessengerModel = pgTable(
personas: jsonb().$type().default(sql`[]`).notNull(),
personaId: text(),
coexistEnabled: boolean().notNull().default(false),
- coexistSkipAiContext: boolean().notNull().default(false),
+ coexistAiReadsSyncedHistory: boolean().notNull().default(false),
hasCapiScope: boolean().notNull().default(false),
capiScopeCheckedAt: timestamp(timestampConfig),
datasetId: text(),
diff --git a/packages/database/src/schema/integration-whatsapp.ts b/packages/database/src/schema/integration-whatsapp.ts
index b112e645c..c0a10648e 100644
--- a/packages/database/src/schema/integration-whatsapp.ts
+++ b/packages/database/src/schema/integration-whatsapp.ts
@@ -57,7 +57,7 @@ export const integrationWhatsappModel = pgTable(
name: text().notNull(),
displayPhoneNumber: text().notNull().default(""),
coexistEnabled: boolean().notNull().default(false),
- coexistSkipAiContext: boolean().notNull().default(false),
+ coexistAiReadsSyncedHistory: boolean().notNull().default(false),
isCoexist: boolean().notNull().default(false),
platformType: text().notNull().default(""),
historyDeclined: boolean().notNull().default(false),
From b92612392992f5bbb2eb77b76bfd045591970400 Mon Sep 17 00:00:00 2001
From: Hung Phan Viet
Date: Tue, 18 Aug 2026 23:39:43 +0700
Subject: [PATCH 3/3] chore(coexist): shorten ai history toggle copy
---
apps/builder/messages/ar.json | 4 ++--
apps/builder/messages/da.json | 4 ++--
apps/builder/messages/de.json | 4 ++--
apps/builder/messages/en.json | 4 ++--
apps/builder/messages/es.json | 4 ++--
apps/builder/messages/fi.json | 4 ++--
apps/builder/messages/fr.json | 4 ++--
apps/builder/messages/he.json | 4 ++--
apps/builder/messages/id.json | 4 ++--
apps/builder/messages/it.json | 4 ++--
apps/builder/messages/ja.json | 4 ++--
apps/builder/messages/nl.json | 4 ++--
apps/builder/messages/pt-BR.json | 4 ++--
apps/builder/messages/pt-PT.json | 4 ++--
apps/builder/messages/ro.json | 4 ++--
apps/builder/messages/sv.json | 4 ++--
apps/builder/messages/tr.json | 4 ++--
apps/builder/messages/vi.json | 4 ++--
apps/builder/messages/zh-CN.json | 4 ++--
apps/builder/messages/zh-TW.json | 4 ++--
20 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/apps/builder/messages/ar.json b/apps/builder/messages/ar.json
index 0e254af6b..f26166af0 100644
--- a/apps/builder/messages/ar.json
+++ b/apps/builder/messages/ar.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "لا تنجح إعادة التفعيل إلا إذا كانت Meta لا تزال تحتفظ بالبيانات مؤقتًا (خلال 24 ساعة من الإعداد). وإلا، فاقطع الاتصال ثم أعده.",
"toggleHelperMessenger": "لا تنجح إعادة التفعيل إلا إذا كانت Meta لا تزال تحتفظ بالبيانات مؤقتًا (خلال 24 ساعة من الإعداد). وإلا، فاقطع اتصال صفحة Messenger ثم أعده.",
"toggleHelperWhatsapp": "لا تنجح إعادة التفعيل إلا إذا كانت Meta لا تزال تحتفظ بالبيانات مؤقتًا (خلال 24 ساعة من الإعداد). وإلا، فاقطع اتصال رقم WhatsApp ثم أعده.",
- "aiReadsSyncedHistoryLabel": "السماح للذكاء الاصطناعي بقراءة السجل المتزامن",
- "aiReadsSyncedHistoryHelper": "عند التفعيل، يستخدم الذكاء الاصطناعي أيضًا الرسائل المستوردة من هذه المزامنة. عند الإيقاف، لا يراعي سوى الرسائل الجديدة.",
+ "aiReadsSyncedHistoryLabel": "يقرأ الذكاء الاصطناعي السجل المتزامن",
+ "aiReadsSyncedHistoryHelper": "عند الإيقاف، لا يرى الذكاء الاصطناعي سوى الرسائل الجديدة.",
"success": {
"enabled": "بدأت المزامنة. ستظهر جهات الاتصال والرسائل السابقة قريبًا.",
"disabled": "تم تعطيل المزامنة."
diff --git a/apps/builder/messages/da.json b/apps/builder/messages/da.json
index 2c1bb9ac7..eeee3a853 100644
--- a/apps/builder/messages/da.json
+++ b/apps/builder/messages/da.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Re-enabling kun works hvis Meta har buffered data (within 24 timer af onboarding). Otherwise afbryd og forbind igen.",
"toggleHelperMessenger": "Re-enabling kun works hvis Meta har buffered data (within 24 timer af onboarding). Otherwise afbryd og forbind igen den Messenger page.",
"toggleHelperWhatsapp": "Re-enabling kun works hvis Meta har buffered data (within 24 timer af onboarding). Otherwise afbryd og forbind igen den WhatsApp nummer.",
- "aiReadsSyncedHistoryLabel": "Lad AI læse synket historik",
- "aiReadsSyncedHistoryHelper": "Når den er slået til, bruger AI'en også beskeder importeret af denne synkronisering. Når den er slået fra, tager AI'en kun nye beskeder i betragtning.",
+ "aiReadsSyncedHistoryLabel": "AI læser synket historik",
+ "aiReadsSyncedHistoryHelper": "Når slået fra, ser AI kun nye beskeder.",
"success": {
"enabled": "Synkroniser started. Historical kontakter og beskeder vil appear shortly.",
"disabled": "Synkroniser deaktiveret."
diff --git a/apps/builder/messages/de.json b/apps/builder/messages/de.json
index 0edc2b311..a36f78b88 100644
--- a/apps/builder/messages/de.json
+++ b/apps/builder/messages/de.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Eine erneute Aktivierung funktioniert nur, wenn Meta Daten gepuffert hat (innerhalb von 24 Stunden nach dem Onboarding). Andernfalls trennen und erneut verbinden.",
"toggleHelperMessenger": "Eine erneute Aktivierung funktioniert nur, wenn Meta Daten gepuffert hat (innerhalb von 24 Stunden nach dem Onboarding). Andernfalls die Messenger-Seite trennen und erneut verbinden.",
"toggleHelperWhatsapp": "Eine erneute Aktivierung funktioniert nur, wenn Meta Daten gepuffert hat (innerhalb von 24 Stunden nach dem Onboarding). Andernfalls die WhatsApp-Nummer trennen und erneut verbinden.",
- "aiReadsSyncedHistoryLabel": "KI darf Synchronverlauf lesen",
- "aiReadsSyncedHistoryHelper": "Wenn aktiviert, nutzt die KI auch die durch diese Synchronisierung importierten Nachrichten. Wenn deaktiviert, berücksichtigt die KI nur neue Nachrichten.",
+ "aiReadsSyncedHistoryLabel": "KI liest Synchronverlauf",
+ "aiReadsSyncedHistoryHelper": "Wenn aus, sieht die KI nur neue Nachrichten.",
"success": {
"enabled": "Synchronisierung gestartet. Historische Kontakte und Nachrichten werden in Kürze angezeigt.",
"disabled": "Synchronisierung deaktiviert."
diff --git a/apps/builder/messages/en.json b/apps/builder/messages/en.json
index 09ff39ded..a2425edec 100644
--- a/apps/builder/messages/en.json
+++ b/apps/builder/messages/en.json
@@ -3041,8 +3041,8 @@
"toggleHelper": "Re-enabling only works if Meta has buffered data (within 24 hours of onboarding). Otherwise disconnect and reconnect.",
"toggleHelperMessenger": "Re-enabling only works if Meta has buffered data (within 24 hours of onboarding). Otherwise disconnect and reconnect the Messenger page.",
"toggleHelperWhatsapp": "Re-enabling only works if Meta has buffered data (within 24 hours of onboarding). Otherwise disconnect and reconnect the WhatsApp number.",
- "aiReadsSyncedHistoryLabel": "Let AI read synced history",
- "aiReadsSyncedHistoryHelper": "When on, the AI also uses messages imported by this sync. When off, the AI only considers new messages.",
+ "aiReadsSyncedHistoryLabel": "AI reads synced history",
+ "aiReadsSyncedHistoryHelper": "When off, AI only sees new messages.",
"success": {
"enabled": "Sync started. Historical contacts and messages will appear shortly.",
"disabled": "Sync disabled."
diff --git a/apps/builder/messages/es.json b/apps/builder/messages/es.json
index ba275c817..0e8fb24a8 100644
--- a/apps/builder/messages/es.json
+++ b/apps/builder/messages/es.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Re-enabling only works si Meta tiene buffered datos (within 24 horas de onboarding). Otherwise Desconectar y reconnect.",
"toggleHelperMessenger": "Re-enabling only works si Meta tiene buffered datos (within 24 horas de onboarding). Otherwise Desconectar y reConectar el Messenger página.",
"toggleHelperWhatsapp": "Re-enabling only works si Meta tiene buffered datos (within 24 horas de onboarding). Otherwise Desconectar y reConectar el WhatsApp number.",
- "aiReadsSyncedHistoryLabel": "Permitir que la IA lea el historial sincronizado",
- "aiReadsSyncedHistoryHelper": "Si está activado, la IA también usa los mensajes importados por esta sincronización. Si está desactivado, la IA solo considera los mensajes nuevos.",
+ "aiReadsSyncedHistoryLabel": "La IA lee el historial sincronizado",
+ "aiReadsSyncedHistoryHelper": "Si está desactivado, la IA solo ve mensajes nuevos.",
"success": {
"enabled": "Sync started. Historical contactoos y mensajes se appear shortly.",
"disabled": "Sync desactivado."
diff --git a/apps/builder/messages/fi.json b/apps/builder/messages/fi.json
index 026312143..b35071050 100644
--- a/apps/builder/messages/fi.json
+++ b/apps/builder/messages/fi.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Uudelleen käyttöönotto toimii vain, jos Metalla on puskuroidut tiedot (24 tunnin kuluessa käyttöönotosta). Muussa tapauksessa katkaise yhteys ja yhdistä uudelleen.",
"toggleHelperMessenger": "Uudelleen käyttöönotto toimii vain, jos Metalla on puskuroidut tiedot (24 tunnin kuluessa käyttöönotosta). Muussa tapauksessa katkaise Messenger-sivun yhteys ja yhdistä uudelleen.",
"toggleHelperWhatsapp": "Uudelleen käyttöönotto toimii vain, jos Metalla on puskuroidut tiedot (24 tunnin kuluessa käyttöönotosta). Muussa tapauksessa katkaise WhatsApp-numeron yhteys ja yhdistä uudelleen.",
- "aiReadsSyncedHistoryLabel": "Salli tekoälyn lukea synkronoitu historia",
- "aiReadsSyncedHistoryHelper": "Kun päällä, tekoäly käyttää myös tämän synkronoinnin tuomia viestejä. Kun pois päältä, tekoäly huomioi vain uudet viestit.",
+ "aiReadsSyncedHistoryLabel": "Tekoäly lukee synkronoidun historian",
+ "aiReadsSyncedHistoryHelper": "Pois päältä: tekoäly näkee vain uudet viestit.",
"success": {
"enabled": "Synkronointi aloitettu. Historialliset yhteystiedot ja viestit tulevat pian näkyviin.",
"disabled": "Synkronointi poistettu käytöstä."
diff --git a/apps/builder/messages/fr.json b/apps/builder/messages/fr.json
index 011b6374b..65a86cfec 100644
--- a/apps/builder/messages/fr.json
+++ b/apps/builder/messages/fr.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "La réactivation ne fonctionne que si Meta dispose encore de données en mémoire tampon, dans les 24 heures suivant l’intégration. Sinon, déconnectez et reconnectez.",
"toggleHelperMessenger": "La réactivation ne fonctionne que si Meta dispose encore de données en mémoire tampon, dans les 24 heures suivant l’intégration. Sinon, déconnectez et reconnectez la page Messenger.",
"toggleHelperWhatsapp": "La réactivation ne fonctionne que si Meta dispose encore de données en mémoire tampon, dans les 24 heures suivant l’intégration. Sinon, déconnectez et reconnectez le numéro WhatsApp.",
- "aiReadsSyncedHistoryLabel": "Laisser l'IA lire l'historique synchronisé",
- "aiReadsSyncedHistoryHelper": "Si activé, l'IA utilise aussi les messages importés par cette synchronisation. Si désactivé, l'IA ne prend en compte que les nouveaux messages.",
+ "aiReadsSyncedHistoryLabel": "L'IA lit l'historique synchronisé",
+ "aiReadsSyncedHistoryHelper": "Si désactivé, l'IA ne voit que les nouveaux messages.",
"success": {
"enabled": "Synchronisation démarrée. Les anciens contacts et messages apparaîtront prochainement.",
"disabled": "Synchronisation désactivée."
diff --git a/apps/builder/messages/he.json b/apps/builder/messages/he.json
index 3659e1835..74ba696af 100644
--- a/apps/builder/messages/he.json
+++ b/apps/builder/messages/he.json
@@ -1319,8 +1319,8 @@
"toggleHelper": "הפעלה מחדש פועלת רק אם Meta שמרה נתונים במאגר (בתוך 24 שעות מההצטרפות). אחרת יש לנתק ולחבר מחדש.",
"toggleHelperMessenger": "הפעלה מחדש פועלת רק אם Meta שמרה נתונים במאגר (בתוך 24 שעות מההצטרפות). אחרת יש לנתק ולחבר מחדש את דף Messenger.",
"toggleHelperWhatsapp": "הפעלה מחדש פועלת רק אם Meta שמרה נתונים במאגר (בתוך 24 שעות מההצטרפות). אחרת יש לנתק ולחבר מחדש את מספר WhatsApp.",
- "aiReadsSyncedHistoryLabel": "אפשר ל-AI לקרוא היסטוריה מסונכרנת",
- "aiReadsSyncedHistoryHelper": "כשמופעל, ה-AI משתמש גם בהודעות שיובאו בסנכרון זה. כשכבוי, ה-AI מתחשב רק בהודעות חדשות.",
+ "aiReadsSyncedHistoryLabel": "ה-AI קורא היסטוריה מסונכרנת",
+ "aiReadsSyncedHistoryHelper": "כשכבוי, ה-AI רואה רק הודעות חדשות.",
"success": {
"enabled": "הסנכרון התחיל. אנשי קשר והודעות היסטוריים יופיעו בקרוב.",
"disabled": "הסנכרון הושבת."
diff --git a/apps/builder/messages/id.json b/apps/builder/messages/id.json
index b28e93d4c..1015ca3c1 100644
--- a/apps/builder/messages/id.json
+++ b/apps/builder/messages/id.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Pengaktifan kembali hanya berfungsi jika Meta masih menyimpan data (dalam 24 jam sejak orientasi). Jika tidak, putuskan lalu hubungkan kembali.",
"toggleHelperMessenger": "Pengaktifan kembali hanya berfungsi jika Meta masih menyimpan data (dalam 24 jam sejak orientasi). Jika tidak, putuskan lalu hubungkan kembali halaman Messenger.",
"toggleHelperWhatsapp": "Pengaktifan kembali hanya berfungsi jika Meta masih menyimpan data (dalam 24 jam sejak orientasi). Jika tidak, putuskan lalu hubungkan kembali nomor WhatsApp.",
- "aiReadsSyncedHistoryLabel": "Izinkan AI membaca riwayat sinkronisasi",
- "aiReadsSyncedHistoryHelper": "Saat aktif, AI juga menggunakan pesan yang diimpor oleh sinkronisasi ini. Saat nonaktif, AI hanya mempertimbangkan pesan baru.",
+ "aiReadsSyncedHistoryLabel": "AI membaca riwayat sinkronisasi",
+ "aiReadsSyncedHistoryHelper": "Saat nonaktif, AI hanya melihat pesan baru.",
"success": {
"enabled": "Sinkronisasi dimulai. Kontak dan pesan historis akan segera muncul.",
"disabled": "Sinkronisasi dinonaktifkan."
diff --git a/apps/builder/messages/it.json b/apps/builder/messages/it.json
index 90df751f3..8bfcad5b1 100644
--- a/apps/builder/messages/it.json
+++ b/apps/builder/messages/it.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "La riattivazione funziona solo se Meta dispone ancora dei dati nel buffer (entro 24 ore dall'onboarding). In caso contrario, disconnetti e riconnetti.",
"toggleHelperMessenger": "La riattivazione funziona solo se Meta dispone ancora dei dati nel buffer (entro 24 ore dall'onboarding). In caso contrario, disconnetti e riconnetti la Pagina Messenger.",
"toggleHelperWhatsapp": "La riattivazione funziona solo se Meta dispone ancora dei dati nel buffer (entro 24 ore dall'onboarding). In caso contrario, disconnetti e riconnetti il numero WhatsApp.",
- "aiReadsSyncedHistoryLabel": "Consenti all'IA di leggere la cronologia sincronizzata",
- "aiReadsSyncedHistoryHelper": "Se attivo, l'IA usa anche i messaggi importati da questa sincronizzazione. Se disattivo, l'IA considera solo i nuovi messaggi.",
+ "aiReadsSyncedHistoryLabel": "L'IA legge la cronologia sincronizzata",
+ "aiReadsSyncedHistoryHelper": "Se disattivo, l'IA vede solo i nuovi messaggi.",
"success": {
"enabled": "Sincronizzazione avviata. I contatti e i messaggi storici appariranno a breve.",
"disabled": "Sincronizzazione disattivata."
diff --git a/apps/builder/messages/ja.json b/apps/builder/messages/ja.json
index 457bbae90..3b4766959 100644
--- a/apps/builder/messages/ja.json
+++ b/apps/builder/messages/ja.json
@@ -2929,8 +2929,8 @@
"toggleHelper": "再有効化できるのは、Metaにバッファーデータが残っている場合(オンボーディング後24時間以内)のみです。それ以外の場合は切断して再接続してください。",
"toggleHelperMessenger": "再有効化できるのは、Metaにバッファーデータが残っている場合(オンボーディング後24時間以内)のみです。それ以外の場合はMessengerページを切断して再接続してください。",
"toggleHelperWhatsapp": "再有効化できるのは、Metaにバッファーデータが残っている場合(オンボーディング後24時間以内)のみです。それ以外の場合はWhatsApp番号を切断して再接続してください。",
- "aiReadsSyncedHistoryLabel": "AIに同期履歴の読み取りを許可",
- "aiReadsSyncedHistoryHelper": "オンにすると、AIはこの同期でインポートされたメッセージも利用します。オフにすると、AIは新しいメッセージのみを考慮します。",
+ "aiReadsSyncedHistoryLabel": "AIが同期履歴を読む",
+ "aiReadsSyncedHistoryHelper": "オフの場合、AIは新しいメッセージのみを見ます。",
"success": {
"enabled": "同期を開始しました。過去の連絡先とメッセージはまもなく表示されます。",
"disabled": "同期を無効にしました。"
diff --git a/apps/builder/messages/nl.json b/apps/builder/messages/nl.json
index d0a90a24e..bead16b10 100644
--- a/apps/builder/messages/nl.json
+++ b/apps/builder/messages/nl.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Opnieuw inschakelen werkt alleen als Meta gegevens heeft gebufferd (binnen 24 uur na onboarding). Koppel anders los en opnieuw.",
"toggleHelperMessenger": "Opnieuw inschakelen werkt alleen als Meta gegevens heeft gebufferd (binnen 24 uur na onboarding). Koppel anders de Messenger-pagina los en opnieuw.",
"toggleHelperWhatsapp": "Opnieuw inschakelen werkt alleen als Meta gegevens heeft gebufferd (binnen 24 uur na onboarding). Koppel anders het WhatsApp-nummer los en opnieuw.",
- "aiReadsSyncedHistoryLabel": "AI gesynchroniseerde geschiedenis laten lezen",
- "aiReadsSyncedHistoryHelper": "Indien ingeschakeld gebruikt de AI ook berichten die door deze synchronisatie zijn geïmporteerd. Indien uitgeschakeld houdt de AI alleen rekening met nieuwe berichten.",
+ "aiReadsSyncedHistoryLabel": "AI leest gesynchroniseerde geschiedenis",
+ "aiReadsSyncedHistoryHelper": "Indien uit, ziet de AI alleen nieuwe berichten.",
"success": {
"enabled": "Synchronisatie gestart. Historische contacten en berichten verschijnen binnenkort.",
"disabled": "Synchronisatie uitgeschakeld."
diff --git a/apps/builder/messages/pt-BR.json b/apps/builder/messages/pt-BR.json
index ae659937b..37e118777 100644
--- a/apps/builder/messages/pt-BR.json
+++ b/apps/builder/messages/pt-BR.json
@@ -2929,8 +2929,8 @@
"toggleHelper": "A reativação só funciona se a Meta tiver dados armazenados em buffer (dentro de 24 horas após a integração). Caso contrário, desconecte e reconecte.",
"toggleHelperMessenger": "A reativação só funciona se a Meta tiver dados armazenados em buffer (dentro de 24 horas após a integração). Caso contrário, desconecte e reconecte a página do Messenger.",
"toggleHelperWhatsapp": "A reativação só funciona se a Meta tiver dados armazenados em buffer (dentro de 24 horas após a integração). Caso contrário, desconecte e reconecte o número do WhatsApp.",
- "aiReadsSyncedHistoryLabel": "Permitir que a IA leia o histórico sincronizado",
- "aiReadsSyncedHistoryHelper": "Quando ativado, a IA também usa as mensagens importadas por esta sincronização. Quando desativado, a IA considera apenas mensagens novas.",
+ "aiReadsSyncedHistoryLabel": "A IA lê o histórico sincronizado",
+ "aiReadsSyncedHistoryHelper": "Quando desativado, a IA vê apenas mensagens novas.",
"success": {
"enabled": "Sincronização iniciada. Os contatos e as mensagens do histórico aparecerão em breve.",
"disabled": "Sincronização desativada."
diff --git a/apps/builder/messages/pt-PT.json b/apps/builder/messages/pt-PT.json
index f5311776a..74d9b7256 100644
--- a/apps/builder/messages/pt-PT.json
+++ b/apps/builder/messages/pt-PT.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "A reativação só funciona se a Meta tiver dados em memória intermédia (nas 24 horas após a integração). Caso contrário, desligue e volte a ligar.",
"toggleHelperMessenger": "A reativação só funciona se a Meta tiver dados em memória intermédia (nas 24 horas após a integração). Caso contrário, desligue e volte a ligar a página do Messenger.",
"toggleHelperWhatsapp": "A reativação só funciona se a Meta tiver dados em memória intermédia (nas 24 horas após a integração). Caso contrário, desligue e volte a ligar o número do WhatsApp.",
- "aiReadsSyncedHistoryLabel": "Permitir que a IA leia o histórico sincronizado",
- "aiReadsSyncedHistoryHelper": "Quando ativado, a IA também utiliza as mensagens importadas por esta sincronização. Quando desativado, a IA considera apenas mensagens novas.",
+ "aiReadsSyncedHistoryLabel": "A IA lê o histórico sincronizado",
+ "aiReadsSyncedHistoryHelper": "Quando desativado, a IA vê apenas mensagens novas.",
"success": {
"enabled": "Sincronização iniciada. Os contactos e as mensagens do histórico aparecerão em breve.",
"disabled": "Sincronização desativada."
diff --git a/apps/builder/messages/ro.json b/apps/builder/messages/ro.json
index 13161efe3..3558c4e67 100644
--- a/apps/builder/messages/ro.json
+++ b/apps/builder/messages/ro.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Reactivarea funcționează doar dacă Meta are date puse în tampon (în 24 de ore de la conectare). În caz contrar, deconectează și reconectează.",
"toggleHelperMessenger": "Reactivarea funcționează doar dacă Meta are date puse în tampon (în 24 de ore de la conectare). În caz contrar, deconectează și reconectează pagina Messenger.",
"toggleHelperWhatsapp": "Reactivarea funcționează doar dacă Meta are date puse în tampon (în 24 de ore de la conectare). În caz contrar, deconectează și reconectează numărul WhatsApp.",
- "aiReadsSyncedHistoryLabel": "Permite AI să citească istoricul sincronizat",
- "aiReadsSyncedHistoryHelper": "Când este activat, AI folosește și mesajele importate de această sincronizare. Când este dezactivat, AI ia în considerare doar mesajele noi.",
+ "aiReadsSyncedHistoryLabel": "AI citește istoricul sincronizat",
+ "aiReadsSyncedHistoryHelper": "Când este oprit, AI vede doar mesajele noi.",
"success": {
"enabled": "Sincronizarea a început. Contactele și mesajele istorice vor apărea în curând.",
"disabled": "Sincronizare dezactivată."
diff --git a/apps/builder/messages/sv.json b/apps/builder/messages/sv.json
index 6210428d5..923f22f8c 100644
--- a/apps/builder/messages/sv.json
+++ b/apps/builder/messages/sv.json
@@ -610,8 +610,8 @@
"toggleHelper": "Återaktivering fungerar endast om Meta har buffrad data (inom 24 timmar efter introduktionen). Annars behöver du koppla från och återansluta.",
"toggleHelperMessenger": "Återaktivering fungerar endast om Meta har buffrad data (inom 24 timmar efter introduktionen). Annars behöver du koppla från och återansluta Messenger-sidan.",
"toggleHelperWhatsapp": "Återaktivering fungerar endast om Meta har buffrad data (inom 24 timmar efter introduktionen). Annars behöver du koppla från och återansluta WhatsApp-numret.",
- "aiReadsSyncedHistoryLabel": "Låt AI läsa synkad historik",
- "aiReadsSyncedHistoryHelper": "När den är på använder AI:n även meddelanden som importerats av denna synkronisering. När den är av beaktar AI:n endast nya meddelanden.",
+ "aiReadsSyncedHistoryLabel": "AI läser synkad historik",
+ "aiReadsSyncedHistoryHelper": "När av ser AI endast nya meddelanden.",
"toggleLabel": "Synkronisera befintliga kontakter och chatthistorik"
},
"condition": {
diff --git a/apps/builder/messages/tr.json b/apps/builder/messages/tr.json
index ddf024524..b2dbde64b 100644
--- a/apps/builder/messages/tr.json
+++ b/apps/builder/messages/tr.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Yeniden etkinleştirme yalnızca Meta'da arabelleğe alınmış veri varsa (katılımdan itibaren 24 saat içinde) çalışır. Aksi halde bağlantıyı kesip yeniden bağlayın.",
"toggleHelperMessenger": "Yeniden etkinleştirme yalnızca Meta'da arabelleğe alınmış veri varsa (katılımdan itibaren 24 saat içinde) çalışır. Aksi halde Messenger sayfasının bağlantısını kesip yeniden bağlayın.",
"toggleHelperWhatsapp": "Yeniden etkinleştirme yalnızca Meta'da arabelleğe alınmış veri varsa (katılımdan itibaren 24 saat içinde) çalışır. Aksi halde WhatsApp numarasının bağlantısını kesip yeniden bağlayın.",
- "aiReadsSyncedHistoryLabel": "AI'nın eşitlenen geçmişi okumasına izin ver",
- "aiReadsSyncedHistoryHelper": "Açıkken AI, bu eşitlemeyle içe aktarılan mesajları da kullanır. Kapalıyken AI yalnızca yeni mesajları dikkate alır.",
+ "aiReadsSyncedHistoryLabel": "AI eşitlenen geçmişi okur",
+ "aiReadsSyncedHistoryHelper": "Kapalıyken AI yalnızca yeni mesajları görür.",
"success": {
"enabled": "Senkronizasyon başlatıldı. Geçmiş kişiler ve mesajlar kısa süre içinde görünecek.",
"disabled": "Senkronizasyon devre dışı bırakıldı."
diff --git a/apps/builder/messages/vi.json b/apps/builder/messages/vi.json
index 4c066040f..d907d3674 100644
--- a/apps/builder/messages/vi.json
+++ b/apps/builder/messages/vi.json
@@ -2945,8 +2945,8 @@
"toggleHelper": "Bật lại chỉ hoạt động nếu Meta còn đệm dữ liệu (trong vòng 24 giờ kể từ khi onboarding). Nếu không, hãy ngắt kết nối và kết nối lại.",
"toggleHelperMessenger": "Bật lại chỉ hoạt động nếu Meta còn đệm dữ liệu (trong vòng 24 giờ kể từ khi onboarding). Nếu không, hãy ngắt kết nối và kết nối lại trang Messenger.",
"toggleHelperWhatsapp": "Bật lại chỉ hoạt động nếu Meta còn đệm dữ liệu (trong vòng 24 giờ kể từ khi onboarding). Nếu không, hãy ngắt kết nối và kết nối lại số WhatsApp.",
- "aiReadsSyncedHistoryLabel": "Cho AI dùng lịch sử đồng bộ",
- "aiReadsSyncedHistoryHelper": "Khi bật, AI dùng cả tin nhắn được nhập từ lần đồng bộ này. Khi tắt, AI chỉ xét tin nhắn mới.",
+ "aiReadsSyncedHistoryLabel": "AI đọc lịch sử đồng bộ",
+ "aiReadsSyncedHistoryHelper": "Khi tắt, AI chỉ xét tin nhắn mới.",
"success": {
"enabled": "Đã bắt đầu đồng bộ. Liên hệ và tin nhắn lịch sử sẽ xuất hiện sớm.",
"disabled": "Đã tắt đồng bộ."
diff --git a/apps/builder/messages/zh-CN.json b/apps/builder/messages/zh-CN.json
index ac968477d..b4e0abe68 100644
--- a/apps/builder/messages/zh-CN.json
+++ b/apps/builder/messages/zh-CN.json
@@ -775,8 +775,8 @@
"toggleHelper": "仅当Meta 有缓冲数据时(启动后 24 小时内),重新激活才有效。否则断开并重新连接。",
"toggleHelperMessenger": "仅当Meta 有缓冲数据时(启动后 24 小时内),重新激活才有效。否则断开并重新连接Messenger页面。",
"toggleHelperWhatsapp": "仅当Meta 有缓冲数据时(启动后 24 小时内),重新激活才有效。否则,请断开并重新连接WhatsApp号码。",
- "aiReadsSyncedHistoryLabel": "允许 AI 读取同步历史",
- "aiReadsSyncedHistoryHelper": "开启后,AI 也会使用此次同步导入的消息。关闭后,AI 仅考虑新消息。",
+ "aiReadsSyncedHistoryLabel": "AI 读取同步历史",
+ "aiReadsSyncedHistoryHelper": "关闭时,AI 仅查看新消息。",
"toggleLabel": "同步现有联系人与聊天记录"
},
"condition": {
diff --git a/apps/builder/messages/zh-TW.json b/apps/builder/messages/zh-TW.json
index fbf4cf919..a9fd4a3dd 100644
--- a/apps/builder/messages/zh-TW.json
+++ b/apps/builder/messages/zh-TW.json
@@ -2978,8 +2978,8 @@
"toggleHelper": "僅當Meta 有緩衝資料時(啟動後 24 小時內),重新啟用才有效。否則斷開並重新連接。",
"toggleHelperMessenger": "僅當Meta 有緩衝資料時(啟動後 24 小時內),重新啟用才有效。否則斷開並重新連接Messenger頁面。",
"toggleHelperWhatsapp": "僅當Meta 有緩衝資料時(啟動後 24 小時內),重新啟用才有效。否則,請斷開並重新連接WhatsApp號碼。",
- "aiReadsSyncedHistoryLabel": "允許 AI 讀取同步歷史",
- "aiReadsSyncedHistoryHelper": "開啟後,AI 也會使用此次同步匯入的訊息。關閉後,AI 僅考慮新訊息。",
+ "aiReadsSyncedHistoryLabel": "AI 讀取同步歷史",
+ "aiReadsSyncedHistoryHelper": "關閉時,AI 僅查看新訊息。",
"success": {
"enabled": "同步已開始。歷史聯絡人和訊息很快就會出現。",
"disabled": "同步已停用。"