{
  "version": "1.0.0",
  "timestamp": 0,
  "packageName": "@happyvertical/smrt-messages",
  "packageVersion": "0.51.10",
  "objects": {
    "@happyvertical/smrt-messages:AccountCollection": {
      "name": "accountcollection",
      "className": "AccountCollection",
      "qualifiedName": "@happyvertical/smrt-messages:AccountCollection",
      "collection": "accounts",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/AccountCollection.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {},
      "methods": {
        "getActive": {
          "name": "getActive",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Account[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getInactive": {
          "name": "getInactive",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Account[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByProviderType": {
          "name": "getByProviderType",
          "async": true,
          "parameters": [
            {
              "name": "providerType",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Account[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByType": {
          "name": "getByType",
          "async": true,
          "parameters": [
            {
              "name": "accountType",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Account[]>",
          "isStatic": false,
          "isPublic": true
        },
        "search": {
          "name": "search",
          "async": true,
          "parameters": [
            {
              "name": "query",
              "type": "string",
              "optional": false
            },
            {
              "name": "filters",
              "type": "AccountSearchFilters",
              "optional": true
            }
          ],
          "returnType": "Promise<Account[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getStats": {
          "name": "getStats",
          "async": true,
          "parameters": [],
          "returnType": "Promise<object>",
          "isStatic": false,
          "isPublic": true
        },
        "findByTenant": {
          "name": "findByTenant",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Account[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findGlobal": {
          "name": "findGlobal",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Account[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findWithGlobals": {
          "name": "findWithGlobals",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Account[]>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {},
      "extends": "SmrtCollection",
      "extendsTypeArg": "Account",
      "exportName": "AccountCollection",
      "collectionExportName": "AccountCollectionCollection",
      "schema": {
        "tableName": "accounts",
        "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"name\" TEXT,\n  \"provider_type\" TEXT,\n  \"channel_type\" TEXT,\n  \"credential_secret_id\" TEXT,\n  \"is_active\" BOOLEAN DEFAULT TRUE,\n  \"last_sync_at\" TIMESTAMP,\n  \"settings\" TEXT,\n  \"configuration\" TEXT,\n  \"email\" TEXT,\n  \"sync_interval_minutes\" INTEGER DEFAULT 60,\n  \"workspace_id\" TEXT,\n  \"workspace_name\" TEXT,\n  \"bot_user_id\" TEXT,\n  \"handle\" TEXT,\n  \"twitter_user_id\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "name": {
            "type": "TEXT",
            "notNull": false
          },
          "provider_type": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_type": {
            "type": "TEXT",
            "notNull": false
          },
          "credential_secret_id": {
            "type": "TEXT",
            "notNull": false
          },
          "is_active": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": true
          },
          "last_sync_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "settings": {
            "type": "TEXT",
            "notNull": false
          },
          "configuration": {
            "type": "TEXT",
            "notNull": false
          },
          "email": {
            "type": "TEXT",
            "notNull": false
          },
          "sync_interval_minutes": {
            "type": "INTEGER",
            "notNull": false,
            "default": 60
          },
          "workspace_id": {
            "type": "TEXT",
            "notNull": false
          },
          "workspace_name": {
            "type": "TEXT",
            "notNull": false
          },
          "bot_user_id": {
            "type": "TEXT",
            "notNull": false
          },
          "handle": {
            "type": "TEXT",
            "notNull": false
          },
          "twitter_user_id": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "accounts_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "accounts_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "accounts_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          }
        ],
        "version": "3854ea98"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:AttachmentCollection": {
      "name": "attachmentcollection",
      "className": "AttachmentCollection",
      "qualifiedName": "@happyvertical/smrt-messages:AttachmentCollection",
      "collection": "attachments",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/AttachmentCollection.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {},
      "methods": {
        "getByMessage": {
          "name": "getByMessage",
          "async": true,
          "parameters": [
            {
              "name": "messageId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByContentType": {
          "name": "getByContentType",
          "async": true,
          "parameters": [
            {
              "name": "contentType",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getImages": {
          "name": "getImages",
          "async": true,
          "parameters": [
            {
              "name": "messageId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getPdfs": {
          "name": "getPdfs",
          "async": true,
          "parameters": [
            {
              "name": "messageId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getInline": {
          "name": "getInline",
          "async": true,
          "parameters": [
            {
              "name": "messageId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getRegular": {
          "name": "getRegular",
          "async": true,
          "parameters": [
            {
              "name": "messageId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getWithExternalFiles": {
          "name": "getWithExternalFiles",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getTotalSize": {
          "name": "getTotalSize",
          "async": true,
          "parameters": [
            {
              "name": "messageId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<number>",
          "isStatic": false,
          "isPublic": true
        },
        "getLargest": {
          "name": "getLargest",
          "async": true,
          "parameters": [
            {
              "name": "limit",
              "type": "any",
              "optional": true
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "searchByFilename": {
          "name": "searchByFilename",
          "async": true,
          "parameters": [
            {
              "name": "query",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByExtension": {
          "name": "getByExtension",
          "async": true,
          "parameters": [
            {
              "name": "extension",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getStats": {
          "name": "getStats",
          "async": true,
          "parameters": [],
          "returnType": "Promise<object>",
          "isStatic": false,
          "isPublic": true
        },
        "deleteByMessage": {
          "name": "deleteByMessage",
          "async": true,
          "parameters": [
            {
              "name": "messageId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<number>",
          "isStatic": false,
          "isPublic": true
        },
        "findByTenant": {
          "name": "findByTenant",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findGlobal": {
          "name": "findGlobal",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findWithGlobals": {
          "name": "findWithGlobals",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {},
      "extends": "SmrtCollection",
      "extendsTypeArg": "Attachment",
      "exportName": "AttachmentCollection",
      "collectionExportName": "AttachmentCollectionCollection",
      "schema": {
        "tableName": "attachments",
        "ddl": "CREATE TABLE IF NOT EXISTS \"attachments\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"message_id\" UUID,\n  \"filename\" TEXT,\n  \"content_type\" TEXT,\n  \"size\" INTEGER NOT NULL DEFAULT 0,\n  \"content_id\" TEXT,\n  \"content_disposition\" TEXT DEFAULT 'attachment',\n  \"file_path\" TEXT,\n  \"source_url\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false,
            "unique": false
          },
          "message_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "unique": false,
            "foreignKey": {
              "table": "messages",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "filename": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "content_type": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "size": {
            "type": "INTEGER",
            "notNull": true,
            "unique": false,
            "default": 0
          },
          "content_id": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "content_disposition": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": "attachment"
          },
          "file_path": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "source_url": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          }
        },
        "indexes": [
          {
            "name": "attachments_slug_context_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "attachments_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "attachments_message_id_idx",
            "columns": [
              "message_id"
            ]
          }
        ],
        "version": "ee5ae0dd"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:BlacklistCollection": {
      "name": "blacklistcollection",
      "className": "BlacklistCollection",
      "qualifiedName": "@happyvertical/smrt-messages:BlacklistCollection",
      "collection": "blacklists",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/BlacklistCollection.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {},
      "methods": {
        "isBlacklisted": {
          "name": "isBlacklisted",
          "async": true,
          "parameters": [
            {
              "name": "email",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<boolean>",
          "isStatic": false,
          "isPublic": true
        },
        "getMatchingEntry": {
          "name": "getMatchingEntry",
          "async": true,
          "parameters": [
            {
              "name": "email",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Blacklist | null>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {},
      "extends": "SmrtCollection",
      "extendsTypeArg": "Blacklist",
      "exportName": "BlacklistCollection",
      "collectionExportName": "BlacklistCollectionCollection",
      "schema": {
        "tableName": "blacklists",
        "ddl": "CREATE TABLE IF NOT EXISTS \"blacklists\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"pattern\" TEXT DEFAULT '',\n  \"type\" TEXT DEFAULT 'email',\n  \"reason\" TEXT DEFAULT '',\n  \"auto_archive\" BOOLEAN DEFAULT TRUE,\n  \"tenant_id\" UUID NOT NULL\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "pattern": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": ""
          },
          "type": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": "email"
          },
          "reason": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": ""
          },
          "auto_archive": {
            "type": "BOOLEAN",
            "notNull": false,
            "unique": false,
            "default": true
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": true,
            "unique": false
          }
        },
        "indexes": [
          {
            "name": "blacklists_slug_context_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context"
            ],
            "unique": true
          },
          {
            "name": "blacklists_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          }
        ],
        "version": "04efaa8d"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:EmailAccountCollection": {
      "name": "emailaccountcollection",
      "className": "EmailAccountCollection",
      "qualifiedName": "@happyvertical/smrt-messages:EmailAccountCollection",
      "collection": "accounts",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/EmailAccountCollection.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {},
      "methods": {
        "getActive": {
          "name": "getActive",
          "async": true,
          "parameters": [],
          "returnType": "Promise<EmailAccount[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getInactive": {
          "name": "getInactive",
          "async": true,
          "parameters": [],
          "returnType": "Promise<EmailAccount[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByProviderType": {
          "name": "getByProviderType",
          "async": true,
          "parameters": [
            {
              "name": "providerType",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailAccount[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByType": {
          "name": "getByType",
          "async": true,
          "parameters": [
            {
              "name": "accountType",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Account[]>",
          "isStatic": false,
          "isPublic": true
        },
        "search": {
          "name": "search",
          "async": true,
          "parameters": [
            {
              "name": "query",
              "type": "string",
              "optional": false
            },
            {
              "name": "filters",
              "type": "EmailAccountSearchFilters",
              "optional": true
            }
          ],
          "returnType": "Promise<EmailAccount[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getStats": {
          "name": "getStats",
          "async": true,
          "parameters": [],
          "returnType": "Promise<object>",
          "isStatic": false,
          "isPublic": true
        },
        "findByTenant": {
          "name": "findByTenant",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailAccount[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findGlobal": {
          "name": "findGlobal",
          "async": true,
          "parameters": [],
          "returnType": "Promise<EmailAccount[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findWithGlobals": {
          "name": "findWithGlobals",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailAccount[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByEmail": {
          "name": "getByEmail",
          "async": true,
          "parameters": [
            {
              "name": "email",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailAccount | null>",
          "isStatic": false,
          "isPublic": true
        },
        "getByEmailProviderType": {
          "name": "getByEmailProviderType",
          "async": true,
          "parameters": [
            {
              "name": "providerType",
              "type": "ProviderType",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailAccount[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getNeedingSync": {
          "name": "getNeedingSync",
          "async": true,
          "parameters": [
            {
              "name": "maxAgeMinutes",
              "type": "any",
              "optional": true
            }
          ],
          "returnType": "Promise<EmailAccount[]>",
          "isStatic": false,
          "isPublic": true
        },
        "searchEmailAccounts": {
          "name": "searchEmailAccounts",
          "async": true,
          "parameters": [
            {
              "name": "query",
              "type": "string",
              "optional": false
            },
            {
              "name": "filters",
              "type": "EmailAccountSearchFilters",
              "optional": true
            }
          ],
          "returnType": "Promise<EmailAccount[]>",
          "isStatic": false,
          "isPublic": true
        },
        "syncAll": {
          "name": "syncAll",
          "async": true,
          "parameters": [
            {
              "name": "options",
              "type": "SyncOptions",
              "optional": true
            }
          ],
          "returnType": "Promise<Map<string, object>>",
          "isStatic": false,
          "isPublic": true
        },
        "getTotalUnreadCount": {
          "name": "getTotalUnreadCount",
          "async": true,
          "parameters": [],
          "returnType": "Promise<number>",
          "isStatic": false,
          "isPublic": true
        },
        "getEmailStats": {
          "name": "getEmailStats",
          "async": true,
          "parameters": [],
          "returnType": "Promise<object>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableName": "accounts"
      },
      "extends": "AccountCollection",
      "exportName": "EmailAccountCollection",
      "collectionExportName": "EmailAccountCollectionCollection",
      "schema": {
        "tableName": "accounts",
        "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"name\" TEXT,\n  \"provider_type\" TEXT,\n  \"channel_type\" TEXT,\n  \"credential_secret_id\" TEXT,\n  \"is_active\" BOOLEAN DEFAULT TRUE,\n  \"last_sync_at\" TIMESTAMP,\n  \"settings\" TEXT,\n  \"configuration\" TEXT,\n  \"email\" TEXT,\n  \"sync_interval_minutes\" INTEGER DEFAULT 60,\n  \"workspace_id\" TEXT,\n  \"workspace_name\" TEXT,\n  \"bot_user_id\" TEXT,\n  \"handle\" TEXT,\n  \"twitter_user_id\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "name": {
            "type": "TEXT",
            "notNull": false
          },
          "provider_type": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_type": {
            "type": "TEXT",
            "notNull": false
          },
          "credential_secret_id": {
            "type": "TEXT",
            "notNull": false
          },
          "is_active": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": true
          },
          "last_sync_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "settings": {
            "type": "TEXT",
            "notNull": false
          },
          "configuration": {
            "type": "TEXT",
            "notNull": false
          },
          "email": {
            "type": "TEXT",
            "notNull": false
          },
          "sync_interval_minutes": {
            "type": "INTEGER",
            "notNull": false,
            "default": 60
          },
          "workspace_id": {
            "type": "TEXT",
            "notNull": false
          },
          "workspace_name": {
            "type": "TEXT",
            "notNull": false
          },
          "bot_user_id": {
            "type": "TEXT",
            "notNull": false
          },
          "handle": {
            "type": "TEXT",
            "notNull": false
          },
          "twitter_user_id": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "accounts_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "accounts_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "accounts_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          }
        ],
        "version": "3854ea98"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:EmailAttachmentCollection": {
      "name": "emailattachmentcollection",
      "className": "EmailAttachmentCollection",
      "qualifiedName": "@happyvertical/smrt-messages:EmailAttachmentCollection",
      "collection": "emailattachments",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/EmailAttachmentCollection.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {},
      "methods": {
        "getByMessage": {
          "name": "getByMessage",
          "async": true,
          "parameters": [
            {
              "name": "messageId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByContentType": {
          "name": "getByContentType",
          "async": true,
          "parameters": [
            {
              "name": "contentType",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getImages": {
          "name": "getImages",
          "async": true,
          "parameters": [
            {
              "name": "emailId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<EmailAttachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getPdfs": {
          "name": "getPdfs",
          "async": true,
          "parameters": [
            {
              "name": "emailId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<EmailAttachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getInline": {
          "name": "getInline",
          "async": true,
          "parameters": [
            {
              "name": "emailId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailAttachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getRegular": {
          "name": "getRegular",
          "async": true,
          "parameters": [
            {
              "name": "emailId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailAttachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getWithExternalFiles": {
          "name": "getWithExternalFiles",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getTotalSize": {
          "name": "getTotalSize",
          "async": true,
          "parameters": [
            {
              "name": "messageId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<number>",
          "isStatic": false,
          "isPublic": true
        },
        "getLargest": {
          "name": "getLargest",
          "async": true,
          "parameters": [
            {
              "name": "limit",
              "type": "any",
              "optional": true
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "searchByFilename": {
          "name": "searchByFilename",
          "async": true,
          "parameters": [
            {
              "name": "query",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByExtension": {
          "name": "getByExtension",
          "async": true,
          "parameters": [
            {
              "name": "extension",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Attachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getStats": {
          "name": "getStats",
          "async": true,
          "parameters": [],
          "returnType": "Promise<object>",
          "isStatic": false,
          "isPublic": true
        },
        "deleteByMessage": {
          "name": "deleteByMessage",
          "async": true,
          "parameters": [
            {
              "name": "messageId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<number>",
          "isStatic": false,
          "isPublic": true
        },
        "findByTenant": {
          "name": "findByTenant",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailAttachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findGlobal": {
          "name": "findGlobal",
          "async": true,
          "parameters": [],
          "returnType": "Promise<EmailAttachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findWithGlobals": {
          "name": "findWithGlobals",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailAttachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByEmail": {
          "name": "getByEmail",
          "async": true,
          "parameters": [
            {
              "name": "emailId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailAttachment[]>",
          "isStatic": false,
          "isPublic": true
        },
        "deleteByEmail": {
          "name": "deleteByEmail",
          "async": true,
          "parameters": [
            {
              "name": "emailId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<number>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {},
      "extends": "AttachmentCollection",
      "exportName": "EmailAttachmentCollection",
      "collectionExportName": "EmailAttachmentCollectionCollection",
      "schema": {
        "tableName": "email_attachments",
        "ddl": "CREATE TABLE IF NOT EXISTS \"email_attachments\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          }
        },
        "indexes": [
          {
            "name": "email_attachments_slug_context_idx",
            "columns": [
              "slug",
              "context"
            ],
            "unique": true
          },
          {
            "name": "email_attachments_created_at_idx",
            "columns": [
              "created_at"
            ]
          }
        ],
        "version": "70291c59"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:EmailCollection": {
      "name": "emailcollection",
      "className": "EmailCollection",
      "qualifiedName": "@happyvertical/smrt-messages:EmailCollection",
      "collection": "messages",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/EmailCollection.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {},
      "methods": {
        "search": {
          "name": "search",
          "async": true,
          "parameters": [
            {
              "name": "query",
              "type": "string",
              "optional": false
            },
            {
              "name": "filters",
              "type": "EmailSearchFilters",
              "optional": true
            }
          ],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByAccounts": {
          "name": "getByAccounts",
          "async": true,
          "parameters": [
            {
              "name": "accountIds",
              "type": "string[]",
              "optional": false
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByType": {
          "name": "getByType",
          "async": true,
          "parameters": [
            {
              "name": "messageType",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getUnread": {
          "name": "getUnread",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getFlagged": {
          "name": "getFlagged",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getRecent": {
          "name": "getRecent",
          "async": true,
          "parameters": [
            {
              "name": "limit",
              "type": "any",
              "optional": true
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByThread": {
          "name": "getByThread",
          "async": true,
          "parameters": [
            {
              "name": "threadId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "markAllRead": {
          "name": "markAllRead",
          "async": true,
          "parameters": [
            {
              "name": "messageIds",
              "type": "string[]",
              "optional": false
            }
          ],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "getAccountStats": {
          "name": "getAccountStats",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<object>",
          "isStatic": false,
          "isPublic": true
        },
        "getDrafts": {
          "name": "getDrafts",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getSent": {
          "name": "getSent",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getScheduled": {
          "name": "getScheduled",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getFailedSends": {
          "name": "getFailedSends",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getOutbox": {
          "name": "getOutbox",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findByTenant": {
          "name": "findByTenant",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findGlobal": {
          "name": "findGlobal",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findWithGlobals": {
          "name": "findWithGlobals",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByMessageId": {
          "name": "getByMessageId",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            },
            {
              "name": "messageId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Email | null>",
          "isStatic": false,
          "isPublic": true
        },
        "getByAccount": {
          "name": "getByAccount",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByFolder": {
          "name": "getByFolder",
          "async": true,
          "parameters": [
            {
              "name": "folderId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getWithAttachments": {
          "name": "getWithAttachments",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "countByFolder": {
          "name": "countByFolder",
          "async": true,
          "parameters": [
            {
              "name": "folderId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<number>",
          "isStatic": false,
          "isPublic": true
        },
        "countUnreadByFolder": {
          "name": "countUnreadByFolder",
          "async": true,
          "parameters": [
            {
              "name": "folderId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<number>",
          "isStatic": false,
          "isPublic": true
        },
        "countUnreadByAccount": {
          "name": "countUnreadByAccount",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<number>",
          "isStatic": false,
          "isPublic": true
        },
        "searchEmails": {
          "name": "searchEmails",
          "async": true,
          "parameters": [
            {
              "name": "query",
              "type": "string",
              "optional": false
            },
            {
              "name": "filters",
              "type": "EmailSearchFilters",
              "optional": true
            }
          ],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "markFolderRead": {
          "name": "markFolderRead",
          "async": true,
          "parameters": [
            {
              "name": "folderId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "deleteByFolder": {
          "name": "deleteByFolder",
          "async": true,
          "parameters": [
            {
              "name": "folderId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<number>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableName": "messages"
      },
      "extends": "MessageCollection",
      "exportName": "EmailCollection",
      "collectionExportName": "EmailCollectionCollection",
      "schema": {
        "tableName": "messages",
        "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"account_id\" UUID,\n  \"persona_id\" UUID,\n  \"endpoint_id\" UUID,\n  \"correlation_id\" TEXT,\n  \"thread_id\" TEXT,\n  \"subject\" TEXT,\n  \"body\" TEXT,\n  \"from_address\" TEXT,\n  \"from_name\" TEXT,\n  \"to_addresses\" TEXT,\n  \"date\" TIMESTAMP,\n  \"is_read\" BOOLEAN DEFAULT FALSE,\n  \"is_flagged\" BOOLEAN DEFAULT FALSE,\n  \"has_attachments\" BOOLEAN DEFAULT FALSE,\n  \"size\" INTEGER DEFAULT 0,\n  \"metadata\" TEXT,\n  \"send_status\" TEXT DEFAULT 'draft',\n  \"sent_at\" TIMESTAMP,\n  \"send_error\" TEXT,\n  \"retry_count\" INTEGER DEFAULT 0,\n  \"max_retries\" INTEGER DEFAULT 3,\n  \"scheduled_send_at\" TIMESTAMP,\n  \"in_reply_to_message_id\" UUID,\n  \"message_id\" TEXT,\n  \"in_reply_to\" TEXT,\n  \"cc_addresses\" TEXT,\n  \"bcc_addresses\" TEXT,\n  \"reply_to_address\" TEXT,\n  \"reply_to_name\" TEXT,\n  \"text_body\" TEXT,\n  \"html_body\" TEXT,\n  \"folder_id\" TEXT,\n  \"folder_path\" TEXT,\n  \"labels\" TEXT,\n  \"flags\" TEXT,\n  \"is_answered\" BOOLEAN DEFAULT FALSE,\n  \"is_draft\" BOOLEAN DEFAULT FALSE,\n  \"raw_message\" TEXT,\n  \"headers\" TEXT,\n  \"channel_id\" TEXT,\n  \"channel_name\" TEXT,\n  \"slack_ts\" TEXT,\n  \"slack_thread_ts\" TEXT,\n  \"reactions\" TEXT,\n  \"is_edited\" BOOLEAN DEFAULT FALSE,\n  \"message_type\" TEXT,\n  \"blocks\" TEXT,\n  \"tweet_id\" TEXT,\n  \"retweet_count\" INTEGER DEFAULT 0,\n  \"like_count\" INTEGER DEFAULT 0,\n  \"reply_count\" INTEGER DEFAULT 0,\n  \"is_retweet\" BOOLEAN DEFAULT FALSE,\n  \"is_reply\" BOOLEAN DEFAULT FALSE,\n  \"media_urls\" TEXT,\n  \"hashtags\" TEXT,\n  \"mentions\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "account_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "accounts",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "persona_id": {
            "type": "UUID",
            "referenceKind": "crossPackageRef",
            "notNull": false
          },
          "endpoint_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "messaging_endpoints",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "correlation_id": {
            "type": "TEXT",
            "notNull": false
          },
          "thread_id": {
            "type": "TEXT",
            "notNull": false
          },
          "subject": {
            "type": "TEXT",
            "notNull": false
          },
          "body": {
            "type": "TEXT",
            "notNull": false
          },
          "from_address": {
            "type": "TEXT",
            "notNull": false
          },
          "from_name": {
            "type": "TEXT",
            "notNull": false
          },
          "to_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "date": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "is_read": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_flagged": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "has_attachments": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "size": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "metadata": {
            "type": "TEXT",
            "notNull": false
          },
          "send_status": {
            "type": "TEXT",
            "notNull": false,
            "default": "draft"
          },
          "sent_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "send_error": {
            "type": "TEXT",
            "notNull": false
          },
          "retry_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "max_retries": {
            "type": "INTEGER",
            "notNull": false,
            "default": 3
          },
          "scheduled_send_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "in_reply_to_message_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "messages",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "message_id": {
            "type": "TEXT",
            "notNull": false
          },
          "in_reply_to": {
            "type": "TEXT",
            "notNull": false
          },
          "cc_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "bcc_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "reply_to_address": {
            "type": "TEXT",
            "notNull": false
          },
          "reply_to_name": {
            "type": "TEXT",
            "notNull": false
          },
          "text_body": {
            "type": "TEXT",
            "notNull": false
          },
          "html_body": {
            "type": "TEXT",
            "notNull": false
          },
          "folder_id": {
            "type": "TEXT",
            "notNull": false
          },
          "folder_path": {
            "type": "TEXT",
            "notNull": false
          },
          "labels": {
            "type": "TEXT",
            "notNull": false
          },
          "flags": {
            "type": "TEXT",
            "notNull": false
          },
          "is_answered": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_draft": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "raw_message": {
            "type": "TEXT",
            "notNull": false
          },
          "headers": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_id": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_name": {
            "type": "TEXT",
            "notNull": false
          },
          "slack_ts": {
            "type": "TEXT",
            "notNull": false
          },
          "slack_thread_ts": {
            "type": "TEXT",
            "notNull": false
          },
          "reactions": {
            "type": "TEXT",
            "notNull": false
          },
          "is_edited": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "message_type": {
            "type": "TEXT",
            "notNull": false
          },
          "blocks": {
            "type": "TEXT",
            "notNull": false
          },
          "tweet_id": {
            "type": "TEXT",
            "notNull": false
          },
          "retweet_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "like_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "reply_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "is_retweet": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_reply": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "media_urls": {
            "type": "TEXT",
            "notNull": false
          },
          "hashtags": {
            "type": "TEXT",
            "notNull": false
          },
          "mentions": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "messages_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "messages_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "messages_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "messages_account_id_idx",
            "columns": [
              "account_id"
            ]
          },
          {
            "name": "messages_persona_id_idx",
            "columns": [
              "persona_id"
            ]
          },
          {
            "name": "messages_endpoint_id_idx",
            "columns": [
              "endpoint_id"
            ]
          },
          {
            "name": "messages_in_reply_to_message_id_idx",
            "columns": [
              "in_reply_to_message_id"
            ]
          }
        ],
        "version": "6ff29dd9"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:EmailFolderCollection": {
      "name": "emailfoldercollection",
      "className": "EmailFolderCollection",
      "qualifiedName": "@happyvertical/smrt-messages:EmailFolderCollection",
      "collection": "emailfolders",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/EmailFolderCollection.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {},
      "methods": {
        "getByPath": {
          "name": "getByPath",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            },
            {
              "name": "path",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailFolder | null>",
          "isStatic": false,
          "isPublic": true
        },
        "getByAccount": {
          "name": "getByAccount",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailFolder[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getInbox": {
          "name": "getInbox",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailFolder | null>",
          "isStatic": false,
          "isPublic": true
        },
        "getSent": {
          "name": "getSent",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailFolder | null>",
          "isStatic": false,
          "isPublic": true
        },
        "getDrafts": {
          "name": "getDrafts",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailFolder | null>",
          "isStatic": false,
          "isPublic": true
        },
        "getTrash": {
          "name": "getTrash",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailFolder | null>",
          "isStatic": false,
          "isPublic": true
        },
        "getSpam": {
          "name": "getSpam",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailFolder | null>",
          "isStatic": false,
          "isPublic": true
        },
        "getSystemFolders": {
          "name": "getSystemFolders",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailFolder[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getUserFolders": {
          "name": "getUserFolders",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailFolder[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getSubscribed": {
          "name": "getSubscribed",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<EmailFolder[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getWithUnread": {
          "name": "getWithUnread",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<EmailFolder[]>",
          "isStatic": false,
          "isPublic": true
        },
        "search": {
          "name": "search",
          "async": true,
          "parameters": [
            {
              "name": "query",
              "type": "string",
              "optional": false
            },
            {
              "name": "filters",
              "type": "EmailFolderSearchFilters",
              "optional": true
            }
          ],
          "returnType": "Promise<EmailFolder[]>",
          "isStatic": false,
          "isPublic": true
        },
        "refreshAllCounts": {
          "name": "refreshAllCounts",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "getAccountStats": {
          "name": "getAccountStats",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<object>",
          "isStatic": false,
          "isPublic": true
        },
        "createSystemFolders": {
          "name": "createSystemFolders",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "findByTenant": {
          "name": "findByTenant",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailFolder[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findGlobal": {
          "name": "findGlobal",
          "async": true,
          "parameters": [],
          "returnType": "Promise<EmailFolder[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findWithGlobals": {
          "name": "findWithGlobals",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<EmailFolder[]>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {},
      "extends": "SmrtCollection",
      "extendsTypeArg": "EmailFolder",
      "exportName": "EmailFolderCollection",
      "collectionExportName": "EmailFolderCollectionCollection",
      "schema": {
        "tableName": "email_folders",
        "ddl": "CREATE TABLE IF NOT EXISTS \"email_folders\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"account_id\" UUID,\n  \"name\" TEXT,\n  \"path\" TEXT,\n  \"delimiter\" TEXT,\n  \"special_use\" TEXT,\n  \"message_count\" INTEGER NOT NULL DEFAULT 0,\n  \"unread_count\" INTEGER NOT NULL DEFAULT 0,\n  \"subscribed\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false,
            "unique": false
          },
          "account_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "unique": false,
            "foreignKey": {
              "table": "accounts",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "name": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "path": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "delimiter": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "special_use": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "message_count": {
            "type": "INTEGER",
            "notNull": true,
            "unique": false,
            "default": 0
          },
          "unread_count": {
            "type": "INTEGER",
            "notNull": true,
            "unique": false,
            "default": 0
          },
          "subscribed": {
            "type": "BOOLEAN",
            "notNull": true,
            "unique": false,
            "default": true
          }
        },
        "indexes": [
          {
            "name": "email_folders_slug_context_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "email_folders_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "email_folders_account_id_idx",
            "columns": [
              "account_id"
            ]
          }
        ],
        "version": "e895818f"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:MessageCollection": {
      "name": "messagecollection",
      "className": "MessageCollection",
      "qualifiedName": "@happyvertical/smrt-messages:MessageCollection",
      "collection": "messages",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/MessageCollection.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {},
      "methods": {
        "search": {
          "name": "search",
          "async": true,
          "parameters": [
            {
              "name": "query",
              "type": "string",
              "optional": false
            },
            {
              "name": "filters",
              "type": "MessageSearchFilters",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByAccounts": {
          "name": "getByAccounts",
          "async": true,
          "parameters": [
            {
              "name": "accountIds",
              "type": "string[]",
              "optional": false
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByType": {
          "name": "getByType",
          "async": true,
          "parameters": [
            {
              "name": "messageType",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getUnread": {
          "name": "getUnread",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getFlagged": {
          "name": "getFlagged",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getRecent": {
          "name": "getRecent",
          "async": true,
          "parameters": [
            {
              "name": "limit",
              "type": "any",
              "optional": true
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getByThread": {
          "name": "getByThread",
          "async": true,
          "parameters": [
            {
              "name": "threadId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "markAllRead": {
          "name": "markAllRead",
          "async": true,
          "parameters": [
            {
              "name": "messageIds",
              "type": "string[]",
              "optional": false
            }
          ],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "getAccountStats": {
          "name": "getAccountStats",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<object>",
          "isStatic": false,
          "isPublic": true
        },
        "getDrafts": {
          "name": "getDrafts",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getSent": {
          "name": "getSent",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getScheduled": {
          "name": "getScheduled",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getFailedSends": {
          "name": "getFailedSends",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getOutbox": {
          "name": "getOutbox",
          "async": true,
          "parameters": [
            {
              "name": "accountId",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findByTenant": {
          "name": "findByTenant",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findGlobal": {
          "name": "findGlobal",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "findWithGlobals": {
          "name": "findWithGlobals",
          "async": true,
          "parameters": [
            {
              "name": "tenantId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {},
      "extends": "SmrtCollection",
      "extendsTypeArg": "Message",
      "exportName": "MessageCollection",
      "collectionExportName": "MessageCollectionCollection",
      "schema": {
        "tableName": "messages",
        "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"account_id\" UUID,\n  \"persona_id\" UUID,\n  \"endpoint_id\" UUID,\n  \"correlation_id\" TEXT,\n  \"thread_id\" TEXT,\n  \"subject\" TEXT,\n  \"body\" TEXT,\n  \"from_address\" TEXT,\n  \"from_name\" TEXT,\n  \"to_addresses\" TEXT,\n  \"date\" TIMESTAMP,\n  \"is_read\" BOOLEAN DEFAULT FALSE,\n  \"is_flagged\" BOOLEAN DEFAULT FALSE,\n  \"has_attachments\" BOOLEAN DEFAULT FALSE,\n  \"size\" INTEGER DEFAULT 0,\n  \"metadata\" TEXT,\n  \"send_status\" TEXT DEFAULT 'draft',\n  \"sent_at\" TIMESTAMP,\n  \"send_error\" TEXT,\n  \"retry_count\" INTEGER DEFAULT 0,\n  \"max_retries\" INTEGER DEFAULT 3,\n  \"scheduled_send_at\" TIMESTAMP,\n  \"in_reply_to_message_id\" UUID,\n  \"message_id\" TEXT,\n  \"in_reply_to\" TEXT,\n  \"cc_addresses\" TEXT,\n  \"bcc_addresses\" TEXT,\n  \"reply_to_address\" TEXT,\n  \"reply_to_name\" TEXT,\n  \"text_body\" TEXT,\n  \"html_body\" TEXT,\n  \"folder_id\" TEXT,\n  \"folder_path\" TEXT,\n  \"labels\" TEXT,\n  \"flags\" TEXT,\n  \"is_answered\" BOOLEAN DEFAULT FALSE,\n  \"is_draft\" BOOLEAN DEFAULT FALSE,\n  \"raw_message\" TEXT,\n  \"headers\" TEXT,\n  \"channel_id\" TEXT,\n  \"channel_name\" TEXT,\n  \"slack_ts\" TEXT,\n  \"slack_thread_ts\" TEXT,\n  \"reactions\" TEXT,\n  \"is_edited\" BOOLEAN DEFAULT FALSE,\n  \"message_type\" TEXT,\n  \"blocks\" TEXT,\n  \"tweet_id\" TEXT,\n  \"retweet_count\" INTEGER DEFAULT 0,\n  \"like_count\" INTEGER DEFAULT 0,\n  \"reply_count\" INTEGER DEFAULT 0,\n  \"is_retweet\" BOOLEAN DEFAULT FALSE,\n  \"is_reply\" BOOLEAN DEFAULT FALSE,\n  \"media_urls\" TEXT,\n  \"hashtags\" TEXT,\n  \"mentions\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "account_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "accounts",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "persona_id": {
            "type": "UUID",
            "referenceKind": "crossPackageRef",
            "notNull": false
          },
          "endpoint_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "messaging_endpoints",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "correlation_id": {
            "type": "TEXT",
            "notNull": false
          },
          "thread_id": {
            "type": "TEXT",
            "notNull": false
          },
          "subject": {
            "type": "TEXT",
            "notNull": false
          },
          "body": {
            "type": "TEXT",
            "notNull": false
          },
          "from_address": {
            "type": "TEXT",
            "notNull": false
          },
          "from_name": {
            "type": "TEXT",
            "notNull": false
          },
          "to_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "date": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "is_read": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_flagged": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "has_attachments": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "size": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "metadata": {
            "type": "TEXT",
            "notNull": false
          },
          "send_status": {
            "type": "TEXT",
            "notNull": false,
            "default": "draft"
          },
          "sent_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "send_error": {
            "type": "TEXT",
            "notNull": false
          },
          "retry_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "max_retries": {
            "type": "INTEGER",
            "notNull": false,
            "default": 3
          },
          "scheduled_send_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "in_reply_to_message_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "messages",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "message_id": {
            "type": "TEXT",
            "notNull": false
          },
          "in_reply_to": {
            "type": "TEXT",
            "notNull": false
          },
          "cc_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "bcc_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "reply_to_address": {
            "type": "TEXT",
            "notNull": false
          },
          "reply_to_name": {
            "type": "TEXT",
            "notNull": false
          },
          "text_body": {
            "type": "TEXT",
            "notNull": false
          },
          "html_body": {
            "type": "TEXT",
            "notNull": false
          },
          "folder_id": {
            "type": "TEXT",
            "notNull": false
          },
          "folder_path": {
            "type": "TEXT",
            "notNull": false
          },
          "labels": {
            "type": "TEXT",
            "notNull": false
          },
          "flags": {
            "type": "TEXT",
            "notNull": false
          },
          "is_answered": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_draft": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "raw_message": {
            "type": "TEXT",
            "notNull": false
          },
          "headers": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_id": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_name": {
            "type": "TEXT",
            "notNull": false
          },
          "slack_ts": {
            "type": "TEXT",
            "notNull": false
          },
          "slack_thread_ts": {
            "type": "TEXT",
            "notNull": false
          },
          "reactions": {
            "type": "TEXT",
            "notNull": false
          },
          "is_edited": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "message_type": {
            "type": "TEXT",
            "notNull": false
          },
          "blocks": {
            "type": "TEXT",
            "notNull": false
          },
          "tweet_id": {
            "type": "TEXT",
            "notNull": false
          },
          "retweet_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "like_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "reply_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "is_retweet": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_reply": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "media_urls": {
            "type": "TEXT",
            "notNull": false
          },
          "hashtags": {
            "type": "TEXT",
            "notNull": false
          },
          "mentions": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "messages_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "messages_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "messages_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "messages_account_id_idx",
            "columns": [
              "account_id"
            ]
          },
          {
            "name": "messages_persona_id_idx",
            "columns": [
              "persona_id"
            ]
          },
          {
            "name": "messages_endpoint_id_idx",
            "columns": [
              "endpoint_id"
            ]
          },
          {
            "name": "messages_in_reply_to_message_id_idx",
            "columns": [
              "in_reply_to_message_id"
            ]
          }
        ],
        "version": "c03791c7"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:MessagingEndpointCollection": {
      "name": "messagingendpointcollection",
      "className": "MessagingEndpointCollection",
      "qualifiedName": "@happyvertical/smrt-messages:MessagingEndpointCollection",
      "collection": "messagingendpoints",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/MessagingEndpointCollection.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {},
      "methods": {},
      "decoratorConfig": {
        "tableName": "messaging_endpoints"
      },
      "extends": "SmrtCollection",
      "extendsTypeArg": "MessagingEndpoint",
      "exportName": "MessagingEndpointCollection",
      "collectionExportName": "MessagingEndpointCollectionCollection",
      "schema": {
        "tableName": "messaging_endpoints",
        "ddl": "CREATE TABLE IF NOT EXISTS \"messaging_endpoints\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID NOT NULL,\n  \"profile_id\" UUID,\n  \"label\" TEXT NOT NULL,\n  \"channel\" TEXT NOT NULL DEFAULT 'email',\n  \"address\" TEXT NOT NULL,\n  \"is_active\" BOOLEAN NOT NULL DEFAULT TRUE,\n  \"verified_at\" TIMESTAMP\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": true,
            "unique": false
          },
          "profile_id": {
            "type": "UUID",
            "referenceKind": "crossPackageRef",
            "notNull": false,
            "unique": false
          },
          "label": {
            "type": "TEXT",
            "notNull": true,
            "unique": false
          },
          "channel": {
            "type": "TEXT",
            "notNull": true,
            "unique": false,
            "default": "email"
          },
          "address": {
            "type": "TEXT",
            "notNull": true,
            "unique": false
          },
          "is_active": {
            "type": "BOOLEAN",
            "notNull": true,
            "unique": false,
            "default": true
          },
          "verified_at": {
            "type": "TIMESTAMP",
            "notNull": false,
            "unique": false
          }
        },
        "indexes": [
          {
            "name": "messaging_endpoints_tenant_id_channel_idx",
            "columns": [
              "tenant_id",
              "channel",
              "label"
            ],
            "unique": true
          },
          {
            "name": "messaging_endpoints_slug_context_idx",
            "columns": [
              "slug",
              "context"
            ]
          },
          {
            "name": "messaging_endpoints_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "messaging_endpoints_profile_id_idx",
            "columns": [
              "profile_id"
            ]
          }
        ],
        "version": "fca5554d"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:PersonaMessageRouteCollection": {
      "name": "personamessageroutecollection",
      "className": "PersonaMessageRouteCollection",
      "qualifiedName": "@happyvertical/smrt-messages:PersonaMessageRouteCollection",
      "collection": "personamessageroutes",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/PersonaMessageRouteCollection.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {},
      "methods": {
        "forPersona": {
          "name": "forPersona",
          "async": true,
          "parameters": [
            {
              "name": "personaId",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<PersonaMessageRoute[]>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableName": "persona_message_routes"
      },
      "extends": "SmrtCollection",
      "extendsTypeArg": "PersonaMessageRoute",
      "exportName": "PersonaMessageRouteCollection",
      "collectionExportName": "PersonaMessageRouteCollectionCollection",
      "schema": {
        "tableName": "persona_message_routes",
        "ddl": "CREATE TABLE IF NOT EXISTS \"persona_message_routes\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID NOT NULL,\n  \"persona_id\" UUID NOT NULL,\n  \"account_id\" UUID NOT NULL,\n  \"endpoint_id\" UUID NOT NULL,\n  \"purpose\" TEXT NOT NULL,\n  \"priority\" INTEGER NOT NULL DEFAULT 0,\n  \"enabled\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": true,
            "unique": false
          },
          "persona_id": {
            "type": "UUID",
            "referenceKind": "crossPackageRef",
            "notNull": true,
            "unique": false
          },
          "account_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": true,
            "unique": false,
            "foreignKey": {
              "table": "accounts",
              "column": "id",
              "onDelete": "CASCADE",
              "onUpdate": "CASCADE"
            }
          },
          "endpoint_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": true,
            "unique": false,
            "foreignKey": {
              "table": "messaging_endpoints",
              "column": "id",
              "onDelete": "CASCADE",
              "onUpdate": "CASCADE"
            }
          },
          "purpose": {
            "type": "TEXT",
            "notNull": true,
            "unique": false
          },
          "priority": {
            "type": "INTEGER",
            "notNull": true,
            "unique": false,
            "default": 0
          },
          "enabled": {
            "type": "BOOLEAN",
            "notNull": true,
            "unique": false,
            "default": true
          }
        },
        "indexes": [
          {
            "name": "persona_message_routes_tenant_id_persona_id_idx",
            "columns": [
              "tenant_id",
              "persona_id",
              "account_id",
              "endpoint_id",
              "purpose"
            ],
            "unique": true
          },
          {
            "name": "persona_message_routes_slug_context_idx",
            "columns": [
              "slug",
              "context"
            ]
          },
          {
            "name": "persona_message_routes_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "persona_message_routes_persona_id_idx",
            "columns": [
              "persona_id"
            ]
          },
          {
            "name": "persona_message_routes_account_id_idx",
            "columns": [
              "account_id"
            ]
          },
          {
            "name": "persona_message_routes_endpoint_id_idx",
            "columns": [
              "endpoint_id"
            ]
          }
        ],
        "version": "3dc1d5d0"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:WhitelistCollection": {
      "name": "whitelistcollection",
      "className": "WhitelistCollection",
      "qualifiedName": "@happyvertical/smrt-messages:WhitelistCollection",
      "collection": "whitelists",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/WhitelistCollection.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {},
      "methods": {
        "isWhitelisted": {
          "name": "isWhitelisted",
          "async": true,
          "parameters": [
            {
              "name": "email",
              "type": "string",
              "optional": false
            },
            {
              "name": "category",
              "type": "string",
              "optional": true
            }
          ],
          "returnType": "Promise<boolean>",
          "isStatic": false,
          "isPublic": true
        },
        "getMatchingEntry": {
          "name": "getMatchingEntry",
          "async": true,
          "parameters": [
            {
              "name": "email",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Whitelist | null>",
          "isStatic": false,
          "isPublic": true
        },
        "getByCategory": {
          "name": "getByCategory",
          "async": true,
          "parameters": [
            {
              "name": "category",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "Promise<Whitelist[]>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {},
      "extends": "SmrtCollection",
      "extendsTypeArg": "Whitelist",
      "exportName": "WhitelistCollection",
      "collectionExportName": "WhitelistCollectionCollection",
      "schema": {
        "tableName": "whitelists",
        "ddl": "CREATE TABLE IF NOT EXISTS \"whitelists\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"pattern\" TEXT DEFAULT '',\n  \"type\" TEXT DEFAULT 'email',\n  \"category\" TEXT,\n  \"description\" TEXT DEFAULT '',\n  \"tenant_id\" UUID NOT NULL\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "pattern": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": ""
          },
          "type": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": "email"
          },
          "category": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "description": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": ""
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": true,
            "unique": false
          }
        },
        "indexes": [
          {
            "name": "whitelists_slug_context_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context"
            ],
            "unique": true
          },
          {
            "name": "whitelists_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          }
        ],
        "version": "40a655a1"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:Account": {
      "name": "account",
      "className": "Account",
      "qualifiedName": "@happyvertical/smrt-messages:Account",
      "collection": "accounts",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/Account.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "created_at": {
          "type": "datetime",
          "required": false
        },
        "updated_at": {
          "type": "datetime",
          "required": false
        },
        "tenantId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sqlType": "UUID",
            "nullable": true,
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": false,
              "autoPopulate": true,
              "nullable": true,
              "mode": "optional",
              "field": "tenantId",
              "allowSuperAdminBypass": false
            }
          }
        },
        "name": {
          "type": "text",
          "required": false
        },
        "providerType": {
          "type": "text",
          "required": false
        },
        "channelType": {
          "type": "text",
          "required": false
        },
        "credentialSecretId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sensitive": true,
            "readonly": true
          },
          "sensitive": true,
          "readonly": true
        },
        "isActive": {
          "type": "boolean",
          "required": true,
          "default": true
        },
        "lastSyncAt": {
          "type": "datetime",
          "required": false
        },
        "settings": {
          "type": "text",
          "required": false,
          "_meta": {
            "sensitive": true,
            "readonly": true
          },
          "sensitive": true,
          "readonly": true
        },
        "configuration": {
          "type": "text",
          "required": false
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        }
      },
      "methods": {
        "getSettings": {
          "name": "getSettings",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setSettings": {
          "name": "setSettings",
          "async": false,
          "parameters": [
            {
              "name": "settings",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getConfiguration": {
          "name": "getConfiguration",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setConfiguration": {
          "name": "setConfiguration",
          "async": false,
          "parameters": [
            {
              "name": "configuration",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "activate": {
          "name": "activate",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "deactivate": {
          "name": "deactivate",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "setCredentials": {
          "name": "setCredentials",
          "async": true,
          "parameters": [
            {
              "name": "credentials",
              "type": "Record<string, unknown>",
              "optional": false
            },
            {
              "name": "options",
              "type": "object",
              "optional": true,
              "memberTypes": [
                "string"
              ]
            }
          ],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "createSender": {
          "name": "createSender",
          "async": true,
          "parameters": [],
          "returnType": "Promise<MessageSenderInterface>",
          "isStatic": false,
          "isPublic": true
        },
        "getCredentials": {
          "name": "getCredentials",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Record<string, unknown> | null>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableStrategy": "sti",
        "api": {
          "include": [
            "list",
            "get"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "include": [
            "list",
            "get"
          ]
        },
        "tenantScoped": {
          "mode": "optional"
        },
        "conflictColumns": [
          "tenant_id",
          "slug",
          "context",
          "_meta_type"
        ]
      },
      "extends": "SmrtObject",
      "exportName": "Account",
      "collectionExportName": "AccountCollection",
      "validationRules": [
        {
          "field": "isActive",
          "rule": "required",
          "fieldType": "boolean"
        }
      ],
      "schema": {
        "tableName": "accounts",
        "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"name\" TEXT,\n  \"provider_type\" TEXT,\n  \"channel_type\" TEXT,\n  \"credential_secret_id\" TEXT,\n  \"is_active\" BOOLEAN DEFAULT TRUE,\n  \"last_sync_at\" TIMESTAMP,\n  \"settings\" TEXT,\n  \"configuration\" TEXT,\n  \"email\" TEXT,\n  \"sync_interval_minutes\" INTEGER DEFAULT 60,\n  \"workspace_id\" TEXT,\n  \"workspace_name\" TEXT,\n  \"bot_user_id\" TEXT,\n  \"handle\" TEXT,\n  \"twitter_user_id\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "name": {
            "type": "TEXT",
            "notNull": false
          },
          "provider_type": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_type": {
            "type": "TEXT",
            "notNull": false
          },
          "credential_secret_id": {
            "type": "TEXT",
            "notNull": false
          },
          "is_active": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": true
          },
          "last_sync_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "settings": {
            "type": "TEXT",
            "notNull": false
          },
          "configuration": {
            "type": "TEXT",
            "notNull": false
          },
          "email": {
            "type": "TEXT",
            "notNull": false
          },
          "sync_interval_minutes": {
            "type": "INTEGER",
            "notNull": false,
            "default": 60
          },
          "workspace_id": {
            "type": "TEXT",
            "notNull": false
          },
          "workspace_name": {
            "type": "TEXT",
            "notNull": false
          },
          "bot_user_id": {
            "type": "TEXT",
            "notNull": false
          },
          "handle": {
            "type": "TEXT",
            "notNull": false
          },
          "twitter_user_id": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "accounts_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "accounts_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "accounts_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          }
        ],
        "version": "3854ea98"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:Attachment": {
      "name": "attachment",
      "className": "Attachment",
      "qualifiedName": "@happyvertical/smrt-messages:Attachment",
      "collection": "attachments",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/Attachment.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "tenantId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sqlType": "UUID",
            "nullable": true,
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": false,
              "autoPopulate": true,
              "nullable": true,
              "mode": "optional",
              "field": "tenantId",
              "allowSuperAdminBypass": false
            }
          }
        },
        "messageId": {
          "type": "foreignKey",
          "required": false,
          "related": "Message"
        },
        "filename": {
          "type": "text",
          "required": false
        },
        "contentType": {
          "type": "text",
          "required": false
        },
        "size": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "contentId": {
          "type": "text",
          "required": false
        },
        "contentDisposition": {
          "type": "text",
          "required": false,
          "default": "attachment"
        },
        "filePath": {
          "type": "text",
          "required": false
        },
        "sourceUrl": {
          "type": "text",
          "required": false
        },
        "createdAt": {
          "type": "text",
          "required": false
        }
      },
      "methods": {
        "getMessage": {
          "name": "getMessage",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "isImage": {
          "name": "isImage",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "isPdf": {
          "name": "isPdf",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "isInline": {
          "name": "isInline",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "getExtension": {
          "name": "getExtension",
          "async": false,
          "parameters": [],
          "returnType": "string",
          "isStatic": false,
          "isPublic": true
        },
        "getFormattedSize": {
          "name": "getFormattedSize",
          "async": false,
          "parameters": [],
          "returnType": "string",
          "isStatic": false,
          "isPublic": true
        },
        "hasExternalFile": {
          "name": "hasExternalFile",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "readContent": {
          "name": "readContent",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Buffer | null>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "api": {
          "include": [
            "list",
            "get",
            "create",
            "delete"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "skipApiCheck": true
        },
        "tenantScoped": {
          "mode": "optional"
        },
        "conflictColumns": [
          "tenant_id",
          "slug",
          "context"
        ]
      },
      "extends": "SmrtObject",
      "exportName": "Attachment",
      "collectionExportName": "AttachmentCollection",
      "validationRules": [
        {
          "field": "size",
          "rule": "required",
          "fieldType": "integer"
        }
      ],
      "schema": {
        "tableName": "attachments",
        "ddl": "CREATE TABLE IF NOT EXISTS \"attachments\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"message_id\" UUID,\n  \"filename\" TEXT,\n  \"content_type\" TEXT,\n  \"size\" INTEGER NOT NULL DEFAULT 0,\n  \"content_id\" TEXT,\n  \"content_disposition\" TEXT DEFAULT 'attachment',\n  \"file_path\" TEXT,\n  \"source_url\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false,
            "unique": false
          },
          "message_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "unique": false,
            "foreignKey": {
              "table": "messages",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "filename": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "content_type": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "size": {
            "type": "INTEGER",
            "notNull": true,
            "unique": false,
            "default": 0
          },
          "content_id": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "content_disposition": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": "attachment"
          },
          "file_path": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "source_url": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          }
        },
        "indexes": [
          {
            "name": "attachments_slug_context_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "attachments_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "attachments_message_id_idx",
            "columns": [
              "message_id"
            ]
          }
        ],
        "version": "ee5ae0dd"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:Blacklist": {
      "name": "blacklist",
      "className": "Blacklist",
      "qualifiedName": "@happyvertical/smrt-messages:Blacklist",
      "collection": "blacklists",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/Blacklist.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "pattern": {
          "type": "text",
          "required": false,
          "default": ""
        },
        "type": {
          "type": "text",
          "required": false,
          "default": "email"
        },
        "reason": {
          "type": "text",
          "required": false,
          "default": ""
        },
        "autoArchive": {
          "type": "boolean",
          "required": false,
          "default": true
        },
        "tenantId": {
          "type": "text",
          "required": true,
          "_meta": {
            "generated": true,
            "source": "tenantScoped_decorator",
            "sqlType": "UUID",
            "__tenancy": {
              "isTenantIdField": true,
              "mode": "required",
              "field": "tenantId",
              "autoFilter": true,
              "autoPopulate": true,
              "allowSuperAdminBypass": false
            }
          }
        }
      },
      "methods": {
        "matches": {
          "name": "matches",
          "async": false,
          "parameters": [
            {
              "name": "email",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "api": {
          "include": [
            "list",
            "get",
            "create",
            "update",
            "delete"
          ]
        },
        "cli": {
          "skipApiCheck": true
        },
        "tenantScoped": true,
        "conflictColumns": [
          "tenant_id",
          "slug",
          "context"
        ]
      },
      "extends": "SmrtObject",
      "exportName": "Blacklist",
      "collectionExportName": "BlacklistCollection",
      "validationRules": [],
      "schema": {
        "tableName": "blacklists",
        "ddl": "CREATE TABLE IF NOT EXISTS \"blacklists\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"pattern\" TEXT DEFAULT '',\n  \"type\" TEXT DEFAULT 'email',\n  \"reason\" TEXT DEFAULT '',\n  \"auto_archive\" BOOLEAN DEFAULT TRUE,\n  \"tenant_id\" UUID NOT NULL\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "pattern": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": ""
          },
          "type": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": "email"
          },
          "reason": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": ""
          },
          "auto_archive": {
            "type": "BOOLEAN",
            "notNull": false,
            "unique": false,
            "default": true
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": true,
            "unique": false
          }
        },
        "indexes": [
          {
            "name": "blacklists_slug_context_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context"
            ],
            "unique": true
          },
          {
            "name": "blacklists_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          }
        ],
        "version": "04efaa8d"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:Email": {
      "name": "email",
      "className": "Email",
      "qualifiedName": "@happyvertical/smrt-messages:Email",
      "collection": "messages",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/Email.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "created_at": {
          "type": "datetime",
          "required": false
        },
        "updated_at": {
          "type": "datetime",
          "required": false
        },
        "tenantId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sqlType": "UUID",
            "nullable": true,
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": false,
              "autoPopulate": true,
              "nullable": true
            }
          }
        },
        "accountId": {
          "type": "foreignKey",
          "required": false,
          "related": "Account"
        },
        "personaId": {
          "type": "crossPackageRef",
          "required": false,
          "related": "@happyvertical/smrt-personas:AgentPersona",
          "_meta": {
            "nullable": true
          }
        },
        "endpointId": {
          "type": "foreignKey",
          "required": false,
          "related": "MessagingEndpoint"
        },
        "correlationId": {
          "type": "text",
          "required": false
        },
        "threadId": {
          "type": "text",
          "required": false
        },
        "subject": {
          "type": "text",
          "required": false
        },
        "body": {
          "type": "text",
          "required": false
        },
        "fromAddress": {
          "type": "text",
          "required": false
        },
        "fromName": {
          "type": "text",
          "required": false
        },
        "toAddresses": {
          "type": "text",
          "required": false
        },
        "date": {
          "type": "datetime",
          "required": false
        },
        "isRead": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "isFlagged": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "hasAttachments": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "size": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "metadata": {
          "type": "text",
          "required": false
        },
        "sendStatus": {
          "type": "text",
          "required": false,
          "default": "draft"
        },
        "sentAt": {
          "type": "datetime",
          "required": false
        },
        "sendError": {
          "type": "text",
          "required": false
        },
        "retryCount": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "maxRetries": {
          "type": "integer",
          "required": true,
          "default": 3
        },
        "scheduledSendAt": {
          "type": "datetime",
          "required": false
        },
        "inReplyToMessageId": {
          "type": "foreignKey",
          "required": false,
          "related": "Message"
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        },
        "messageId": {
          "type": "text",
          "required": false
        },
        "inReplyTo": {
          "type": "text",
          "required": false
        },
        "ccAddresses": {
          "type": "text",
          "required": false
        },
        "bccAddresses": {
          "type": "text",
          "required": false
        },
        "replyToAddress": {
          "type": "text",
          "required": false
        },
        "replyToName": {
          "type": "text",
          "required": false
        },
        "textBody": {
          "type": "text",
          "required": false
        },
        "htmlBody": {
          "type": "text",
          "required": false
        },
        "folderId": {
          "type": "text",
          "required": false
        },
        "folderPath": {
          "type": "text",
          "required": false
        },
        "labels": {
          "type": "text",
          "required": false
        },
        "flags": {
          "type": "text",
          "required": false
        },
        "isAnswered": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "isDraft": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "rawMessage": {
          "type": "text",
          "required": false
        },
        "headers": {
          "type": "text",
          "required": false
        }
      },
      "methods": {
        "getToAddresses": {
          "name": "getToAddresses",
          "async": false,
          "parameters": [],
          "returnType": "Array<object>",
          "isStatic": false,
          "isPublic": true
        },
        "setToAddresses": {
          "name": "setToAddresses",
          "async": false,
          "parameters": [
            {
              "name": "addresses",
              "type": "Array<object>",
              "optional": false,
              "memberTypes": [
                "string"
              ]
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getMetadata": {
          "name": "getMetadata",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setMetadata": {
          "name": "setMetadata",
          "async": false,
          "parameters": [
            {
              "name": "data",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "markRead": {
          "name": "markRead",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "markUnread": {
          "name": "markUnread",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "toggleFlagged": {
          "name": "toggleFlagged",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "isUnread": {
          "name": "isUnread",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "getPreview": {
          "name": "getPreview",
          "async": false,
          "parameters": [
            {
              "name": "maxLength",
              "type": "any",
              "optional": true
            }
          ],
          "returnType": "string",
          "isStatic": false,
          "isPublic": true
        },
        "getAccount": {
          "name": "getAccount",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getEndpoint": {
          "name": "getEndpoint",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getThreadMessages": {
          "name": "getThreadMessages",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getAttachments": {
          "name": "getAttachments",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "send": {
          "name": "send",
          "async": true,
          "parameters": [
            {
              "name": "options",
              "type": "SendMessageOptions",
              "optional": true
            }
          ],
          "returnType": "Promise<MessageSendResult>",
          "isStatic": false,
          "isPublic": true
        },
        "retrySend": {
          "name": "retrySend",
          "async": true,
          "parameters": [
            {
              "name": "options",
              "type": "SendMessageOptions",
              "optional": true
            }
          ],
          "returnType": "Promise<MessageSendResult>",
          "isStatic": false,
          "isPublic": true
        },
        "createReply": {
          "name": "createReply",
          "async": false,
          "parameters": [
            {
              "name": "options",
              "type": "object",
              "optional": true,
              "memberTypes": [
                "boolean"
              ]
            }
          ],
          "returnType": "Email",
          "isStatic": false,
          "isPublic": true
        },
        "createForward": {
          "name": "createForward",
          "async": false,
          "parameters": [],
          "returnType": "Email",
          "isStatic": false,
          "isPublic": true
        },
        "getCcAddresses": {
          "name": "getCcAddresses",
          "async": false,
          "parameters": [],
          "returnType": "Array<object>",
          "isStatic": false,
          "isPublic": true
        },
        "getBccAddresses": {
          "name": "getBccAddresses",
          "async": false,
          "parameters": [],
          "returnType": "Array<object>",
          "isStatic": false,
          "isPublic": true
        },
        "getLabels": {
          "name": "getLabels",
          "async": false,
          "parameters": [],
          "returnType": "string[]",
          "isStatic": false,
          "isPublic": true
        },
        "setLabels": {
          "name": "setLabels",
          "async": false,
          "parameters": [
            {
              "name": "labels",
              "type": "string[]",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getFlags": {
          "name": "getFlags",
          "async": false,
          "parameters": [],
          "returnType": "string[]",
          "isStatic": false,
          "isPublic": true
        },
        "setFlags": {
          "name": "setFlags",
          "async": false,
          "parameters": [
            {
              "name": "flags",
              "type": "string[]",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getHeaders": {
          "name": "getHeaders",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, string | string[]>",
          "isStatic": false,
          "isPublic": true
        },
        "setHeaders": {
          "name": "setHeaders",
          "async": false,
          "parameters": [
            {
              "name": "headers",
              "type": "Record<string, string | string[]>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getFolder": {
          "name": "getFolder",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getThreadEmails": {
          "name": "getThreadEmails",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Email[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getReferences": {
          "name": "getReferences",
          "async": false,
          "parameters": [],
          "returnType": "string[]",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableStrategy": "sti",
        "api": {
          "include": [
            "list",
            "get",
            "create",
            "update",
            "delete"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "skipApiCheck": true
        },
        "tableName": "messages"
      },
      "extends": "Message",
      "exportName": "Email",
      "collectionExportName": "EmailCollection",
      "validationRules": [
        {
          "field": "isRead",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "isFlagged",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "hasAttachments",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "size",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "retryCount",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "maxRetries",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "isAnswered",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "isDraft",
          "rule": "required",
          "fieldType": "boolean"
        }
      ],
      "schema": {
        "tableName": "messages",
        "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"account_id\" UUID,\n  \"persona_id\" UUID,\n  \"endpoint_id\" UUID,\n  \"correlation_id\" TEXT,\n  \"thread_id\" TEXT,\n  \"subject\" TEXT,\n  \"body\" TEXT,\n  \"from_address\" TEXT,\n  \"from_name\" TEXT,\n  \"to_addresses\" TEXT,\n  \"date\" TIMESTAMP,\n  \"is_read\" BOOLEAN DEFAULT FALSE,\n  \"is_flagged\" BOOLEAN DEFAULT FALSE,\n  \"has_attachments\" BOOLEAN DEFAULT FALSE,\n  \"size\" INTEGER DEFAULT 0,\n  \"metadata\" TEXT,\n  \"send_status\" TEXT DEFAULT 'draft',\n  \"sent_at\" TIMESTAMP,\n  \"send_error\" TEXT,\n  \"retry_count\" INTEGER DEFAULT 0,\n  \"max_retries\" INTEGER DEFAULT 3,\n  \"scheduled_send_at\" TIMESTAMP,\n  \"in_reply_to_message_id\" UUID,\n  \"message_id\" TEXT,\n  \"in_reply_to\" TEXT,\n  \"cc_addresses\" TEXT,\n  \"bcc_addresses\" TEXT,\n  \"reply_to_address\" TEXT,\n  \"reply_to_name\" TEXT,\n  \"text_body\" TEXT,\n  \"html_body\" TEXT,\n  \"folder_id\" TEXT,\n  \"folder_path\" TEXT,\n  \"labels\" TEXT,\n  \"flags\" TEXT,\n  \"is_answered\" BOOLEAN DEFAULT FALSE,\n  \"is_draft\" BOOLEAN DEFAULT FALSE,\n  \"raw_message\" TEXT,\n  \"headers\" TEXT,\n  \"channel_id\" TEXT,\n  \"channel_name\" TEXT,\n  \"slack_ts\" TEXT,\n  \"slack_thread_ts\" TEXT,\n  \"reactions\" TEXT,\n  \"is_edited\" BOOLEAN DEFAULT FALSE,\n  \"message_type\" TEXT,\n  \"blocks\" TEXT,\n  \"tweet_id\" TEXT,\n  \"retweet_count\" INTEGER DEFAULT 0,\n  \"like_count\" INTEGER DEFAULT 0,\n  \"reply_count\" INTEGER DEFAULT 0,\n  \"is_retweet\" BOOLEAN DEFAULT FALSE,\n  \"is_reply\" BOOLEAN DEFAULT FALSE,\n  \"media_urls\" TEXT,\n  \"hashtags\" TEXT,\n  \"mentions\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "account_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "accounts",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "persona_id": {
            "type": "UUID",
            "referenceKind": "crossPackageRef",
            "notNull": false
          },
          "endpoint_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "messaging_endpoints",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "correlation_id": {
            "type": "TEXT",
            "notNull": false
          },
          "thread_id": {
            "type": "TEXT",
            "notNull": false
          },
          "subject": {
            "type": "TEXT",
            "notNull": false
          },
          "body": {
            "type": "TEXT",
            "notNull": false
          },
          "from_address": {
            "type": "TEXT",
            "notNull": false
          },
          "from_name": {
            "type": "TEXT",
            "notNull": false
          },
          "to_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "date": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "is_read": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_flagged": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "has_attachments": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "size": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "metadata": {
            "type": "TEXT",
            "notNull": false
          },
          "send_status": {
            "type": "TEXT",
            "notNull": false,
            "default": "draft"
          },
          "sent_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "send_error": {
            "type": "TEXT",
            "notNull": false
          },
          "retry_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "max_retries": {
            "type": "INTEGER",
            "notNull": false,
            "default": 3
          },
          "scheduled_send_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "in_reply_to_message_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "messages",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "message_id": {
            "type": "TEXT",
            "notNull": false
          },
          "in_reply_to": {
            "type": "TEXT",
            "notNull": false
          },
          "cc_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "bcc_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "reply_to_address": {
            "type": "TEXT",
            "notNull": false
          },
          "reply_to_name": {
            "type": "TEXT",
            "notNull": false
          },
          "text_body": {
            "type": "TEXT",
            "notNull": false
          },
          "html_body": {
            "type": "TEXT",
            "notNull": false
          },
          "folder_id": {
            "type": "TEXT",
            "notNull": false
          },
          "folder_path": {
            "type": "TEXT",
            "notNull": false
          },
          "labels": {
            "type": "TEXT",
            "notNull": false
          },
          "flags": {
            "type": "TEXT",
            "notNull": false
          },
          "is_answered": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_draft": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "raw_message": {
            "type": "TEXT",
            "notNull": false
          },
          "headers": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_id": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_name": {
            "type": "TEXT",
            "notNull": false
          },
          "slack_ts": {
            "type": "TEXT",
            "notNull": false
          },
          "slack_thread_ts": {
            "type": "TEXT",
            "notNull": false
          },
          "reactions": {
            "type": "TEXT",
            "notNull": false
          },
          "is_edited": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "message_type": {
            "type": "TEXT",
            "notNull": false
          },
          "blocks": {
            "type": "TEXT",
            "notNull": false
          },
          "tweet_id": {
            "type": "TEXT",
            "notNull": false
          },
          "retweet_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "like_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "reply_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "is_retweet": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_reply": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "media_urls": {
            "type": "TEXT",
            "notNull": false
          },
          "hashtags": {
            "type": "TEXT",
            "notNull": false
          },
          "mentions": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "messages_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "messages_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "messages_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "messages_account_id_idx",
            "columns": [
              "account_id"
            ]
          },
          {
            "name": "messages_persona_id_idx",
            "columns": [
              "persona_id"
            ]
          },
          {
            "name": "messages_endpoint_id_idx",
            "columns": [
              "endpoint_id"
            ]
          },
          {
            "name": "messages_in_reply_to_message_id_idx",
            "columns": [
              "in_reply_to_message_id"
            ]
          }
        ],
        "version": "6ff29dd9"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:EmailAccount": {
      "name": "emailaccount",
      "className": "EmailAccount",
      "qualifiedName": "@happyvertical/smrt-messages:EmailAccount",
      "collection": "accounts",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/EmailAccount.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "created_at": {
          "type": "datetime",
          "required": false
        },
        "updated_at": {
          "type": "datetime",
          "required": false
        },
        "tenantId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sqlType": "UUID",
            "nullable": true,
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": false,
              "autoPopulate": true,
              "nullable": true
            }
          }
        },
        "name": {
          "type": "text",
          "required": false
        },
        "providerType": {
          "type": "text",
          "required": false
        },
        "channelType": {
          "type": "text",
          "required": false
        },
        "credentialSecretId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sensitive": true,
            "readonly": true
          },
          "sensitive": true,
          "readonly": true
        },
        "isActive": {
          "type": "boolean",
          "required": true,
          "default": true
        },
        "lastSyncAt": {
          "type": "datetime",
          "required": false
        },
        "settings": {
          "type": "text",
          "required": false,
          "_meta": {
            "sensitive": true,
            "readonly": true
          },
          "sensitive": true,
          "readonly": true
        },
        "configuration": {
          "type": "text",
          "required": false
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        },
        "email": {
          "type": "text",
          "required": false
        },
        "syncIntervalMinutes": {
          "type": "integer",
          "required": true,
          "default": 60
        }
      },
      "methods": {
        "getSettings": {
          "name": "getSettings",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setSettings": {
          "name": "setSettings",
          "async": false,
          "parameters": [
            {
              "name": "settings",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getConfiguration": {
          "name": "getConfiguration",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setConfiguration": {
          "name": "setConfiguration",
          "async": false,
          "parameters": [
            {
              "name": "configuration",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "activate": {
          "name": "activate",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "deactivate": {
          "name": "deactivate",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "setCredentials": {
          "name": "setCredentials",
          "async": true,
          "parameters": [
            {
              "name": "credentials",
              "type": "Record<string, unknown>",
              "optional": false
            },
            {
              "name": "options",
              "type": "object",
              "optional": true,
              "memberTypes": [
                "string"
              ]
            }
          ],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "createSender": {
          "name": "createSender",
          "async": true,
          "parameters": [],
          "returnType": "Promise<MessageSenderInterface>",
          "isStatic": false,
          "isPublic": true
        },
        "getCredentials": {
          "name": "getCredentials",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Record<string, unknown> | null>",
          "isStatic": false,
          "isPublic": true
        },
        "createClient": {
          "name": "createClient",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "syncFrom": {
          "name": "syncFrom",
          "async": true,
          "parameters": [
            {
              "name": "options",
              "type": "SyncOptions",
              "optional": true
            }
          ],
          "returnType": "Promise<SyncResult>",
          "isStatic": false,
          "isPublic": true
        },
        "getFolders": {
          "name": "getFolders",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getEmails": {
          "name": "getEmails",
          "async": true,
          "parameters": [
            {
              "name": "limit",
              "type": "number",
              "optional": true
            }
          ],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getUnreadCount": {
          "name": "getUnreadCount",
          "async": true,
          "parameters": [],
          "returnType": "Promise<number>",
          "isStatic": false,
          "isPublic": true
        },
        "syncAll": {
          "name": "syncAll",
          "async": true,
          "parameters": [
            {
              "name": "args",
              "type": "Record<string, unknown>",
              "optional": true
            }
          ],
          "returnType": "Promise<Map<string, object>>",
          "isStatic": false,
          "isPublic": true
        },
        "migrateToSecrets": {
          "name": "migrateToSecrets",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableStrategy": "sti",
        "api": {
          "include": [
            "list",
            "get"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "include": [
            "list",
            "get"
          ]
        },
        "tableName": "accounts"
      },
      "extends": "Account",
      "exportName": "EmailAccount",
      "collectionExportName": "EmailAccountCollection",
      "validationRules": [
        {
          "field": "isActive",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "syncIntervalMinutes",
          "rule": "required",
          "fieldType": "integer"
        }
      ],
      "schema": {
        "tableName": "accounts",
        "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"name\" TEXT,\n  \"provider_type\" TEXT,\n  \"channel_type\" TEXT,\n  \"credential_secret_id\" TEXT,\n  \"is_active\" BOOLEAN DEFAULT TRUE,\n  \"last_sync_at\" TIMESTAMP,\n  \"settings\" TEXT,\n  \"configuration\" TEXT,\n  \"email\" TEXT,\n  \"sync_interval_minutes\" INTEGER DEFAULT 60,\n  \"workspace_id\" TEXT,\n  \"workspace_name\" TEXT,\n  \"bot_user_id\" TEXT,\n  \"handle\" TEXT,\n  \"twitter_user_id\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "name": {
            "type": "TEXT",
            "notNull": false
          },
          "provider_type": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_type": {
            "type": "TEXT",
            "notNull": false
          },
          "credential_secret_id": {
            "type": "TEXT",
            "notNull": false
          },
          "is_active": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": true
          },
          "last_sync_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "settings": {
            "type": "TEXT",
            "notNull": false
          },
          "configuration": {
            "type": "TEXT",
            "notNull": false
          },
          "email": {
            "type": "TEXT",
            "notNull": false
          },
          "sync_interval_minutes": {
            "type": "INTEGER",
            "notNull": false,
            "default": 60
          },
          "workspace_id": {
            "type": "TEXT",
            "notNull": false
          },
          "workspace_name": {
            "type": "TEXT",
            "notNull": false
          },
          "bot_user_id": {
            "type": "TEXT",
            "notNull": false
          },
          "handle": {
            "type": "TEXT",
            "notNull": false
          },
          "twitter_user_id": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "accounts_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "accounts_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "accounts_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          }
        ],
        "version": "3854ea98"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:EmailAttachment": {
      "name": "emailattachment",
      "className": "EmailAttachment",
      "qualifiedName": "@happyvertical/smrt-messages:EmailAttachment",
      "collection": "emailattachments",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/EmailAttachment.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {},
      "methods": {
        "getMessage": {
          "name": "getMessage",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "isImage": {
          "name": "isImage",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "isPdf": {
          "name": "isPdf",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "isInline": {
          "name": "isInline",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "getExtension": {
          "name": "getExtension",
          "async": false,
          "parameters": [],
          "returnType": "string",
          "isStatic": false,
          "isPublic": true
        },
        "getFormattedSize": {
          "name": "getFormattedSize",
          "async": false,
          "parameters": [],
          "returnType": "string",
          "isStatic": false,
          "isPublic": true
        },
        "hasExternalFile": {
          "name": "hasExternalFile",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "readContent": {
          "name": "readContent",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Buffer | null>",
          "isStatic": false,
          "isPublic": true
        },
        "getEmail": {
          "name": "getEmail",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {},
      "extends": "Attachment",
      "exportName": "EmailAttachment",
      "collectionExportName": "EmailAttachmentCollection",
      "schema": {
        "tableName": "email_attachments",
        "ddl": "CREATE TABLE IF NOT EXISTS \"email_attachments\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          }
        },
        "indexes": [
          {
            "name": "email_attachments_slug_context_idx",
            "columns": [
              "slug",
              "context"
            ],
            "unique": true
          },
          {
            "name": "email_attachments_created_at_idx",
            "columns": [
              "created_at"
            ]
          }
        ],
        "version": "70291c59"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:EmailFolder": {
      "name": "emailfolder",
      "className": "EmailFolder",
      "qualifiedName": "@happyvertical/smrt-messages:EmailFolder",
      "collection": "emailfolders",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/EmailFolder.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "tenantId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sqlType": "UUID",
            "nullable": true,
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": false,
              "autoPopulate": true,
              "nullable": true,
              "mode": "optional",
              "field": "tenantId",
              "allowSuperAdminBypass": false
            }
          }
        },
        "accountId": {
          "type": "foreignKey",
          "required": false,
          "related": "Account"
        },
        "name": {
          "type": "text",
          "required": false
        },
        "path": {
          "type": "text",
          "required": false
        },
        "delimiter": {
          "type": "text",
          "required": false
        },
        "specialUse": {
          "type": "text",
          "required": false
        },
        "messageCount": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "unreadCount": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "subscribed": {
          "type": "boolean",
          "required": true,
          "default": true
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        }
      },
      "methods": {
        "getAccount": {
          "name": "getAccount",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getEmails": {
          "name": "getEmails",
          "async": true,
          "parameters": [
            {
              "name": "limit",
              "type": "number",
              "optional": true
            }
          ],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getUnreadEmails": {
          "name": "getUnreadEmails",
          "async": true,
          "parameters": [
            {
              "name": "limit",
              "type": "number",
              "optional": true
            }
          ],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "refreshCounts": {
          "name": "refreshCounts",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "isInbox": {
          "name": "isInbox",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "isSent": {
          "name": "isSent",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "isDrafts": {
          "name": "isDrafts",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "isTrash": {
          "name": "isTrash",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "isSpam": {
          "name": "isSpam",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "isSystemFolder": {
          "name": "isSystemFolder",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "subscribe": {
          "name": "subscribe",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "unsubscribe": {
          "name": "unsubscribe",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "api": {
          "include": [
            "list",
            "get",
            "create",
            "update",
            "delete"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "skipApiCheck": true
        },
        "tenantScoped": {
          "mode": "optional"
        },
        "conflictColumns": [
          "tenant_id",
          "slug",
          "context"
        ]
      },
      "extends": "SmrtObject",
      "exportName": "EmailFolder",
      "collectionExportName": "EmailFolderCollection",
      "validationRules": [
        {
          "field": "messageCount",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "unreadCount",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "subscribed",
          "rule": "required",
          "fieldType": "boolean"
        }
      ],
      "schema": {
        "tableName": "email_folders",
        "ddl": "CREATE TABLE IF NOT EXISTS \"email_folders\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"account_id\" UUID,\n  \"name\" TEXT,\n  \"path\" TEXT,\n  \"delimiter\" TEXT,\n  \"special_use\" TEXT,\n  \"message_count\" INTEGER NOT NULL DEFAULT 0,\n  \"unread_count\" INTEGER NOT NULL DEFAULT 0,\n  \"subscribed\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false,
            "unique": false
          },
          "account_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "unique": false,
            "foreignKey": {
              "table": "accounts",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "name": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "path": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "delimiter": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "special_use": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "message_count": {
            "type": "INTEGER",
            "notNull": true,
            "unique": false,
            "default": 0
          },
          "unread_count": {
            "type": "INTEGER",
            "notNull": true,
            "unique": false,
            "default": 0
          },
          "subscribed": {
            "type": "BOOLEAN",
            "notNull": true,
            "unique": false,
            "default": true
          }
        },
        "indexes": [
          {
            "name": "email_folders_slug_context_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "email_folders_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "email_folders_account_id_idx",
            "columns": [
              "account_id"
            ]
          }
        ],
        "version": "e895818f"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:Message": {
      "name": "message",
      "className": "Message",
      "qualifiedName": "@happyvertical/smrt-messages:Message",
      "collection": "messages",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/Message.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "created_at": {
          "type": "datetime",
          "required": false
        },
        "updated_at": {
          "type": "datetime",
          "required": false
        },
        "tenantId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sqlType": "UUID",
            "nullable": true,
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": false,
              "autoPopulate": true,
              "nullable": true,
              "mode": "optional",
              "field": "tenantId",
              "allowSuperAdminBypass": false
            }
          }
        },
        "accountId": {
          "type": "foreignKey",
          "required": false,
          "related": "Account"
        },
        "personaId": {
          "type": "crossPackageRef",
          "required": false,
          "related": "@happyvertical/smrt-personas:AgentPersona",
          "_meta": {
            "nullable": true
          }
        },
        "endpointId": {
          "type": "foreignKey",
          "required": false,
          "related": "MessagingEndpoint"
        },
        "correlationId": {
          "type": "text",
          "required": false
        },
        "threadId": {
          "type": "text",
          "required": false
        },
        "subject": {
          "type": "text",
          "required": false
        },
        "body": {
          "type": "text",
          "required": false
        },
        "fromAddress": {
          "type": "text",
          "required": false
        },
        "fromName": {
          "type": "text",
          "required": false
        },
        "toAddresses": {
          "type": "text",
          "required": false
        },
        "date": {
          "type": "datetime",
          "required": false
        },
        "isRead": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "isFlagged": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "hasAttachments": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "size": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "metadata": {
          "type": "text",
          "required": false
        },
        "sendStatus": {
          "type": "text",
          "required": false,
          "default": "draft"
        },
        "sentAt": {
          "type": "datetime",
          "required": false
        },
        "sendError": {
          "type": "text",
          "required": false
        },
        "retryCount": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "maxRetries": {
          "type": "integer",
          "required": true,
          "default": 3
        },
        "scheduledSendAt": {
          "type": "datetime",
          "required": false
        },
        "inReplyToMessageId": {
          "type": "foreignKey",
          "required": false,
          "related": "Message"
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        }
      },
      "methods": {
        "getToAddresses": {
          "name": "getToAddresses",
          "async": false,
          "parameters": [],
          "returnType": "Array<object>",
          "isStatic": false,
          "isPublic": true
        },
        "setToAddresses": {
          "name": "setToAddresses",
          "async": false,
          "parameters": [
            {
              "name": "addresses",
              "type": "Array<object>",
              "optional": false,
              "memberTypes": [
                "string"
              ]
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getMetadata": {
          "name": "getMetadata",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setMetadata": {
          "name": "setMetadata",
          "async": false,
          "parameters": [
            {
              "name": "data",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "markRead": {
          "name": "markRead",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "markUnread": {
          "name": "markUnread",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "toggleFlagged": {
          "name": "toggleFlagged",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "isUnread": {
          "name": "isUnread",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "getPreview": {
          "name": "getPreview",
          "async": false,
          "parameters": [
            {
              "name": "maxLength",
              "type": "any",
              "optional": true
            }
          ],
          "returnType": "string",
          "isStatic": false,
          "isPublic": true
        },
        "getAccount": {
          "name": "getAccount",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getEndpoint": {
          "name": "getEndpoint",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getThreadMessages": {
          "name": "getThreadMessages",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getAttachments": {
          "name": "getAttachments",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "send": {
          "name": "send",
          "async": true,
          "parameters": [
            {
              "name": "options",
              "type": "SendMessageOptions",
              "optional": true
            }
          ],
          "returnType": "Promise<MessageSendResult>",
          "isStatic": false,
          "isPublic": true
        },
        "retrySend": {
          "name": "retrySend",
          "async": true,
          "parameters": [
            {
              "name": "options",
              "type": "SendMessageOptions",
              "optional": true
            }
          ],
          "returnType": "Promise<MessageSendResult>",
          "isStatic": false,
          "isPublic": true
        },
        "createReply": {
          "name": "createReply",
          "async": false,
          "parameters": [
            {
              "name": "_options",
              "type": "object",
              "optional": true,
              "memberTypes": [
                "boolean"
              ]
            }
          ],
          "returnType": "Message",
          "isStatic": false,
          "isPublic": true
        },
        "createForward": {
          "name": "createForward",
          "async": false,
          "parameters": [],
          "returnType": "Message",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableStrategy": "sti",
        "api": {
          "include": [
            "list",
            "get"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "skipApiCheck": true
        },
        "tenantScoped": {
          "mode": "optional"
        },
        "conflictColumns": [
          "tenant_id",
          "slug",
          "context",
          "_meta_type"
        ]
      },
      "extends": "SmrtObject",
      "exportName": "Message",
      "collectionExportName": "MessageCollection",
      "validationRules": [
        {
          "field": "isRead",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "isFlagged",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "hasAttachments",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "size",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "retryCount",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "maxRetries",
          "rule": "required",
          "fieldType": "integer"
        }
      ],
      "schema": {
        "tableName": "messages",
        "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"account_id\" UUID,\n  \"persona_id\" UUID,\n  \"endpoint_id\" UUID,\n  \"correlation_id\" TEXT,\n  \"thread_id\" TEXT,\n  \"subject\" TEXT,\n  \"body\" TEXT,\n  \"from_address\" TEXT,\n  \"from_name\" TEXT,\n  \"to_addresses\" TEXT,\n  \"date\" TIMESTAMP,\n  \"is_read\" BOOLEAN DEFAULT FALSE,\n  \"is_flagged\" BOOLEAN DEFAULT FALSE,\n  \"has_attachments\" BOOLEAN DEFAULT FALSE,\n  \"size\" INTEGER DEFAULT 0,\n  \"metadata\" TEXT,\n  \"send_status\" TEXT DEFAULT 'draft',\n  \"sent_at\" TIMESTAMP,\n  \"send_error\" TEXT,\n  \"retry_count\" INTEGER DEFAULT 0,\n  \"max_retries\" INTEGER DEFAULT 3,\n  \"scheduled_send_at\" TIMESTAMP,\n  \"in_reply_to_message_id\" UUID,\n  \"message_id\" TEXT,\n  \"in_reply_to\" TEXT,\n  \"cc_addresses\" TEXT,\n  \"bcc_addresses\" TEXT,\n  \"reply_to_address\" TEXT,\n  \"reply_to_name\" TEXT,\n  \"text_body\" TEXT,\n  \"html_body\" TEXT,\n  \"folder_id\" TEXT,\n  \"folder_path\" TEXT,\n  \"labels\" TEXT,\n  \"flags\" TEXT,\n  \"is_answered\" BOOLEAN DEFAULT FALSE,\n  \"is_draft\" BOOLEAN DEFAULT FALSE,\n  \"raw_message\" TEXT,\n  \"headers\" TEXT,\n  \"channel_id\" TEXT,\n  \"channel_name\" TEXT,\n  \"slack_ts\" TEXT,\n  \"slack_thread_ts\" TEXT,\n  \"reactions\" TEXT,\n  \"is_edited\" BOOLEAN DEFAULT FALSE,\n  \"message_type\" TEXT,\n  \"blocks\" TEXT,\n  \"tweet_id\" TEXT,\n  \"retweet_count\" INTEGER DEFAULT 0,\n  \"like_count\" INTEGER DEFAULT 0,\n  \"reply_count\" INTEGER DEFAULT 0,\n  \"is_retweet\" BOOLEAN DEFAULT FALSE,\n  \"is_reply\" BOOLEAN DEFAULT FALSE,\n  \"media_urls\" TEXT,\n  \"hashtags\" TEXT,\n  \"mentions\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "account_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "accounts",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "persona_id": {
            "type": "UUID",
            "referenceKind": "crossPackageRef",
            "notNull": false
          },
          "endpoint_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "messaging_endpoints",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "correlation_id": {
            "type": "TEXT",
            "notNull": false
          },
          "thread_id": {
            "type": "TEXT",
            "notNull": false
          },
          "subject": {
            "type": "TEXT",
            "notNull": false
          },
          "body": {
            "type": "TEXT",
            "notNull": false
          },
          "from_address": {
            "type": "TEXT",
            "notNull": false
          },
          "from_name": {
            "type": "TEXT",
            "notNull": false
          },
          "to_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "date": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "is_read": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_flagged": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "has_attachments": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "size": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "metadata": {
            "type": "TEXT",
            "notNull": false
          },
          "send_status": {
            "type": "TEXT",
            "notNull": false,
            "default": "draft"
          },
          "sent_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "send_error": {
            "type": "TEXT",
            "notNull": false
          },
          "retry_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "max_retries": {
            "type": "INTEGER",
            "notNull": false,
            "default": 3
          },
          "scheduled_send_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "in_reply_to_message_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "messages",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "message_id": {
            "type": "TEXT",
            "notNull": false
          },
          "in_reply_to": {
            "type": "TEXT",
            "notNull": false
          },
          "cc_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "bcc_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "reply_to_address": {
            "type": "TEXT",
            "notNull": false
          },
          "reply_to_name": {
            "type": "TEXT",
            "notNull": false
          },
          "text_body": {
            "type": "TEXT",
            "notNull": false
          },
          "html_body": {
            "type": "TEXT",
            "notNull": false
          },
          "folder_id": {
            "type": "TEXT",
            "notNull": false
          },
          "folder_path": {
            "type": "TEXT",
            "notNull": false
          },
          "labels": {
            "type": "TEXT",
            "notNull": false
          },
          "flags": {
            "type": "TEXT",
            "notNull": false
          },
          "is_answered": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_draft": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "raw_message": {
            "type": "TEXT",
            "notNull": false
          },
          "headers": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_id": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_name": {
            "type": "TEXT",
            "notNull": false
          },
          "slack_ts": {
            "type": "TEXT",
            "notNull": false
          },
          "slack_thread_ts": {
            "type": "TEXT",
            "notNull": false
          },
          "reactions": {
            "type": "TEXT",
            "notNull": false
          },
          "is_edited": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "message_type": {
            "type": "TEXT",
            "notNull": false
          },
          "blocks": {
            "type": "TEXT",
            "notNull": false
          },
          "tweet_id": {
            "type": "TEXT",
            "notNull": false
          },
          "retweet_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "like_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "reply_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "is_retweet": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_reply": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "media_urls": {
            "type": "TEXT",
            "notNull": false
          },
          "hashtags": {
            "type": "TEXT",
            "notNull": false
          },
          "mentions": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "messages_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "messages_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "messages_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "messages_account_id_idx",
            "columns": [
              "account_id"
            ]
          },
          {
            "name": "messages_persona_id_idx",
            "columns": [
              "persona_id"
            ]
          },
          {
            "name": "messages_endpoint_id_idx",
            "columns": [
              "endpoint_id"
            ]
          },
          {
            "name": "messages_in_reply_to_message_id_idx",
            "columns": [
              "in_reply_to_message_id"
            ]
          }
        ],
        "version": "c03791c7"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:MessagingEndpoint": {
      "name": "messagingendpoint",
      "className": "MessagingEndpoint",
      "qualifiedName": "@happyvertical/smrt-messages:MessagingEndpoint",
      "collection": "messagingendpoints",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/MessagingEndpoint.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "tenantId": {
          "type": "text",
          "required": true,
          "_meta": {
            "sqlType": "UUID",
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": true,
              "autoPopulate": true,
              "nullable": false,
              "mode": "required",
              "field": "tenantId",
              "allowSuperAdminBypass": false
            }
          }
        },
        "profileId": {
          "type": "crossPackageRef",
          "required": false,
          "related": "@happyvertical/smrt-profiles:Profile",
          "_meta": {
            "nullable": true
          }
        },
        "label": {
          "type": "text",
          "required": true,
          "_meta": {
            "required": true
          }
        },
        "channel": {
          "type": "text",
          "required": true,
          "default": "email",
          "_meta": {
            "required": true
          }
        },
        "address": {
          "type": "text",
          "required": true,
          "_meta": {
            "required": true,
            "sensitive": true
          },
          "sensitive": true
        },
        "isActive": {
          "type": "boolean",
          "required": true,
          "default": true
        },
        "verifiedAt": {
          "type": "datetime",
          "required": false
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        }
      },
      "methods": {
        "getAddress": {
          "name": "getAddress",
          "async": false,
          "parameters": [],
          "returnType": "T",
          "isStatic": false,
          "isPublic": true
        },
        "setAddress": {
          "name": "setAddress",
          "async": false,
          "parameters": [
            {
              "name": "address",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getMaskedAddress": {
          "name": "getMaskedAddress",
          "async": false,
          "parameters": [],
          "returnType": "string",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableName": "messaging_endpoints",
        "api": {
          "include": [
            "list",
            "get"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "include": [
            "list",
            "get"
          ]
        },
        "conflictColumns": [
          "tenant_id",
          "channel",
          "label"
        ],
        "tenantScoped": {
          "mode": "required"
        }
      },
      "extends": "SmrtObject",
      "exportName": "MessagingEndpoint",
      "collectionExportName": "MessagingEndpointCollection",
      "validationRules": [
        {
          "field": "label",
          "rule": "required",
          "fieldType": "text"
        },
        {
          "field": "channel",
          "rule": "required",
          "fieldType": "text"
        },
        {
          "field": "address",
          "rule": "required",
          "fieldType": "text"
        },
        {
          "field": "isActive",
          "rule": "required",
          "fieldType": "boolean"
        }
      ],
      "schema": {
        "tableName": "messaging_endpoints",
        "ddl": "CREATE TABLE IF NOT EXISTS \"messaging_endpoints\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID NOT NULL,\n  \"profile_id\" UUID,\n  \"label\" TEXT NOT NULL,\n  \"channel\" TEXT NOT NULL DEFAULT 'email',\n  \"address\" TEXT NOT NULL,\n  \"is_active\" BOOLEAN NOT NULL DEFAULT TRUE,\n  \"verified_at\" TIMESTAMP\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": true,
            "unique": false
          },
          "profile_id": {
            "type": "UUID",
            "referenceKind": "crossPackageRef",
            "notNull": false,
            "unique": false
          },
          "label": {
            "type": "TEXT",
            "notNull": true,
            "unique": false
          },
          "channel": {
            "type": "TEXT",
            "notNull": true,
            "unique": false,
            "default": "email"
          },
          "address": {
            "type": "TEXT",
            "notNull": true,
            "unique": false
          },
          "is_active": {
            "type": "BOOLEAN",
            "notNull": true,
            "unique": false,
            "default": true
          },
          "verified_at": {
            "type": "TIMESTAMP",
            "notNull": false,
            "unique": false
          }
        },
        "indexes": [
          {
            "name": "messaging_endpoints_tenant_id_channel_idx",
            "columns": [
              "tenant_id",
              "channel",
              "label"
            ],
            "unique": true
          },
          {
            "name": "messaging_endpoints_slug_context_idx",
            "columns": [
              "slug",
              "context"
            ]
          },
          {
            "name": "messaging_endpoints_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "messaging_endpoints_profile_id_idx",
            "columns": [
              "profile_id"
            ]
          }
        ],
        "version": "fca5554d"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:PersonaMessageRoute": {
      "name": "personamessageroute",
      "className": "PersonaMessageRoute",
      "qualifiedName": "@happyvertical/smrt-messages:PersonaMessageRoute",
      "collection": "personamessageroutes",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/PersonaMessageRoute.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "tenantId": {
          "type": "text",
          "required": true,
          "_meta": {
            "sqlType": "UUID",
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": true,
              "autoPopulate": true,
              "nullable": false,
              "mode": "required",
              "field": "tenantId",
              "allowSuperAdminBypass": false
            }
          }
        },
        "personaId": {
          "type": "crossPackageRef",
          "required": true,
          "related": "@happyvertical/smrt-personas:AgentPersona"
        },
        "accountId": {
          "type": "foreignKey",
          "required": true,
          "related": "Account",
          "_meta": {
            "required": true
          }
        },
        "endpointId": {
          "type": "foreignKey",
          "required": true,
          "related": "MessagingEndpoint",
          "_meta": {
            "required": true
          }
        },
        "purpose": {
          "type": "text",
          "required": true,
          "_meta": {
            "required": true
          }
        },
        "priority": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "enabled": {
          "type": "boolean",
          "required": true,
          "default": true
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        }
      },
      "methods": {},
      "decoratorConfig": {
        "tableName": "persona_message_routes",
        "api": {
          "include": [
            "list",
            "get"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "include": [
            "list",
            "get"
          ]
        },
        "conflictColumns": [
          "tenant_id",
          "persona_id",
          "account_id",
          "endpoint_id",
          "purpose"
        ],
        "tenantScoped": {
          "mode": "required"
        }
      },
      "extends": "SmrtObject",
      "exportName": "PersonaMessageRoute",
      "collectionExportName": "PersonaMessageRouteCollection",
      "validationRules": [
        {
          "field": "personaId",
          "rule": "required",
          "fieldType": "crossPackageRef"
        },
        {
          "field": "accountId",
          "rule": "required",
          "fieldType": "foreignKey"
        },
        {
          "field": "endpointId",
          "rule": "required",
          "fieldType": "foreignKey"
        },
        {
          "field": "purpose",
          "rule": "required",
          "fieldType": "text"
        },
        {
          "field": "priority",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "enabled",
          "rule": "required",
          "fieldType": "boolean"
        }
      ],
      "schema": {
        "tableName": "persona_message_routes",
        "ddl": "CREATE TABLE IF NOT EXISTS \"persona_message_routes\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID NOT NULL,\n  \"persona_id\" UUID NOT NULL,\n  \"account_id\" UUID NOT NULL,\n  \"endpoint_id\" UUID NOT NULL,\n  \"purpose\" TEXT NOT NULL,\n  \"priority\" INTEGER NOT NULL DEFAULT 0,\n  \"enabled\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": true,
            "unique": false
          },
          "persona_id": {
            "type": "UUID",
            "referenceKind": "crossPackageRef",
            "notNull": true,
            "unique": false
          },
          "account_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": true,
            "unique": false,
            "foreignKey": {
              "table": "accounts",
              "column": "id",
              "onDelete": "CASCADE",
              "onUpdate": "CASCADE"
            }
          },
          "endpoint_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": true,
            "unique": false,
            "foreignKey": {
              "table": "messaging_endpoints",
              "column": "id",
              "onDelete": "CASCADE",
              "onUpdate": "CASCADE"
            }
          },
          "purpose": {
            "type": "TEXT",
            "notNull": true,
            "unique": false
          },
          "priority": {
            "type": "INTEGER",
            "notNull": true,
            "unique": false,
            "default": 0
          },
          "enabled": {
            "type": "BOOLEAN",
            "notNull": true,
            "unique": false,
            "default": true
          }
        },
        "indexes": [
          {
            "name": "persona_message_routes_tenant_id_persona_id_idx",
            "columns": [
              "tenant_id",
              "persona_id",
              "account_id",
              "endpoint_id",
              "purpose"
            ],
            "unique": true
          },
          {
            "name": "persona_message_routes_slug_context_idx",
            "columns": [
              "slug",
              "context"
            ]
          },
          {
            "name": "persona_message_routes_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "persona_message_routes_persona_id_idx",
            "columns": [
              "persona_id"
            ]
          },
          {
            "name": "persona_message_routes_account_id_idx",
            "columns": [
              "account_id"
            ]
          },
          {
            "name": "persona_message_routes_endpoint_id_idx",
            "columns": [
              "endpoint_id"
            ]
          }
        ],
        "version": "3dc1d5d0"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:SlackAccount": {
      "name": "slackaccount",
      "className": "SlackAccount",
      "qualifiedName": "@happyvertical/smrt-messages:SlackAccount",
      "collection": "accounts",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/SlackAccount.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "created_at": {
          "type": "datetime",
          "required": false
        },
        "updated_at": {
          "type": "datetime",
          "required": false
        },
        "tenantId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sqlType": "UUID",
            "nullable": true,
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": false,
              "autoPopulate": true,
              "nullable": true
            }
          }
        },
        "name": {
          "type": "text",
          "required": false
        },
        "providerType": {
          "type": "text",
          "required": false
        },
        "channelType": {
          "type": "text",
          "required": false
        },
        "credentialSecretId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sensitive": true,
            "readonly": true
          },
          "sensitive": true,
          "readonly": true
        },
        "isActive": {
          "type": "boolean",
          "required": true,
          "default": true
        },
        "lastSyncAt": {
          "type": "datetime",
          "required": false
        },
        "settings": {
          "type": "text",
          "required": false,
          "_meta": {
            "sensitive": true,
            "readonly": true
          },
          "sensitive": true,
          "readonly": true
        },
        "configuration": {
          "type": "text",
          "required": false
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        },
        "workspaceId": {
          "type": "text",
          "required": false
        },
        "workspaceName": {
          "type": "text",
          "required": false
        },
        "botUserId": {
          "type": "text",
          "required": false
        }
      },
      "methods": {
        "getSettings": {
          "name": "getSettings",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setSettings": {
          "name": "setSettings",
          "async": false,
          "parameters": [
            {
              "name": "settings",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getConfiguration": {
          "name": "getConfiguration",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setConfiguration": {
          "name": "setConfiguration",
          "async": false,
          "parameters": [
            {
              "name": "configuration",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "activate": {
          "name": "activate",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "deactivate": {
          "name": "deactivate",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "setCredentials": {
          "name": "setCredentials",
          "async": true,
          "parameters": [
            {
              "name": "credentials",
              "type": "Record<string, unknown>",
              "optional": false
            },
            {
              "name": "options",
              "type": "object",
              "optional": true,
              "memberTypes": [
                "string"
              ]
            }
          ],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "createSender": {
          "name": "createSender",
          "async": true,
          "parameters": [],
          "returnType": "Promise<MessageSenderInterface>",
          "isStatic": false,
          "isPublic": true
        },
        "getCredentials": {
          "name": "getCredentials",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Record<string, unknown> | null>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableStrategy": "sti",
        "api": {
          "include": [
            "list",
            "get"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "include": [
            "list",
            "get"
          ]
        },
        "tableName": "accounts"
      },
      "extends": "Account",
      "exportName": "SlackAccount",
      "collectionExportName": "SlackAccountCollection",
      "validationRules": [
        {
          "field": "isActive",
          "rule": "required",
          "fieldType": "boolean"
        }
      ],
      "schema": {
        "tableName": "accounts",
        "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"name\" TEXT,\n  \"provider_type\" TEXT,\n  \"channel_type\" TEXT,\n  \"credential_secret_id\" TEXT,\n  \"is_active\" BOOLEAN DEFAULT TRUE,\n  \"last_sync_at\" TIMESTAMP,\n  \"settings\" TEXT,\n  \"configuration\" TEXT,\n  \"email\" TEXT,\n  \"sync_interval_minutes\" INTEGER DEFAULT 60,\n  \"workspace_id\" TEXT,\n  \"workspace_name\" TEXT,\n  \"bot_user_id\" TEXT,\n  \"handle\" TEXT,\n  \"twitter_user_id\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "name": {
            "type": "TEXT",
            "notNull": false
          },
          "provider_type": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_type": {
            "type": "TEXT",
            "notNull": false
          },
          "credential_secret_id": {
            "type": "TEXT",
            "notNull": false
          },
          "is_active": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": true
          },
          "last_sync_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "settings": {
            "type": "TEXT",
            "notNull": false
          },
          "configuration": {
            "type": "TEXT",
            "notNull": false
          },
          "email": {
            "type": "TEXT",
            "notNull": false
          },
          "sync_interval_minutes": {
            "type": "INTEGER",
            "notNull": false,
            "default": 60
          },
          "workspace_id": {
            "type": "TEXT",
            "notNull": false
          },
          "workspace_name": {
            "type": "TEXT",
            "notNull": false
          },
          "bot_user_id": {
            "type": "TEXT",
            "notNull": false
          },
          "handle": {
            "type": "TEXT",
            "notNull": false
          },
          "twitter_user_id": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "accounts_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "accounts_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "accounts_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          }
        ],
        "version": "3854ea98"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:SlackMessage": {
      "name": "slackmessage",
      "className": "SlackMessage",
      "qualifiedName": "@happyvertical/smrt-messages:SlackMessage",
      "collection": "messages",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/SlackMessage.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "created_at": {
          "type": "datetime",
          "required": false
        },
        "updated_at": {
          "type": "datetime",
          "required": false
        },
        "tenantId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sqlType": "UUID",
            "nullable": true,
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": false,
              "autoPopulate": true,
              "nullable": true
            }
          }
        },
        "accountId": {
          "type": "foreignKey",
          "required": false,
          "related": "Account"
        },
        "personaId": {
          "type": "crossPackageRef",
          "required": false,
          "related": "@happyvertical/smrt-personas:AgentPersona",
          "_meta": {
            "nullable": true
          }
        },
        "endpointId": {
          "type": "foreignKey",
          "required": false,
          "related": "MessagingEndpoint"
        },
        "correlationId": {
          "type": "text",
          "required": false
        },
        "threadId": {
          "type": "text",
          "required": false
        },
        "subject": {
          "type": "text",
          "required": false
        },
        "body": {
          "type": "text",
          "required": false
        },
        "fromAddress": {
          "type": "text",
          "required": false
        },
        "fromName": {
          "type": "text",
          "required": false
        },
        "toAddresses": {
          "type": "text",
          "required": false
        },
        "date": {
          "type": "datetime",
          "required": false
        },
        "isRead": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "isFlagged": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "hasAttachments": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "size": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "metadata": {
          "type": "text",
          "required": false
        },
        "sendStatus": {
          "type": "text",
          "required": false,
          "default": "draft"
        },
        "sentAt": {
          "type": "datetime",
          "required": false
        },
        "sendError": {
          "type": "text",
          "required": false
        },
        "retryCount": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "maxRetries": {
          "type": "integer",
          "required": true,
          "default": 3
        },
        "scheduledSendAt": {
          "type": "datetime",
          "required": false
        },
        "inReplyToMessageId": {
          "type": "foreignKey",
          "required": false,
          "related": "Message"
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        },
        "channelId": {
          "type": "text",
          "required": false
        },
        "channelName": {
          "type": "text",
          "required": false
        },
        "slackTs": {
          "type": "text",
          "required": false
        },
        "slackThreadTs": {
          "type": "text",
          "required": false
        },
        "reactions": {
          "type": "text",
          "required": false
        },
        "isEdited": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "messageType": {
          "type": "text",
          "required": false
        },
        "blocks": {
          "type": "text",
          "required": false
        }
      },
      "methods": {
        "getToAddresses": {
          "name": "getToAddresses",
          "async": false,
          "parameters": [],
          "returnType": "Array<object>",
          "isStatic": false,
          "isPublic": true
        },
        "setToAddresses": {
          "name": "setToAddresses",
          "async": false,
          "parameters": [
            {
              "name": "addresses",
              "type": "Array<object>",
              "optional": false,
              "memberTypes": [
                "string"
              ]
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getMetadata": {
          "name": "getMetadata",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setMetadata": {
          "name": "setMetadata",
          "async": false,
          "parameters": [
            {
              "name": "data",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "markRead": {
          "name": "markRead",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "markUnread": {
          "name": "markUnread",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "toggleFlagged": {
          "name": "toggleFlagged",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "isUnread": {
          "name": "isUnread",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "getPreview": {
          "name": "getPreview",
          "async": false,
          "parameters": [
            {
              "name": "maxLength",
              "type": "any",
              "optional": true
            }
          ],
          "returnType": "string",
          "isStatic": false,
          "isPublic": true
        },
        "getAccount": {
          "name": "getAccount",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getEndpoint": {
          "name": "getEndpoint",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getThreadMessages": {
          "name": "getThreadMessages",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getAttachments": {
          "name": "getAttachments",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "send": {
          "name": "send",
          "async": true,
          "parameters": [
            {
              "name": "options",
              "type": "SendMessageOptions",
              "optional": true
            }
          ],
          "returnType": "Promise<MessageSendResult>",
          "isStatic": false,
          "isPublic": true
        },
        "retrySend": {
          "name": "retrySend",
          "async": true,
          "parameters": [
            {
              "name": "options",
              "type": "SendMessageOptions",
              "optional": true
            }
          ],
          "returnType": "Promise<MessageSendResult>",
          "isStatic": false,
          "isPublic": true
        },
        "createReply": {
          "name": "createReply",
          "async": false,
          "parameters": [
            {
              "name": "_options",
              "type": "object",
              "optional": true,
              "memberTypes": [
                "boolean"
              ]
            }
          ],
          "returnType": "Message",
          "isStatic": false,
          "isPublic": true
        },
        "createForward": {
          "name": "createForward",
          "async": false,
          "parameters": [],
          "returnType": "Message",
          "isStatic": false,
          "isPublic": true
        },
        "getReactions": {
          "name": "getReactions",
          "async": false,
          "parameters": [],
          "returnType": "Array<object>",
          "isStatic": false,
          "isPublic": true
        },
        "getBlocks": {
          "name": "getBlocks",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>[]",
          "isStatic": false,
          "isPublic": true
        },
        "isInThread": {
          "name": "isInThread",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "getTotalReactions": {
          "name": "getTotalReactions",
          "async": false,
          "parameters": [],
          "returnType": "number",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableStrategy": "sti",
        "api": {
          "include": [
            "list",
            "get",
            "create"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "skipApiCheck": true
        },
        "tableName": "messages"
      },
      "extends": "Message",
      "exportName": "SlackMessage",
      "collectionExportName": "SlackMessageCollection",
      "validationRules": [
        {
          "field": "isRead",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "isFlagged",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "hasAttachments",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "size",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "retryCount",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "maxRetries",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "isEdited",
          "rule": "required",
          "fieldType": "boolean"
        }
      ],
      "schema": {
        "tableName": "messages",
        "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"account_id\" UUID,\n  \"persona_id\" UUID,\n  \"endpoint_id\" UUID,\n  \"correlation_id\" TEXT,\n  \"thread_id\" TEXT,\n  \"subject\" TEXT,\n  \"body\" TEXT,\n  \"from_address\" TEXT,\n  \"from_name\" TEXT,\n  \"to_addresses\" TEXT,\n  \"date\" TIMESTAMP,\n  \"is_read\" BOOLEAN DEFAULT FALSE,\n  \"is_flagged\" BOOLEAN DEFAULT FALSE,\n  \"has_attachments\" BOOLEAN DEFAULT FALSE,\n  \"size\" INTEGER DEFAULT 0,\n  \"metadata\" TEXT,\n  \"send_status\" TEXT DEFAULT 'draft',\n  \"sent_at\" TIMESTAMP,\n  \"send_error\" TEXT,\n  \"retry_count\" INTEGER DEFAULT 0,\n  \"max_retries\" INTEGER DEFAULT 3,\n  \"scheduled_send_at\" TIMESTAMP,\n  \"in_reply_to_message_id\" UUID,\n  \"message_id\" TEXT,\n  \"in_reply_to\" TEXT,\n  \"cc_addresses\" TEXT,\n  \"bcc_addresses\" TEXT,\n  \"reply_to_address\" TEXT,\n  \"reply_to_name\" TEXT,\n  \"text_body\" TEXT,\n  \"html_body\" TEXT,\n  \"folder_id\" TEXT,\n  \"folder_path\" TEXT,\n  \"labels\" TEXT,\n  \"flags\" TEXT,\n  \"is_answered\" BOOLEAN DEFAULT FALSE,\n  \"is_draft\" BOOLEAN DEFAULT FALSE,\n  \"raw_message\" TEXT,\n  \"headers\" TEXT,\n  \"channel_id\" TEXT,\n  \"channel_name\" TEXT,\n  \"slack_ts\" TEXT,\n  \"slack_thread_ts\" TEXT,\n  \"reactions\" TEXT,\n  \"is_edited\" BOOLEAN DEFAULT FALSE,\n  \"message_type\" TEXT,\n  \"blocks\" TEXT,\n  \"tweet_id\" TEXT,\n  \"retweet_count\" INTEGER DEFAULT 0,\n  \"like_count\" INTEGER DEFAULT 0,\n  \"reply_count\" INTEGER DEFAULT 0,\n  \"is_retweet\" BOOLEAN DEFAULT FALSE,\n  \"is_reply\" BOOLEAN DEFAULT FALSE,\n  \"media_urls\" TEXT,\n  \"hashtags\" TEXT,\n  \"mentions\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "account_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "accounts",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "persona_id": {
            "type": "UUID",
            "referenceKind": "crossPackageRef",
            "notNull": false
          },
          "endpoint_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "messaging_endpoints",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "correlation_id": {
            "type": "TEXT",
            "notNull": false
          },
          "thread_id": {
            "type": "TEXT",
            "notNull": false
          },
          "subject": {
            "type": "TEXT",
            "notNull": false
          },
          "body": {
            "type": "TEXT",
            "notNull": false
          },
          "from_address": {
            "type": "TEXT",
            "notNull": false
          },
          "from_name": {
            "type": "TEXT",
            "notNull": false
          },
          "to_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "date": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "is_read": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_flagged": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "has_attachments": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "size": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "metadata": {
            "type": "TEXT",
            "notNull": false
          },
          "send_status": {
            "type": "TEXT",
            "notNull": false,
            "default": "draft"
          },
          "sent_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "send_error": {
            "type": "TEXT",
            "notNull": false
          },
          "retry_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "max_retries": {
            "type": "INTEGER",
            "notNull": false,
            "default": 3
          },
          "scheduled_send_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "in_reply_to_message_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "messages",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "message_id": {
            "type": "TEXT",
            "notNull": false
          },
          "in_reply_to": {
            "type": "TEXT",
            "notNull": false
          },
          "cc_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "bcc_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "reply_to_address": {
            "type": "TEXT",
            "notNull": false
          },
          "reply_to_name": {
            "type": "TEXT",
            "notNull": false
          },
          "text_body": {
            "type": "TEXT",
            "notNull": false
          },
          "html_body": {
            "type": "TEXT",
            "notNull": false
          },
          "folder_id": {
            "type": "TEXT",
            "notNull": false
          },
          "folder_path": {
            "type": "TEXT",
            "notNull": false
          },
          "labels": {
            "type": "TEXT",
            "notNull": false
          },
          "flags": {
            "type": "TEXT",
            "notNull": false
          },
          "is_answered": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_draft": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "raw_message": {
            "type": "TEXT",
            "notNull": false
          },
          "headers": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_id": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_name": {
            "type": "TEXT",
            "notNull": false
          },
          "slack_ts": {
            "type": "TEXT",
            "notNull": false
          },
          "slack_thread_ts": {
            "type": "TEXT",
            "notNull": false
          },
          "reactions": {
            "type": "TEXT",
            "notNull": false
          },
          "is_edited": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "message_type": {
            "type": "TEXT",
            "notNull": false
          },
          "blocks": {
            "type": "TEXT",
            "notNull": false
          },
          "tweet_id": {
            "type": "TEXT",
            "notNull": false
          },
          "retweet_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "like_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "reply_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "is_retweet": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_reply": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "media_urls": {
            "type": "TEXT",
            "notNull": false
          },
          "hashtags": {
            "type": "TEXT",
            "notNull": false
          },
          "mentions": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "messages_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "messages_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "messages_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "messages_account_id_idx",
            "columns": [
              "account_id"
            ]
          },
          {
            "name": "messages_persona_id_idx",
            "columns": [
              "persona_id"
            ]
          },
          {
            "name": "messages_endpoint_id_idx",
            "columns": [
              "endpoint_id"
            ]
          },
          {
            "name": "messages_in_reply_to_message_id_idx",
            "columns": [
              "in_reply_to_message_id"
            ]
          }
        ],
        "version": "f91bb49a"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:TelegramAccount": {
      "name": "telegramaccount",
      "className": "TelegramAccount",
      "qualifiedName": "@happyvertical/smrt-messages:TelegramAccount",
      "collection": "accounts",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/TelegramAccount.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "created_at": {
          "type": "datetime",
          "required": false
        },
        "updated_at": {
          "type": "datetime",
          "required": false
        },
        "tenantId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sqlType": "UUID",
            "nullable": true,
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": false,
              "autoPopulate": true,
              "nullable": true
            }
          }
        },
        "name": {
          "type": "text",
          "required": false
        },
        "providerType": {
          "type": "text",
          "required": false
        },
        "channelType": {
          "type": "text",
          "required": false
        },
        "credentialSecretId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sensitive": true,
            "readonly": true
          },
          "sensitive": true,
          "readonly": true
        },
        "isActive": {
          "type": "boolean",
          "required": true,
          "default": true
        },
        "lastSyncAt": {
          "type": "datetime",
          "required": false
        },
        "settings": {
          "type": "text",
          "required": false,
          "_meta": {
            "sensitive": true,
            "readonly": true
          },
          "sensitive": true,
          "readonly": true
        },
        "configuration": {
          "type": "text",
          "required": false
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        }
      },
      "methods": {
        "getSettings": {
          "name": "getSettings",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setSettings": {
          "name": "setSettings",
          "async": false,
          "parameters": [
            {
              "name": "settings",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getConfiguration": {
          "name": "getConfiguration",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setConfiguration": {
          "name": "setConfiguration",
          "async": false,
          "parameters": [
            {
              "name": "configuration",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "activate": {
          "name": "activate",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "deactivate": {
          "name": "deactivate",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "setCredentials": {
          "name": "setCredentials",
          "async": true,
          "parameters": [
            {
              "name": "credentials",
              "type": "Record<string, unknown>",
              "optional": false
            },
            {
              "name": "options",
              "type": "object",
              "optional": true,
              "memberTypes": [
                "string"
              ]
            }
          ],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "createSender": {
          "name": "createSender",
          "async": true,
          "parameters": [],
          "returnType": "Promise<MessageSenderInterface>",
          "isStatic": false,
          "isPublic": true
        },
        "getCredentials": {
          "name": "getCredentials",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Record<string, unknown> | null>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableStrategy": "sti",
        "api": {
          "include": [
            "list",
            "get"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "include": [
            "list",
            "get"
          ]
        },
        "tableName": "accounts"
      },
      "extends": "Account",
      "exportName": "TelegramAccount",
      "collectionExportName": "TelegramAccountCollection",
      "validationRules": [
        {
          "field": "isActive",
          "rule": "required",
          "fieldType": "boolean"
        }
      ],
      "schema": {
        "tableName": "accounts",
        "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"name\" TEXT,\n  \"provider_type\" TEXT,\n  \"channel_type\" TEXT,\n  \"credential_secret_id\" TEXT,\n  \"is_active\" BOOLEAN DEFAULT TRUE,\n  \"last_sync_at\" TIMESTAMP,\n  \"settings\" TEXT,\n  \"configuration\" TEXT,\n  \"email\" TEXT,\n  \"sync_interval_minutes\" INTEGER DEFAULT 60,\n  \"workspace_id\" TEXT,\n  \"workspace_name\" TEXT,\n  \"bot_user_id\" TEXT,\n  \"handle\" TEXT,\n  \"twitter_user_id\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "name": {
            "type": "TEXT",
            "notNull": false
          },
          "provider_type": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_type": {
            "type": "TEXT",
            "notNull": false
          },
          "credential_secret_id": {
            "type": "TEXT",
            "notNull": false
          },
          "is_active": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": true
          },
          "last_sync_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "settings": {
            "type": "TEXT",
            "notNull": false
          },
          "configuration": {
            "type": "TEXT",
            "notNull": false
          },
          "email": {
            "type": "TEXT",
            "notNull": false
          },
          "sync_interval_minutes": {
            "type": "INTEGER",
            "notNull": false,
            "default": 60
          },
          "workspace_id": {
            "type": "TEXT",
            "notNull": false
          },
          "workspace_name": {
            "type": "TEXT",
            "notNull": false
          },
          "bot_user_id": {
            "type": "TEXT",
            "notNull": false
          },
          "handle": {
            "type": "TEXT",
            "notNull": false
          },
          "twitter_user_id": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "accounts_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "accounts_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "accounts_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          }
        ],
        "version": "3854ea98"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:Tweet": {
      "name": "tweet",
      "className": "Tweet",
      "qualifiedName": "@happyvertical/smrt-messages:Tweet",
      "collection": "messages",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/Tweet.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "created_at": {
          "type": "datetime",
          "required": false
        },
        "updated_at": {
          "type": "datetime",
          "required": false
        },
        "tenantId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sqlType": "UUID",
            "nullable": true,
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": false,
              "autoPopulate": true,
              "nullable": true
            }
          }
        },
        "accountId": {
          "type": "foreignKey",
          "required": false,
          "related": "Account"
        },
        "personaId": {
          "type": "crossPackageRef",
          "required": false,
          "related": "@happyvertical/smrt-personas:AgentPersona",
          "_meta": {
            "nullable": true
          }
        },
        "endpointId": {
          "type": "foreignKey",
          "required": false,
          "related": "MessagingEndpoint"
        },
        "correlationId": {
          "type": "text",
          "required": false
        },
        "threadId": {
          "type": "text",
          "required": false
        },
        "subject": {
          "type": "text",
          "required": false
        },
        "body": {
          "type": "text",
          "required": false
        },
        "fromAddress": {
          "type": "text",
          "required": false
        },
        "fromName": {
          "type": "text",
          "required": false
        },
        "toAddresses": {
          "type": "text",
          "required": false
        },
        "date": {
          "type": "datetime",
          "required": false
        },
        "isRead": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "isFlagged": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "hasAttachments": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "size": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "metadata": {
          "type": "text",
          "required": false
        },
        "sendStatus": {
          "type": "text",
          "required": false,
          "default": "draft"
        },
        "sentAt": {
          "type": "datetime",
          "required": false
        },
        "sendError": {
          "type": "text",
          "required": false
        },
        "retryCount": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "maxRetries": {
          "type": "integer",
          "required": true,
          "default": 3
        },
        "scheduledSendAt": {
          "type": "datetime",
          "required": false
        },
        "inReplyToMessageId": {
          "type": "foreignKey",
          "required": false,
          "related": "Message"
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        },
        "tweetId": {
          "type": "text",
          "required": false
        },
        "retweetCount": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "likeCount": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "replyCount": {
          "type": "integer",
          "required": true,
          "default": 0
        },
        "isRetweet": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "isReply": {
          "type": "boolean",
          "required": true,
          "default": false
        },
        "mediaUrls": {
          "type": "text",
          "required": false
        },
        "hashtags": {
          "type": "text",
          "required": false
        },
        "mentions": {
          "type": "text",
          "required": false
        }
      },
      "methods": {
        "getToAddresses": {
          "name": "getToAddresses",
          "async": false,
          "parameters": [],
          "returnType": "Array<object>",
          "isStatic": false,
          "isPublic": true
        },
        "setToAddresses": {
          "name": "setToAddresses",
          "async": false,
          "parameters": [
            {
              "name": "addresses",
              "type": "Array<object>",
              "optional": false,
              "memberTypes": [
                "string"
              ]
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getMetadata": {
          "name": "getMetadata",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setMetadata": {
          "name": "setMetadata",
          "async": false,
          "parameters": [
            {
              "name": "data",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "markRead": {
          "name": "markRead",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "markUnread": {
          "name": "markUnread",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "toggleFlagged": {
          "name": "toggleFlagged",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "isUnread": {
          "name": "isUnread",
          "async": false,
          "parameters": [],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        },
        "getPreview": {
          "name": "getPreview",
          "async": false,
          "parameters": [
            {
              "name": "maxLength",
              "type": "any",
              "optional": true
            }
          ],
          "returnType": "string",
          "isStatic": false,
          "isPublic": true
        },
        "getAccount": {
          "name": "getAccount",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getEndpoint": {
          "name": "getEndpoint",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "getThreadMessages": {
          "name": "getThreadMessages",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Message[]>",
          "isStatic": false,
          "isPublic": true
        },
        "getAttachments": {
          "name": "getAttachments",
          "async": true,
          "parameters": [],
          "returnType": "any",
          "isStatic": false,
          "isPublic": true
        },
        "send": {
          "name": "send",
          "async": true,
          "parameters": [
            {
              "name": "options",
              "type": "SendMessageOptions",
              "optional": true
            }
          ],
          "returnType": "Promise<MessageSendResult>",
          "isStatic": false,
          "isPublic": true
        },
        "retrySend": {
          "name": "retrySend",
          "async": true,
          "parameters": [
            {
              "name": "options",
              "type": "SendMessageOptions",
              "optional": true
            }
          ],
          "returnType": "Promise<MessageSendResult>",
          "isStatic": false,
          "isPublic": true
        },
        "createReply": {
          "name": "createReply",
          "async": false,
          "parameters": [
            {
              "name": "_options",
              "type": "object",
              "optional": true,
              "memberTypes": [
                "boolean"
              ]
            }
          ],
          "returnType": "Message",
          "isStatic": false,
          "isPublic": true
        },
        "createForward": {
          "name": "createForward",
          "async": false,
          "parameters": [],
          "returnType": "Message",
          "isStatic": false,
          "isPublic": true
        },
        "getMediaUrls": {
          "name": "getMediaUrls",
          "async": false,
          "parameters": [],
          "returnType": "string[]",
          "isStatic": false,
          "isPublic": true
        },
        "getHashtags": {
          "name": "getHashtags",
          "async": false,
          "parameters": [],
          "returnType": "string[]",
          "isStatic": false,
          "isPublic": true
        },
        "getMentions": {
          "name": "getMentions",
          "async": false,
          "parameters": [],
          "returnType": "string[]",
          "isStatic": false,
          "isPublic": true
        },
        "getEngagement": {
          "name": "getEngagement",
          "async": false,
          "parameters": [],
          "returnType": "number",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableStrategy": "sti",
        "api": {
          "include": [
            "list",
            "get",
            "create"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "skipApiCheck": true
        },
        "tableName": "messages"
      },
      "extends": "Message",
      "exportName": "Tweet",
      "collectionExportName": "TweetCollection",
      "validationRules": [
        {
          "field": "isRead",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "isFlagged",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "hasAttachments",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "size",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "retryCount",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "maxRetries",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "retweetCount",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "likeCount",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "replyCount",
          "rule": "required",
          "fieldType": "integer"
        },
        {
          "field": "isRetweet",
          "rule": "required",
          "fieldType": "boolean"
        },
        {
          "field": "isReply",
          "rule": "required",
          "fieldType": "boolean"
        }
      ],
      "schema": {
        "tableName": "messages",
        "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"account_id\" UUID,\n  \"persona_id\" UUID,\n  \"endpoint_id\" UUID,\n  \"correlation_id\" TEXT,\n  \"thread_id\" TEXT,\n  \"subject\" TEXT,\n  \"body\" TEXT,\n  \"from_address\" TEXT,\n  \"from_name\" TEXT,\n  \"to_addresses\" TEXT,\n  \"date\" TIMESTAMP,\n  \"is_read\" BOOLEAN DEFAULT FALSE,\n  \"is_flagged\" BOOLEAN DEFAULT FALSE,\n  \"has_attachments\" BOOLEAN DEFAULT FALSE,\n  \"size\" INTEGER DEFAULT 0,\n  \"metadata\" TEXT,\n  \"send_status\" TEXT DEFAULT 'draft',\n  \"sent_at\" TIMESTAMP,\n  \"send_error\" TEXT,\n  \"retry_count\" INTEGER DEFAULT 0,\n  \"max_retries\" INTEGER DEFAULT 3,\n  \"scheduled_send_at\" TIMESTAMP,\n  \"in_reply_to_message_id\" UUID,\n  \"message_id\" TEXT,\n  \"in_reply_to\" TEXT,\n  \"cc_addresses\" TEXT,\n  \"bcc_addresses\" TEXT,\n  \"reply_to_address\" TEXT,\n  \"reply_to_name\" TEXT,\n  \"text_body\" TEXT,\n  \"html_body\" TEXT,\n  \"folder_id\" TEXT,\n  \"folder_path\" TEXT,\n  \"labels\" TEXT,\n  \"flags\" TEXT,\n  \"is_answered\" BOOLEAN DEFAULT FALSE,\n  \"is_draft\" BOOLEAN DEFAULT FALSE,\n  \"raw_message\" TEXT,\n  \"headers\" TEXT,\n  \"channel_id\" TEXT,\n  \"channel_name\" TEXT,\n  \"slack_ts\" TEXT,\n  \"slack_thread_ts\" TEXT,\n  \"reactions\" TEXT,\n  \"is_edited\" BOOLEAN DEFAULT FALSE,\n  \"message_type\" TEXT,\n  \"blocks\" TEXT,\n  \"tweet_id\" TEXT,\n  \"retweet_count\" INTEGER DEFAULT 0,\n  \"like_count\" INTEGER DEFAULT 0,\n  \"reply_count\" INTEGER DEFAULT 0,\n  \"is_retweet\" BOOLEAN DEFAULT FALSE,\n  \"is_reply\" BOOLEAN DEFAULT FALSE,\n  \"media_urls\" TEXT,\n  \"hashtags\" TEXT,\n  \"mentions\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "account_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "accounts",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "persona_id": {
            "type": "UUID",
            "referenceKind": "crossPackageRef",
            "notNull": false
          },
          "endpoint_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "messaging_endpoints",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "correlation_id": {
            "type": "TEXT",
            "notNull": false
          },
          "thread_id": {
            "type": "TEXT",
            "notNull": false
          },
          "subject": {
            "type": "TEXT",
            "notNull": false
          },
          "body": {
            "type": "TEXT",
            "notNull": false
          },
          "from_address": {
            "type": "TEXT",
            "notNull": false
          },
          "from_name": {
            "type": "TEXT",
            "notNull": false
          },
          "to_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "date": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "is_read": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_flagged": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "has_attachments": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "size": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "metadata": {
            "type": "TEXT",
            "notNull": false
          },
          "send_status": {
            "type": "TEXT",
            "notNull": false,
            "default": "draft"
          },
          "sent_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "send_error": {
            "type": "TEXT",
            "notNull": false
          },
          "retry_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "max_retries": {
            "type": "INTEGER",
            "notNull": false,
            "default": 3
          },
          "scheduled_send_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "in_reply_to_message_id": {
            "type": "UUID",
            "referenceKind": "foreignKey",
            "notNull": false,
            "foreignKey": {
              "table": "messages",
              "column": "id",
              "onDelete": "NO ACTION",
              "onUpdate": "CASCADE"
            }
          },
          "message_id": {
            "type": "TEXT",
            "notNull": false
          },
          "in_reply_to": {
            "type": "TEXT",
            "notNull": false
          },
          "cc_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "bcc_addresses": {
            "type": "TEXT",
            "notNull": false
          },
          "reply_to_address": {
            "type": "TEXT",
            "notNull": false
          },
          "reply_to_name": {
            "type": "TEXT",
            "notNull": false
          },
          "text_body": {
            "type": "TEXT",
            "notNull": false
          },
          "html_body": {
            "type": "TEXT",
            "notNull": false
          },
          "folder_id": {
            "type": "TEXT",
            "notNull": false
          },
          "folder_path": {
            "type": "TEXT",
            "notNull": false
          },
          "labels": {
            "type": "TEXT",
            "notNull": false
          },
          "flags": {
            "type": "TEXT",
            "notNull": false
          },
          "is_answered": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_draft": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "raw_message": {
            "type": "TEXT",
            "notNull": false
          },
          "headers": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_id": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_name": {
            "type": "TEXT",
            "notNull": false
          },
          "slack_ts": {
            "type": "TEXT",
            "notNull": false
          },
          "slack_thread_ts": {
            "type": "TEXT",
            "notNull": false
          },
          "reactions": {
            "type": "TEXT",
            "notNull": false
          },
          "is_edited": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "message_type": {
            "type": "TEXT",
            "notNull": false
          },
          "blocks": {
            "type": "TEXT",
            "notNull": false
          },
          "tweet_id": {
            "type": "TEXT",
            "notNull": false
          },
          "retweet_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "like_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "reply_count": {
            "type": "INTEGER",
            "notNull": false,
            "default": 0
          },
          "is_retweet": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "is_reply": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": false
          },
          "media_urls": {
            "type": "TEXT",
            "notNull": false
          },
          "hashtags": {
            "type": "TEXT",
            "notNull": false
          },
          "mentions": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "messages_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "messages_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "messages_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          },
          {
            "name": "messages_account_id_idx",
            "columns": [
              "account_id"
            ]
          },
          {
            "name": "messages_persona_id_idx",
            "columns": [
              "persona_id"
            ]
          },
          {
            "name": "messages_endpoint_id_idx",
            "columns": [
              "endpoint_id"
            ]
          },
          {
            "name": "messages_in_reply_to_message_id_idx",
            "columns": [
              "in_reply_to_message_id"
            ]
          }
        ],
        "version": "ffd4cea3"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:TwitterAccount": {
      "name": "twitteraccount",
      "className": "TwitterAccount",
      "qualifiedName": "@happyvertical/smrt-messages:TwitterAccount",
      "collection": "accounts",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/TwitterAccount.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "created_at": {
          "type": "datetime",
          "required": false
        },
        "updated_at": {
          "type": "datetime",
          "required": false
        },
        "tenantId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sqlType": "UUID",
            "nullable": true,
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": false,
              "autoPopulate": true,
              "nullable": true
            }
          }
        },
        "name": {
          "type": "text",
          "required": false
        },
        "providerType": {
          "type": "text",
          "required": false
        },
        "channelType": {
          "type": "text",
          "required": false
        },
        "credentialSecretId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sensitive": true,
            "readonly": true
          },
          "sensitive": true,
          "readonly": true
        },
        "isActive": {
          "type": "boolean",
          "required": true,
          "default": true
        },
        "lastSyncAt": {
          "type": "datetime",
          "required": false
        },
        "settings": {
          "type": "text",
          "required": false,
          "_meta": {
            "sensitive": true,
            "readonly": true
          },
          "sensitive": true,
          "readonly": true
        },
        "configuration": {
          "type": "text",
          "required": false
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        },
        "handle": {
          "type": "text",
          "required": false
        },
        "twitterUserId": {
          "type": "text",
          "required": false
        }
      },
      "methods": {
        "getSettings": {
          "name": "getSettings",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setSettings": {
          "name": "setSettings",
          "async": false,
          "parameters": [
            {
              "name": "settings",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getConfiguration": {
          "name": "getConfiguration",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setConfiguration": {
          "name": "setConfiguration",
          "async": false,
          "parameters": [
            {
              "name": "configuration",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "activate": {
          "name": "activate",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "deactivate": {
          "name": "deactivate",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "setCredentials": {
          "name": "setCredentials",
          "async": true,
          "parameters": [
            {
              "name": "credentials",
              "type": "Record<string, unknown>",
              "optional": false
            },
            {
              "name": "options",
              "type": "object",
              "optional": true,
              "memberTypes": [
                "string"
              ]
            }
          ],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "createSender": {
          "name": "createSender",
          "async": true,
          "parameters": [],
          "returnType": "Promise<MessageSenderInterface>",
          "isStatic": false,
          "isPublic": true
        },
        "getCredentials": {
          "name": "getCredentials",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Record<string, unknown> | null>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableStrategy": "sti",
        "api": {
          "include": [
            "list",
            "get"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "include": [
            "list",
            "get"
          ]
        },
        "tableName": "accounts"
      },
      "extends": "Account",
      "exportName": "TwitterAccount",
      "collectionExportName": "TwitterAccountCollection",
      "validationRules": [
        {
          "field": "isActive",
          "rule": "required",
          "fieldType": "boolean"
        }
      ],
      "schema": {
        "tableName": "accounts",
        "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"name\" TEXT,\n  \"provider_type\" TEXT,\n  \"channel_type\" TEXT,\n  \"credential_secret_id\" TEXT,\n  \"is_active\" BOOLEAN DEFAULT TRUE,\n  \"last_sync_at\" TIMESTAMP,\n  \"settings\" TEXT,\n  \"configuration\" TEXT,\n  \"email\" TEXT,\n  \"sync_interval_minutes\" INTEGER DEFAULT 60,\n  \"workspace_id\" TEXT,\n  \"workspace_name\" TEXT,\n  \"bot_user_id\" TEXT,\n  \"handle\" TEXT,\n  \"twitter_user_id\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "name": {
            "type": "TEXT",
            "notNull": false
          },
          "provider_type": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_type": {
            "type": "TEXT",
            "notNull": false
          },
          "credential_secret_id": {
            "type": "TEXT",
            "notNull": false
          },
          "is_active": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": true
          },
          "last_sync_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "settings": {
            "type": "TEXT",
            "notNull": false
          },
          "configuration": {
            "type": "TEXT",
            "notNull": false
          },
          "email": {
            "type": "TEXT",
            "notNull": false
          },
          "sync_interval_minutes": {
            "type": "INTEGER",
            "notNull": false,
            "default": 60
          },
          "workspace_id": {
            "type": "TEXT",
            "notNull": false
          },
          "workspace_name": {
            "type": "TEXT",
            "notNull": false
          },
          "bot_user_id": {
            "type": "TEXT",
            "notNull": false
          },
          "handle": {
            "type": "TEXT",
            "notNull": false
          },
          "twitter_user_id": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "accounts_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "accounts_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "accounts_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          }
        ],
        "version": "3854ea98"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:Whitelist": {
      "name": "whitelist",
      "className": "Whitelist",
      "qualifiedName": "@happyvertical/smrt-messages:Whitelist",
      "collection": "whitelists",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/Whitelist.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "pattern": {
          "type": "text",
          "required": false,
          "default": ""
        },
        "type": {
          "type": "text",
          "required": false,
          "default": "email"
        },
        "category": {
          "type": "text",
          "required": false
        },
        "description": {
          "type": "text",
          "required": false,
          "default": ""
        },
        "tenantId": {
          "type": "text",
          "required": true,
          "_meta": {
            "generated": true,
            "source": "tenantScoped_decorator",
            "sqlType": "UUID",
            "__tenancy": {
              "isTenantIdField": true,
              "mode": "required",
              "field": "tenantId",
              "autoFilter": true,
              "autoPopulate": true,
              "allowSuperAdminBypass": false
            }
          }
        }
      },
      "methods": {
        "matches": {
          "name": "matches",
          "async": false,
          "parameters": [
            {
              "name": "email",
              "type": "string",
              "optional": false
            }
          ],
          "returnType": "boolean",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "api": {
          "include": [
            "list",
            "get",
            "create",
            "update",
            "delete"
          ]
        },
        "cli": {
          "skipApiCheck": true
        },
        "tenantScoped": true,
        "conflictColumns": [
          "tenant_id",
          "slug",
          "context"
        ]
      },
      "extends": "SmrtObject",
      "exportName": "Whitelist",
      "collectionExportName": "WhitelistCollection",
      "validationRules": [],
      "schema": {
        "tableName": "whitelists",
        "ddl": "CREATE TABLE IF NOT EXISTS \"whitelists\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"pattern\" TEXT DEFAULT '',\n  \"type\" TEXT DEFAULT 'email',\n  \"category\" TEXT,\n  \"description\" TEXT DEFAULT '',\n  \"tenant_id\" UUID NOT NULL\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "pattern": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": ""
          },
          "type": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": "email"
          },
          "category": {
            "type": "TEXT",
            "notNull": false,
            "unique": false
          },
          "description": {
            "type": "TEXT",
            "notNull": false,
            "unique": false,
            "default": ""
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": true,
            "unique": false
          }
        },
        "indexes": [
          {
            "name": "whitelists_slug_context_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context"
            ],
            "unique": true
          },
          {
            "name": "whitelists_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          }
        ],
        "version": "40a655a1"
      },
      "importPath": "@happyvertical/smrt-messages"
    },
    "@happyvertical/smrt-messages:ZulipAccount": {
      "name": "zulipaccount",
      "className": "ZulipAccount",
      "qualifiedName": "@happyvertical/smrt-messages:ZulipAccount",
      "collection": "accounts",
      "filePath": "/home/runner/work/smrt/smrt/packages/messages/src/models/ZulipAccount.ts",
      "packageName": "@happyvertical/smrt-messages",
      "fields": {
        "created_at": {
          "type": "datetime",
          "required": false
        },
        "updated_at": {
          "type": "datetime",
          "required": false
        },
        "tenantId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sqlType": "UUID",
            "nullable": true,
            "__tenancy": {
              "isTenantIdField": true,
              "autoFilter": true,
              "required": false,
              "autoPopulate": true,
              "nullable": true
            }
          }
        },
        "name": {
          "type": "text",
          "required": false
        },
        "providerType": {
          "type": "text",
          "required": false
        },
        "channelType": {
          "type": "text",
          "required": false
        },
        "credentialSecretId": {
          "type": "text",
          "required": false,
          "_meta": {
            "sensitive": true,
            "readonly": true
          },
          "sensitive": true,
          "readonly": true
        },
        "isActive": {
          "type": "boolean",
          "required": true,
          "default": true
        },
        "lastSyncAt": {
          "type": "datetime",
          "required": false
        },
        "settings": {
          "type": "text",
          "required": false,
          "_meta": {
            "sensitive": true,
            "readonly": true
          },
          "sensitive": true,
          "readonly": true
        },
        "configuration": {
          "type": "text",
          "required": false
        },
        "createdAt": {
          "type": "text",
          "required": false
        },
        "updatedAt": {
          "type": "text",
          "required": false
        }
      },
      "methods": {
        "getSettings": {
          "name": "getSettings",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setSettings": {
          "name": "setSettings",
          "async": false,
          "parameters": [
            {
              "name": "settings",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "getConfiguration": {
          "name": "getConfiguration",
          "async": false,
          "parameters": [],
          "returnType": "Record<string, unknown>",
          "isStatic": false,
          "isPublic": true
        },
        "setConfiguration": {
          "name": "setConfiguration",
          "async": false,
          "parameters": [
            {
              "name": "configuration",
              "type": "Record<string, unknown>",
              "optional": false
            }
          ],
          "returnType": "void",
          "isStatic": false,
          "isPublic": true
        },
        "activate": {
          "name": "activate",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "deactivate": {
          "name": "deactivate",
          "async": true,
          "parameters": [],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "setCredentials": {
          "name": "setCredentials",
          "async": true,
          "parameters": [
            {
              "name": "credentials",
              "type": "Record<string, unknown>",
              "optional": false
            },
            {
              "name": "options",
              "type": "object",
              "optional": true,
              "memberTypes": [
                "string"
              ]
            }
          ],
          "returnType": "Promise<void>",
          "isStatic": false,
          "isPublic": true
        },
        "createSender": {
          "name": "createSender",
          "async": true,
          "parameters": [],
          "returnType": "Promise<MessageSenderInterface>",
          "isStatic": false,
          "isPublic": true
        },
        "getCredentials": {
          "name": "getCredentials",
          "async": true,
          "parameters": [],
          "returnType": "Promise<Record<string, unknown> | null>",
          "isStatic": false,
          "isPublic": true
        }
      },
      "decoratorConfig": {
        "tableStrategy": "sti",
        "api": {
          "include": [
            "list",
            "get"
          ]
        },
        "mcp": {
          "include": [
            "list",
            "get"
          ]
        },
        "cli": {
          "include": [
            "list",
            "get"
          ]
        },
        "tableName": "accounts"
      },
      "extends": "Account",
      "exportName": "ZulipAccount",
      "collectionExportName": "ZulipAccountCollection",
      "validationRules": [
        {
          "field": "isActive",
          "rule": "required",
          "fieldType": "boolean"
        }
      ],
      "schema": {
        "tableName": "accounts",
        "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n  \"id\" UUID PRIMARY KEY NOT NULL,\n  \"slug\" TEXT NOT NULL,\n  \"context\" TEXT NOT NULL DEFAULT '',\n  \"_meta_type\" TEXT NOT NULL,\n  \"_meta_data\" JSON,\n  \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n  \"tenant_id\" UUID,\n  \"name\" TEXT,\n  \"provider_type\" TEXT,\n  \"channel_type\" TEXT,\n  \"credential_secret_id\" TEXT,\n  \"is_active\" BOOLEAN DEFAULT TRUE,\n  \"last_sync_at\" TIMESTAMP,\n  \"settings\" TEXT,\n  \"configuration\" TEXT,\n  \"email\" TEXT,\n  \"sync_interval_minutes\" INTEGER DEFAULT 60,\n  \"workspace_id\" TEXT,\n  \"workspace_name\" TEXT,\n  \"bot_user_id\" TEXT,\n  \"handle\" TEXT,\n  \"twitter_user_id\" TEXT\n);",
        "columns": {
          "id": {
            "type": "UUID",
            "primaryKey": true,
            "referenceKind": "id",
            "notNull": true
          },
          "slug": {
            "type": "TEXT",
            "notNull": true
          },
          "context": {
            "type": "TEXT",
            "notNull": true,
            "default": ""
          },
          "_meta_type": {
            "type": "TEXT",
            "notNull": true
          },
          "_meta_data": {
            "type": "JSON",
            "notNull": false
          },
          "created_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "updated_at": {
            "type": "TIMESTAMP",
            "notNull": true,
            "default": "current_timestamp"
          },
          "tenant_id": {
            "type": "UUID",
            "referenceKind": "tenantId",
            "notNull": false
          },
          "name": {
            "type": "TEXT",
            "notNull": false
          },
          "provider_type": {
            "type": "TEXT",
            "notNull": false
          },
          "channel_type": {
            "type": "TEXT",
            "notNull": false
          },
          "credential_secret_id": {
            "type": "TEXT",
            "notNull": false
          },
          "is_active": {
            "type": "BOOLEAN",
            "notNull": false,
            "default": true
          },
          "last_sync_at": {
            "type": "TIMESTAMP",
            "notNull": false
          },
          "settings": {
            "type": "TEXT",
            "notNull": false
          },
          "configuration": {
            "type": "TEXT",
            "notNull": false
          },
          "email": {
            "type": "TEXT",
            "notNull": false
          },
          "sync_interval_minutes": {
            "type": "INTEGER",
            "notNull": false,
            "default": 60
          },
          "workspace_id": {
            "type": "TEXT",
            "notNull": false
          },
          "workspace_name": {
            "type": "TEXT",
            "notNull": false
          },
          "bot_user_id": {
            "type": "TEXT",
            "notNull": false
          },
          "handle": {
            "type": "TEXT",
            "notNull": false
          },
          "twitter_user_id": {
            "type": "TEXT",
            "notNull": false
          }
        },
        "indexes": [
          {
            "name": "accounts_slug_context_meta_type_idx",
            "columns": [
              "tenant_id",
              "slug",
              "context",
              "_meta_type"
            ],
            "unique": true,
            "nullsNotDistinct": true
          },
          {
            "name": "accounts_meta_type_idx",
            "columns": [
              "_meta_type"
            ]
          },
          {
            "name": "accounts_tenant_id_created_at_idx",
            "columns": [
              "tenant_id",
              "created_at"
            ]
          }
        ],
        "version": "3854ea98"
      },
      "importPath": "@happyvertical/smrt-messages"
    }
  },
  "moduleType": "smrt",
  "smrtDependencies": [
    "@happyvertical/smrt-core",
    "@happyvertical/smrt-secrets",
    "@happyvertical/smrt-tenancy",
    "@happyvertical/smrt-users"
  ]
}