diff --git a/backend/drizzle/20260216065612_immutability_setup/snapshot.json b/backend/drizzle/20260216065612_immutability_setup/snapshot.json deleted file mode 100644 index 57956c761..000000000 --- a/backend/drizzle/20260216065612_immutability_setup/snapshot.json +++ /dev/null @@ -1,4990 +0,0 @@ -{ - "version": "8", - "dialect": "postgres", - "id": "020657e5-1020-4f24-bbc7-c1e715521e04", - "prevIds": [ - "00000000-0000-0000-0000-000000000000" - ], - "ddl": [ - { - "values": [ - "active", - "suspended", - "archived" - ], - "name": "tenant_status", - "entityType": "enums", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "activities", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": true, - "name": "attachments", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "context_counters", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "emails", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": true, - "name": "inactive_memberships", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "last_seen", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": true, - "name": "memberships", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "oauth_accounts", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": true, - "name": "organizations", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": true, - "name": "pages", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "passkeys", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "passwords", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "rate_limits", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "requests", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "sessions", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "system_roles", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "tenants", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "tokens", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "totps", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "unsubscribe_tokens", - "entityType": "tables", - "schema": "public" - }, - { - "isRlsEnabled": false, - "name": "users", - "entityType": "tables", - "schema": "public" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "varchar(24)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "tenant_id", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "entity_type", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "resource_type", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "action", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "table_name", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "type", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "entity_id", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "organization_id", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "jsonb", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "changed_keys", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "jsonb", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "stx", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "integer", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "seq", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "jsonb", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "error", - "entityType": "columns", - "schema": "public", - "table": "activities" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'attachment'", - "generated": null, - "identity": null, - "name": "entity_type", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(24)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "tenant_id", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'New attachment'", - "generated": null, - "identity": null, - "name": "name", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_at", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "jsonb", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "stx", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "text", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "description", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(100000)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "keywords", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "created_by", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_by", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "boolean", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "false", - "generated": null, - "identity": null, - "name": "public", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "bucket_name", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "group_id", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "filename", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "content_type", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "converted_content_type", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "size", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(2048)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "original_key", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(2048)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "converted_key", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(2048)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "thumbnail_key", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "organization_id", - "entityType": "columns", - "schema": "public", - "table": "attachments" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "context_key", - "entityType": "columns", - "schema": "public", - "table": "context_counters" - }, - { - "type": "bigint", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "0", - "generated": null, - "identity": null, - "name": "seq", - "entityType": "columns", - "schema": "public", - "table": "context_counters" - }, - { - "type": "bigint", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "0", - "generated": null, - "identity": null, - "name": "m_seq", - "entityType": "columns", - "schema": "public", - "table": "context_counters" - }, - { - "type": "jsonb", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'{}'", - "generated": null, - "identity": null, - "name": "counts", - "entityType": "columns", - "schema": "public", - "table": "context_counters" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "updated_at", - "entityType": "columns", - "schema": "public", - "table": "context_counters" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "emails" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "emails" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "email", - "entityType": "columns", - "schema": "public", - "table": "emails" - }, - { - "type": "boolean", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "false", - "generated": null, - "identity": null, - "name": "verified", - "entityType": "columns", - "schema": "public", - "table": "emails" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "token_id", - "entityType": "columns", - "schema": "public", - "table": "emails" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "emails" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "verified_at", - "entityType": "columns", - "schema": "public", - "table": "emails" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "inactive_memberships" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "inactive_memberships" - }, - { - "type": "varchar(24)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "tenant_id", - "entityType": "columns", - "schema": "public", - "table": "inactive_memberships" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "context_type", - "entityType": "columns", - "schema": "public", - "table": "inactive_memberships" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "email", - "entityType": "columns", - "schema": "public", - "table": "inactive_memberships" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "inactive_memberships" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "token_id", - "entityType": "columns", - "schema": "public", - "table": "inactive_memberships" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'member'", - "generated": null, - "identity": null, - "name": "role", - "entityType": "columns", - "schema": "public", - "table": "inactive_memberships" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "rejected_at", - "entityType": "columns", - "schema": "public", - "table": "inactive_memberships" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "created_by", - "entityType": "columns", - "schema": "public", - "table": "inactive_memberships" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "organization_id", - "entityType": "columns", - "schema": "public", - "table": "inactive_memberships" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "last_seen" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "last_seen_at", - "entityType": "columns", - "schema": "public", - "table": "last_seen" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "varchar(24)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "tenant_id", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "context_type", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'member'", - "generated": null, - "identity": null, - "name": "role", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "created_by", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_at", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_by", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "boolean", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "false", - "generated": null, - "identity": null, - "name": "archived", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "boolean", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "false", - "generated": null, - "identity": null, - "name": "muted", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "double precision", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "display_order", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "organization_id", - "entityType": "columns", - "schema": "public", - "table": "memberships" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "oauth_accounts" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "oauth_accounts" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "provider", - "entityType": "columns", - "schema": "public", - "table": "oauth_accounts" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "provider_user_id", - "entityType": "columns", - "schema": "public", - "table": "oauth_accounts" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "email", - "entityType": "columns", - "schema": "public", - "table": "oauth_accounts" - }, - { - "type": "boolean", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "false", - "generated": null, - "identity": null, - "name": "verified", - "entityType": "columns", - "schema": "public", - "table": "oauth_accounts" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "verified_at", - "entityType": "columns", - "schema": "public", - "table": "oauth_accounts" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "oauth_accounts" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'organization'", - "generated": null, - "identity": null, - "name": "entity_type", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(24)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "tenant_id", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "name", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_at", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "slug", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(2048)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "thumbnail_url", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(2048)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "banner_url", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "created_by", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_by", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "short_name", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "country", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "timezone", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'en'", - "generated": null, - "identity": null, - "name": "default_language", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "json", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'[\"en\"]'", - "generated": null, - "identity": null, - "name": "languages", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "json", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'{\"user\":1000,\"attachment\":100,\"page\":0}'", - "generated": null, - "identity": null, - "name": "restrictions", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "notification_email", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "json", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'[]'", - "generated": null, - "identity": null, - "name": "email_domains", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "color", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(2048)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "logo_url", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(2048)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "website_url", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "varchar(100000)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "welcome_text", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "json", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'[]'", - "generated": null, - "identity": null, - "name": "auth_strategies", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "boolean", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "false", - "generated": null, - "identity": null, - "name": "chat_support", - "entityType": "columns", - "schema": "public", - "table": "organizations" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'page'", - "generated": null, - "identity": null, - "name": "entity_type", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "varchar(24)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "tenant_id", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'New page'", - "generated": null, - "identity": null, - "name": "name", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_at", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "jsonb", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "stx", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "text", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "description", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "varchar(100000)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "keywords", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "created_by", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_by", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'unpublished'", - "generated": null, - "identity": null, - "name": "status", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "boolean", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "false", - "generated": null, - "identity": null, - "name": "public_access", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "parent_id", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "double precision", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "display_order", - "entityType": "columns", - "schema": "public", - "table": "pages" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "passkeys" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "passkeys" - }, - { - "type": "varchar(2048)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "credential_id", - "entityType": "columns", - "schema": "public", - "table": "passkeys" - }, - { - "type": "varchar(2048)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "public_key", - "entityType": "columns", - "schema": "public", - "table": "passkeys" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "device_name", - "entityType": "columns", - "schema": "public", - "table": "passkeys" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'desktop'", - "generated": null, - "identity": null, - "name": "device_type", - "entityType": "columns", - "schema": "public", - "table": "passkeys" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "device_os", - "entityType": "columns", - "schema": "public", - "table": "passkeys" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "browser", - "entityType": "columns", - "schema": "public", - "table": "passkeys" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "name_on_device", - "entityType": "columns", - "schema": "public", - "table": "passkeys" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "passkeys" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "passwords" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "hashed_password", - "entityType": "columns", - "schema": "public", - "table": "passwords" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "passwords" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "passwords" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_at", - "entityType": "columns", - "schema": "public", - "table": "passwords" - }, - { - "type": "text", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "key", - "entityType": "columns", - "schema": "public", - "table": "rate_limits" - }, - { - "type": "integer", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "points", - "entityType": "columns", - "schema": "public", - "table": "rate_limits" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "expire", - "entityType": "columns", - "schema": "public", - "table": "rate_limits" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "requests" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "requests" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "message", - "entityType": "columns", - "schema": "public", - "table": "requests" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "email", - "entityType": "columns", - "schema": "public", - "table": "requests" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "type", - "entityType": "columns", - "schema": "public", - "table": "requests" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "token_id", - "entityType": "columns", - "schema": "public", - "table": "requests" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "sessions" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "secret", - "entityType": "columns", - "schema": "public", - "table": "sessions" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'regular'", - "generated": null, - "identity": null, - "name": "type", - "entityType": "columns", - "schema": "public", - "table": "sessions" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "sessions" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "device_name", - "entityType": "columns", - "schema": "public", - "table": "sessions" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'desktop'", - "generated": null, - "identity": null, - "name": "device_type", - "entityType": "columns", - "schema": "public", - "table": "sessions" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "device_os", - "entityType": "columns", - "schema": "public", - "table": "sessions" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "browser", - "entityType": "columns", - "schema": "public", - "table": "sessions" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "auth_strategy", - "entityType": "columns", - "schema": "public", - "table": "sessions" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "sessions" - }, - { - "type": "timestamp with time zone", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "expires_at", - "entityType": "columns", - "schema": "public", - "table": "sessions" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "system_roles" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "system_roles" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "role", - "entityType": "columns", - "schema": "public", - "table": "system_roles" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "system_roles" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_at", - "entityType": "columns", - "schema": "public", - "table": "system_roles" - }, - { - "type": "varchar(24)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "tenants" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "name", - "entityType": "columns", - "schema": "public", - "table": "tenants" - }, - { - "type": "tenant_status", - "typeSchema": "public", - "notNull": true, - "dimensions": 0, - "default": "'active'", - "generated": null, - "identity": null, - "name": "status", - "entityType": "columns", - "schema": "public", - "table": "tenants" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "tenants" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_at", - "entityType": "columns", - "schema": "public", - "table": "tenants" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "tokens" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "secret", - "entityType": "columns", - "schema": "public", - "table": "tokens" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "single_use_token", - "entityType": "columns", - "schema": "public", - "table": "tokens" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "type", - "entityType": "columns", - "schema": "public", - "table": "tokens" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "email", - "entityType": "columns", - "schema": "public", - "table": "tokens" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "tokens" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "oauth_account_id", - "entityType": "columns", - "schema": "public", - "table": "tokens" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "inactive_membership_id", - "entityType": "columns", - "schema": "public", - "table": "tokens" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "created_by", - "entityType": "columns", - "schema": "public", - "table": "tokens" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "tokens" - }, - { - "type": "timestamp with time zone", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "expires_at", - "entityType": "columns", - "schema": "public", - "table": "tokens" - }, - { - "type": "timestamp with time zone", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "invoked_at", - "entityType": "columns", - "schema": "public", - "table": "tokens" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "totps" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "totps" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "secret", - "entityType": "columns", - "schema": "public", - "table": "totps" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "totps" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "unsubscribe_tokens" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "user_id", - "entityType": "columns", - "schema": "public", - "table": "unsubscribe_tokens" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "secret", - "entityType": "columns", - "schema": "public", - "table": "unsubscribe_tokens" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "unsubscribe_tokens" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "now()", - "generated": null, - "identity": null, - "name": "created_at", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "id", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'user'", - "generated": null, - "identity": null, - "name": "entity_type", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "name", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "text", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "description", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "slug", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "varchar(2048)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "thumbnail_url", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "varchar(2048)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "banner_url", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "email", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "boolean", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "false", - "generated": null, - "identity": null, - "name": "mfa_required", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "first_name", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "varchar(255)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "last_name", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "varchar", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'en'", - "generated": null, - "identity": null, - "name": "language", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "boolean", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "false", - "generated": null, - "identity": null, - "name": "newsletter", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "jsonb", - "typeSchema": null, - "notNull": true, - "dimensions": 0, - "default": "'{}'", - "generated": null, - "identity": null, - "name": "user_flags", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_at", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "last_started_at", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "timestamp", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "last_sign_in_at", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "type": "varchar(50)", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "modified_by", - "entityType": "columns", - "schema": "public", - "table": "users" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "created_at", - "isExpression": false, - "asc": false, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "activities_created_at_index", - "entityType": "indexes", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "type", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "activities_type_index", - "entityType": "indexes", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "user_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "activities_user_id_index", - "entityType": "indexes", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "entity_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "activities_entity_id_index", - "entityType": "indexes", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "table_name", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "activities_table_name_index", - "entityType": "indexes", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "tenant_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "activities_tenant_id_index", - "entityType": "indexes", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "(stx->>'mutationId')", - "isExpression": true, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "activities_stx_id_index", - "entityType": "indexes", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "(error->>'lsn')", - "isExpression": true, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": "error IS NOT NULL", - "with": "", - "method": "btree", - "concurrently": false, - "name": "activities_error_lsn_index", - "entityType": "indexes", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "organization_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "activities_organization_id_index", - "entityType": "indexes", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "organization_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - }, - { - "value": "\"seq\" desc", - "isExpression": true, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "activities_organization_id_seq_index", - "entityType": "indexes", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "organization_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "attachments_organization_id_index", - "entityType": "indexes", - "schema": "public", - "table": "attachments" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "tenant_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "attachments_tenant_id_index", - "entityType": "indexes", - "schema": "public", - "table": "attachments" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "user_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "inactive_memberships_user_id_idx", - "entityType": "indexes", - "schema": "public", - "table": "inactive_memberships" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "organization_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "inactive_memberships_organization_id_idx", - "entityType": "indexes", - "schema": "public", - "table": "inactive_memberships" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "tenant_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "inactive_memberships_tenant_id_idx", - "entityType": "indexes", - "schema": "public", - "table": "inactive_memberships" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "email", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "inactive_memberships_email_idx", - "entityType": "indexes", - "schema": "public", - "table": "inactive_memberships" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "organization_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - }, - { - "value": "rejected_at", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "inactive_memberships_org_pending_idx", - "entityType": "indexes", - "schema": "public", - "table": "inactive_memberships" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "user_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "memberships_user_id_idx", - "entityType": "indexes", - "schema": "public", - "table": "memberships" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "organization_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "memberships_organization_id_idx", - "entityType": "indexes", - "schema": "public", - "table": "memberships" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "tenant_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "memberships_tenant_id_idx", - "entityType": "indexes", - "schema": "public", - "table": "memberships" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "context_type", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - }, - { - "value": "organization_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - }, - { - "value": "role", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "memberships_context_org_role_idx", - "entityType": "indexes", - "schema": "public", - "table": "memberships" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "name", - "isExpression": false, - "asc": false, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "organizations_name_index", - "entityType": "indexes", - "schema": "public", - "table": "organizations" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "created_at", - "isExpression": false, - "asc": false, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "organizations_created_at_index", - "entityType": "indexes", - "schema": "public", - "table": "organizations" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "tenant_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "organizations_tenant_id_index", - "entityType": "indexes", - "schema": "public", - "table": "organizations" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "tenant_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "pages_tenant_id_idx", - "entityType": "indexes", - "schema": "public", - "table": "pages" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "email", - "isExpression": false, - "asc": false, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "requests_emails", - "entityType": "indexes", - "schema": "public", - "table": "requests" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "created_at", - "isExpression": false, - "asc": false, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "requests_created_at", - "entityType": "indexes", - "schema": "public", - "table": "requests" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "secret", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "sessions_secret_idx", - "entityType": "indexes", - "schema": "public", - "table": "sessions" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "user_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "sessions_user_id_idx", - "entityType": "indexes", - "schema": "public", - "table": "sessions" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "status", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "tenants_status_index", - "entityType": "indexes", - "schema": "public", - "table": "tenants" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "created_at", - "isExpression": false, - "asc": false, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "tenants_created_at_index", - "entityType": "indexes", - "schema": "public", - "table": "tenants" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "secret", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - }, - { - "value": "type", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "tokens_secret_type_idx", - "entityType": "indexes", - "schema": "public", - "table": "tokens" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "user_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "tokens_user_id_idx", - "entityType": "indexes", - "schema": "public", - "table": "tokens" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "secret", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "unsubscribe_tokens_secret_idx", - "entityType": "indexes", - "schema": "public", - "table": "unsubscribe_tokens" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "user_id", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "unsubscribe_tokens_user_id_idx", - "entityType": "indexes", - "schema": "public", - "table": "unsubscribe_tokens" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "name", - "isExpression": false, - "asc": false, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "users_name_index", - "entityType": "indexes", - "schema": "public", - "table": "users" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "email", - "isExpression": false, - "asc": false, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "users_email_index", - "entityType": "indexes", - "schema": "public", - "table": "users" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "created_at", - "isExpression": false, - "asc": false, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "users_created_at_index", - "entityType": "indexes", - "schema": "public", - "table": "users" - }, - { - "nameExplicit": false, - "columns": [ - "tenant_id" - ], - "schemaTo": "public", - "tableTo": "tenants", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "NO ACTION", - "name": "activities_tenant_id_tenants_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "SET NULL", - "name": "activities_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": false, - "columns": [ - "tenant_id", - "organization_id" - ], - "schemaTo": "public", - "tableTo": "organizations", - "columnsTo": [ - "tenant_id", - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "activities_mcflvig2gMS8_fkey", - "entityType": "fks", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": false, - "columns": [ - "organization_id" - ], - "schemaTo": "public", - "tableTo": "organizations", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "activities_organization_id_organizations_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "activities" - }, - { - "nameExplicit": false, - "columns": [ - "tenant_id" - ], - "schemaTo": "public", - "tableTo": "tenants", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "NO ACTION", - "name": "attachments_tenant_id_tenants_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "attachments" - }, - { - "nameExplicit": false, - "columns": [ - "created_by" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "SET NULL", - "name": "attachments_created_by_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "attachments" - }, - { - "nameExplicit": false, - "columns": [ - "modified_by" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "SET NULL", - "name": "attachments_modified_by_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "attachments" - }, - { - "nameExplicit": false, - "columns": [ - "organization_id" - ], - "schemaTo": "public", - "tableTo": "organizations", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "attachments_organization_id_organizations_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "attachments" - }, - { - "nameExplicit": false, - "columns": [ - "tenant_id", - "organization_id" - ], - "schemaTo": "public", - "tableTo": "organizations", - "columnsTo": [ - "tenant_id", - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "attachments_Ytb3N4m0pWsH_fkey", - "entityType": "fks", - "schema": "public", - "table": "attachments" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "emails_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "emails" - }, - { - "nameExplicit": false, - "columns": [ - "tenant_id" - ], - "schemaTo": "public", - "tableTo": "tenants", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "NO ACTION", - "name": "inactive_memberships_tenant_id_tenants_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "inactive_memberships" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "inactive_memberships_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "inactive_memberships" - }, - { - "nameExplicit": false, - "columns": [ - "created_by" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "inactive_memberships_created_by_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "inactive_memberships" - }, - { - "nameExplicit": false, - "columns": [ - "organization_id" - ], - "schemaTo": "public", - "tableTo": "organizations", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "inactive_memberships_organization_id_organizations_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "inactive_memberships" - }, - { - "nameExplicit": false, - "columns": [ - "tenant_id", - "organization_id" - ], - "schemaTo": "public", - "tableTo": "organizations", - "columnsTo": [ - "tenant_id", - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "inactive_memberships_gmmCA2ACknk4_fkey", - "entityType": "fks", - "schema": "public", - "table": "inactive_memberships" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "last_seen_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "last_seen" - }, - { - "nameExplicit": false, - "columns": [ - "tenant_id" - ], - "schemaTo": "public", - "tableTo": "tenants", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "NO ACTION", - "name": "memberships_tenant_id_tenants_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "memberships" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "memberships_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "memberships" - }, - { - "nameExplicit": false, - "columns": [ - "created_by" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "SET NULL", - "name": "memberships_created_by_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "memberships" - }, - { - "nameExplicit": false, - "columns": [ - "modified_by" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "SET NULL", - "name": "memberships_modified_by_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "memberships" - }, - { - "nameExplicit": false, - "columns": [ - "organization_id" - ], - "schemaTo": "public", - "tableTo": "organizations", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "memberships_organization_id_organizations_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "memberships" - }, - { - "nameExplicit": false, - "columns": [ - "tenant_id", - "organization_id" - ], - "schemaTo": "public", - "tableTo": "organizations", - "columnsTo": [ - "tenant_id", - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "memberships_Yta3VHtyCTj4_fkey", - "entityType": "fks", - "schema": "public", - "table": "memberships" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "oauth_accounts_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "oauth_accounts" - }, - { - "nameExplicit": false, - "columns": [ - "tenant_id" - ], - "schemaTo": "public", - "tableTo": "tenants", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "NO ACTION", - "name": "organizations_tenant_id_tenants_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "organizations" - }, - { - "nameExplicit": false, - "columns": [ - "created_by" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "SET NULL", - "name": "organizations_created_by_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "organizations" - }, - { - "nameExplicit": false, - "columns": [ - "modified_by" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "SET NULL", - "name": "organizations_modified_by_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "organizations" - }, - { - "nameExplicit": false, - "columns": [ - "tenant_id" - ], - "schemaTo": "public", - "tableTo": "tenants", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "NO ACTION", - "name": "pages_tenant_id_tenants_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "pages" - }, - { - "nameExplicit": false, - "columns": [ - "created_by" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "SET NULL", - "name": "pages_created_by_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "pages" - }, - { - "nameExplicit": false, - "columns": [ - "modified_by" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "SET NULL", - "name": "pages_modified_by_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "pages" - }, - { - "nameExplicit": false, - "columns": [ - "parent_id" - ], - "schemaTo": "public", - "tableTo": "pages", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "SET NULL", - "name": "pages_parent_id_pages_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "pages" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "passkeys_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "passkeys" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "passwords_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "passwords" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "sessions_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "sessions" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "system_roles_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "system_roles" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "tokens_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "tokens" - }, - { - "nameExplicit": false, - "columns": [ - "oauth_account_id" - ], - "schemaTo": "public", - "tableTo": "oauth_accounts", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "tokens_oauth_account_id_oauth_accounts_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "tokens" - }, - { - "nameExplicit": false, - "columns": [ - "created_by" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "tokens_created_by_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "tokens" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "totps_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "totps" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "CASCADE", - "name": "unsubscribe_tokens_user_id_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "unsubscribe_tokens" - }, - { - "nameExplicit": false, - "columns": [ - "modified_by" - ], - "schemaTo": "public", - "tableTo": "users", - "columnsTo": [ - "id" - ], - "onUpdate": "NO ACTION", - "onDelete": "NO ACTION", - "name": "users_modified_by_users_id_fkey", - "entityType": "fks", - "schema": "public", - "table": "users" - }, - { - "columns": [ - "id", - "created_at" - ], - "nameExplicit": false, - "name": "activities_pkey", - "entityType": "pks", - "schema": "public", - "table": "activities" - }, - { - "columns": [ - "id", - "expires_at" - ], - "nameExplicit": false, - "name": "sessions_pkey", - "entityType": "pks", - "schema": "public", - "table": "sessions" - }, - { - "columns": [ - "id", - "expires_at" - ], - "nameExplicit": false, - "name": "tokens_pkey", - "entityType": "pks", - "schema": "public", - "table": "tokens" - }, - { - "columns": [ - "id", - "created_at" - ], - "nameExplicit": false, - "name": "unsubscribe_tokens_pkey", - "entityType": "pks", - "schema": "public", - "table": "unsubscribe_tokens" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "attachments_pkey", - "schema": "public", - "table": "attachments", - "entityType": "pks" - }, - { - "columns": [ - "context_key" - ], - "nameExplicit": false, - "name": "context_counters_pkey", - "schema": "public", - "table": "context_counters", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "emails_pkey", - "schema": "public", - "table": "emails", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "inactive_memberships_pkey", - "schema": "public", - "table": "inactive_memberships", - "entityType": "pks" - }, - { - "columns": [ - "user_id" - ], - "nameExplicit": false, - "name": "last_seen_pkey", - "schema": "public", - "table": "last_seen", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "memberships_pkey", - "schema": "public", - "table": "memberships", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "oauth_accounts_pkey", - "schema": "public", - "table": "oauth_accounts", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "organizations_pkey", - "schema": "public", - "table": "organizations", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "pages_pkey", - "schema": "public", - "table": "pages", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "passkeys_pkey", - "schema": "public", - "table": "passkeys", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "passwords_pkey", - "schema": "public", - "table": "passwords", - "entityType": "pks" - }, - { - "columns": [ - "key" - ], - "nameExplicit": false, - "name": "rate_limits_pkey", - "schema": "public", - "table": "rate_limits", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "requests_pkey", - "schema": "public", - "table": "requests", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "system_roles_pkey", - "schema": "public", - "table": "system_roles", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "tenants_pkey", - "schema": "public", - "table": "tenants", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "totps_pkey", - "schema": "public", - "table": "totps", - "entityType": "pks" - }, - { - "columns": [ - "id" - ], - "nameExplicit": false, - "name": "users_pkey", - "schema": "public", - "table": "users", - "entityType": "pks" - }, - { - "nameExplicit": true, - "columns": [ - "tenant_id", - "email", - "context_type", - "organization_id" - ], - "nullsNotDistinct": true, - "name": "inactive_memberships_tenant_email_ctx", - "entityType": "uniques", - "schema": "public", - "table": "inactive_memberships" - }, - { - "nameExplicit": true, - "columns": [ - "tenant_id", - "user_id", - "context_type", - "organization_id" - ], - "nullsNotDistinct": true, - "name": "memberships_tenant_user_ctx", - "entityType": "uniques", - "schema": "public", - "table": "memberships" - }, - { - "nameExplicit": false, - "columns": [ - "provider", - "provider_user_id", - "email" - ], - "nullsNotDistinct": false, - "name": "oauth_accounts_provider_provider_user_id_email_unique", - "entityType": "uniques", - "schema": "public", - "table": "oauth_accounts" - }, - { - "nameExplicit": true, - "columns": [ - "tenant_id", - "id" - ], - "nullsNotDistinct": false, - "name": "organizations_tenant_id_unique", - "entityType": "uniques", - "schema": "public", - "table": "organizations" - }, - { - "nameExplicit": true, - "columns": [ - "parent_id", - "display_order" - ], - "nullsNotDistinct": false, - "name": "pages_group_order", - "entityType": "uniques", - "schema": "public", - "table": "pages" - }, - { - "nameExplicit": false, - "columns": [ - "email" - ], - "nullsNotDistinct": false, - "name": "emails_email_key", - "schema": "public", - "table": "emails", - "entityType": "uniques" - }, - { - "nameExplicit": false, - "columns": [ - "slug" - ], - "nullsNotDistinct": false, - "name": "organizations_slug_key", - "schema": "public", - "table": "organizations", - "entityType": "uniques" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "nullsNotDistinct": false, - "name": "passwords_user_id_key", - "schema": "public", - "table": "passwords", - "entityType": "uniques" - }, - { - "nameExplicit": false, - "columns": [ - "user_id" - ], - "nullsNotDistinct": false, - "name": "system_roles_user_id_key", - "schema": "public", - "table": "system_roles", - "entityType": "uniques" - }, - { - "nameExplicit": false, - "columns": [ - "slug" - ], - "nullsNotDistinct": false, - "name": "users_slug_key", - "schema": "public", - "table": "users", - "entityType": "uniques" - }, - { - "nameExplicit": false, - "columns": [ - "email" - ], - "nullsNotDistinct": false, - "name": "users_email_key", - "schema": "public", - "table": "users", - "entityType": "uniques" - }, - { - "as": "PERMISSIVE", - "for": "SELECT", - "roles": [ - "public" - ], - "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n\n", - "withCheck": null, - "name": "attachments_select_policy", - "entityType": "policies", - "schema": "public", - "table": "attachments" - }, - { - "as": "PERMISSIVE", - "for": "INSERT", - "roles": [ - "public" - ], - "using": null, - "withCheck": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n\n", - "name": "attachments_insert_policy", - "entityType": "policies", - "schema": "public", - "table": "attachments" - }, - { - "as": "PERMISSIVE", - "for": "UPDATE", - "roles": [ - "public" - ], - "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n\n", - "withCheck": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n\n", - "name": "attachments_update_policy", - "entityType": "policies", - "schema": "public", - "table": "attachments" - }, - { - "as": "PERMISSIVE", - "for": "DELETE", - "roles": [ - "public" - ], - "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n\n", - "withCheck": null, - "name": "attachments_delete_policy", - "entityType": "policies", - "schema": "public", - "table": "attachments" - }, - { - "as": "PERMISSIVE", - "for": "SELECT", - "roles": [ - "public" - ], - "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"inactive_memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"inactive_memberships\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"inactive_memberships\".\"tenant_id\"\n )\n\n", - "withCheck": null, - "name": "inactive_memberships_select_policy", - "entityType": "policies", - "schema": "public", - "table": "inactive_memberships" - }, - { - "as": "PERMISSIVE", - "for": "INSERT", - "roles": [ - "public" - ], - "using": null, - "withCheck": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"inactive_memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"inactive_memberships\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"inactive_memberships\".\"tenant_id\"\n )\n\n", - "name": "inactive_memberships_insert_policy", - "entityType": "policies", - "schema": "public", - "table": "inactive_memberships" - }, - { - "as": "PERMISSIVE", - "for": "UPDATE", - "roles": [ - "public" - ], - "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"inactive_memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"inactive_memberships\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"inactive_memberships\".\"tenant_id\"\n )\n\n", - "withCheck": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"inactive_memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"inactive_memberships\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"inactive_memberships\".\"tenant_id\"\n )\n\n", - "name": "inactive_memberships_update_policy", - "entityType": "policies", - "schema": "public", - "table": "inactive_memberships" - }, - { - "as": "PERMISSIVE", - "for": "DELETE", - "roles": [ - "public" - ], - "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"inactive_memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"inactive_memberships\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"inactive_memberships\".\"tenant_id\"\n )\n\n", - "withCheck": null, - "name": "inactive_memberships_delete_policy", - "entityType": "policies", - "schema": "public", - "table": "inactive_memberships" - }, - { - "as": "RESTRICTIVE", - "for": "SELECT", - "roles": [ - "public" - ], - "using": "COALESCE(current_setting('app.tenant_id', true), '') != '' OR COALESCE(current_setting('app.user_id', true), '') != ''", - "withCheck": null, - "name": "memberships_context_guard", - "entityType": "policies", - "schema": "public", - "table": "memberships" - }, - { - "as": "PERMISSIVE", - "for": "SELECT", - "roles": [ - "public" - ], - "using": "current_setting('app.is_authenticated', true)::boolean = true AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND \"memberships\".\"user_id\" = current_setting('app.user_id', true)::text\n", - "withCheck": null, - "name": "memberships_select_own_policy", - "entityType": "policies", - "schema": "public", - "table": "memberships" - }, - { - "as": "PERMISSIVE", - "for": "SELECT", - "roles": [ - "public" - ], - "using": "current_setting('app.is_authenticated', true)::boolean = true AND \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n", - "withCheck": null, - "name": "memberships_select_tenant_policy", - "entityType": "policies", - "schema": "public", - "table": "memberships" - }, - { - "as": "PERMISSIVE", - "for": "INSERT", - "roles": [ - "public" - ], - "using": null, - "withCheck": "\n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n AND current_setting('app.is_authenticated', true)::boolean = true", - "name": "memberships_insert_policy", - "entityType": "policies", - "schema": "public", - "table": "memberships" - }, - { - "as": "PERMISSIVE", - "for": "UPDATE", - "roles": [ - "public" - ], - "using": "\n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n AND current_setting('app.is_authenticated', true)::boolean = true", - "withCheck": "\n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n AND current_setting('app.is_authenticated', true)::boolean = true", - "name": "memberships_update_policy", - "entityType": "policies", - "schema": "public", - "table": "memberships" - }, - { - "as": "PERMISSIVE", - "for": "DELETE", - "roles": [ - "public" - ], - "using": "\n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n AND current_setting('app.is_authenticated', true)::boolean = true", - "withCheck": null, - "name": "memberships_delete_policy", - "entityType": "policies", - "schema": "public", - "table": "memberships" - }, - { - "as": "PERMISSIVE", - "for": "SELECT", - "roles": [ - "public" - ], - "using": "\n current_setting('app.is_authenticated', true)::boolean = true\n AND COALESCE(current_setting('app.user_id', true), '') != ''\n AND (\n \"organizations\".\"created_by\" = current_setting('app.user_id', true)::text\n OR EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"organizations\".\"id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"organizations\".\"tenant_id\"\n )\n )\n ", - "withCheck": null, - "name": "organizations_select_policy", - "entityType": "policies", - "schema": "public", - "table": "organizations" - }, - { - "as": "PERMISSIVE", - "for": "INSERT", - "roles": [ - "public" - ], - "using": null, - "withCheck": "\n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"organizations\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n AND current_setting('app.is_authenticated', true)::boolean = true", - "name": "organizations_insert_policy", - "entityType": "policies", - "schema": "public", - "table": "organizations" - }, - { - "as": "PERMISSIVE", - "for": "UPDATE", - "roles": [ - "public" - ], - "using": "\n current_setting('app.is_authenticated', true)::boolean = true\n AND COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"organizations\".\"id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"organizations\".\"tenant_id\"\n )\n ", - "withCheck": "\n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"organizations\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n AND current_setting('app.is_authenticated', true)::boolean = true", - "name": "organizations_update_policy", - "entityType": "policies", - "schema": "public", - "table": "organizations" - }, - { - "as": "PERMISSIVE", - "for": "DELETE", - "roles": [ - "public" - ], - "using": "\n current_setting('app.is_authenticated', true)::boolean = true\n AND COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"organizations\".\"id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"organizations\".\"tenant_id\"\n )\n ", - "withCheck": null, - "name": "organizations_delete_policy", - "entityType": "policies", - "schema": "public", - "table": "organizations" - }, - { - "as": "PERMISSIVE", - "for": "SELECT", - "roles": [ - "public" - ], - "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"pages\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND \n current_setting('app.is_authenticated', true)::boolean = true OR \"pages\".\"public_access\" = true\n\n", - "withCheck": null, - "name": "pages_select_policy", - "entityType": "policies", - "schema": "public", - "table": "pages" - }, - { - "as": "PERMISSIVE", - "for": "INSERT", - "roles": [ - "public" - ], - "using": null, - "withCheck": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"pages\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n", - "name": "pages_insert_policy", - "entityType": "policies", - "schema": "public", - "table": "pages" - }, - { - "as": "PERMISSIVE", - "for": "UPDATE", - "roles": [ - "public" - ], - "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"pages\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n", - "withCheck": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"pages\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n", - "name": "pages_update_policy", - "entityType": "policies", - "schema": "public", - "table": "pages" - }, - { - "as": "PERMISSIVE", - "for": "DELETE", - "roles": [ - "public" - ], - "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"pages\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n", - "withCheck": null, - "name": "pages_delete_policy", - "entityType": "policies", - "schema": "public", - "table": "pages" - } - ], - "renames": [] -} \ No newline at end of file diff --git a/backend/drizzle/20260216065606_cuddly_silhouette/migration.sql b/backend/drizzle/20260216125958_broken_bushwacker/migration.sql similarity index 99% rename from backend/drizzle/20260216065606_cuddly_silhouette/migration.sql rename to backend/drizzle/20260216125958_broken_bushwacker/migration.sql index 1bfbe3283..4435088e6 100644 --- a/backend/drizzle/20260216065606_cuddly_silhouette/migration.sql +++ b/backend/drizzle/20260216125958_broken_bushwacker/migration.sql @@ -74,6 +74,7 @@ CREATE TABLE "inactive_memberships" ( "rejected_at" timestamp, "created_by" varchar(50) NOT NULL, "organization_id" varchar(50) NOT NULL, + "organization_slug" varchar(255), CONSTRAINT "inactive_memberships_tenant_email_ctx" UNIQUE NULLS NOT DISTINCT("tenant_id","email","context_type","organization_id") ); --> statement-breakpoint @@ -97,6 +98,7 @@ CREATE TABLE "memberships" ( "muted" boolean DEFAULT false NOT NULL, "display_order" double precision NOT NULL, "organization_id" varchar(50) NOT NULL, + "organization_slug" varchar(255), CONSTRAINT "memberships_tenant_user_ctx" UNIQUE NULLS NOT DISTINCT("tenant_id","user_id","context_type","organization_id") ); --> statement-breakpoint @@ -300,10 +302,12 @@ CREATE INDEX "inactive_memberships_organization_id_idx" ON "inactive_memberships CREATE INDEX "inactive_memberships_tenant_id_idx" ON "inactive_memberships" ("tenant_id");--> statement-breakpoint CREATE INDEX "inactive_memberships_email_idx" ON "inactive_memberships" ("email");--> statement-breakpoint CREATE INDEX "inactive_memberships_org_pending_idx" ON "inactive_memberships" ("organization_id","rejected_at");--> statement-breakpoint +CREATE INDEX "inactive_memberships_organizationSlug_idx" ON "inactive_memberships" ("organization_slug");--> statement-breakpoint CREATE INDEX "memberships_user_id_idx" ON "memberships" ("user_id");--> statement-breakpoint CREATE INDEX "memberships_organization_id_idx" ON "memberships" ("organization_id");--> statement-breakpoint CREATE INDEX "memberships_tenant_id_idx" ON "memberships" ("tenant_id");--> statement-breakpoint CREATE INDEX "memberships_context_org_role_idx" ON "memberships" ("context_type","organization_id","role");--> statement-breakpoint +CREATE INDEX "memberships_organizationSlug_idx" ON "memberships" ("organization_slug");--> statement-breakpoint CREATE INDEX "organizations_name_index" ON "organizations" ("name" DESC NULLS LAST);--> statement-breakpoint CREATE INDEX "organizations_created_at_index" ON "organizations" ("created_at" DESC NULLS LAST);--> statement-breakpoint CREATE INDEX "organizations_tenant_id_index" ON "organizations" ("tenant_id");--> statement-breakpoint diff --git a/backend/drizzle/20260216065606_cuddly_silhouette/snapshot.json b/backend/drizzle/20260216125958_broken_bushwacker/snapshot.json similarity index 98% rename from backend/drizzle/20260216065606_cuddly_silhouette/snapshot.json rename to backend/drizzle/20260216125958_broken_bushwacker/snapshot.json index 57956c761..95747eef6 100644 --- a/backend/drizzle/20260216065606_cuddly_silhouette/snapshot.json +++ b/backend/drizzle/20260216125958_broken_bushwacker/snapshot.json @@ -1,7 +1,7 @@ { "version": "8", "dialect": "postgres", - "id": "020657e5-1020-4f24-bbc7-c1e715521e04", + "id": "61002ab9-5a20-41e2-9e1e-563371cb446d", "prevIds": [ "00000000-0000-0000-0000-000000000000" ], @@ -922,6 +922,19 @@ "schema": "public", "table": "inactive_memberships" }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_slug", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, { "type": "varchar(50)", "typeSchema": null, @@ -1117,6 +1130,19 @@ "schema": "public", "table": "memberships" }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_slug", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, { "type": "timestamp", "typeSchema": null, @@ -3204,6 +3230,27 @@ "schema": "public", "table": "inactive_memberships" }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "inactive_memberships_organizationSlug_idx", + "entityType": "indexes", + "schema": "public", + "table": "inactive_memberships" + }, { "nameExplicit": true, "columns": [ @@ -3302,6 +3349,27 @@ "schema": "public", "table": "memberships" }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "memberships_organizationSlug_idx", + "entityType": "indexes", + "schema": "public", + "table": "memberships" + }, { "nameExplicit": true, "columns": [ diff --git a/backend/drizzle/20260216065608_cdc_setup/migration.sql b/backend/drizzle/20260216130000_cdc_setup/migration.sql similarity index 100% rename from backend/drizzle/20260216065608_cdc_setup/migration.sql rename to backend/drizzle/20260216130000_cdc_setup/migration.sql diff --git a/backend/drizzle/20260216065608_cdc_setup/snapshot.json b/backend/drizzle/20260216130000_cdc_setup/snapshot.json similarity index 98% rename from backend/drizzle/20260216065608_cdc_setup/snapshot.json rename to backend/drizzle/20260216130000_cdc_setup/snapshot.json index 57956c761..95747eef6 100644 --- a/backend/drizzle/20260216065608_cdc_setup/snapshot.json +++ b/backend/drizzle/20260216130000_cdc_setup/snapshot.json @@ -1,7 +1,7 @@ { "version": "8", "dialect": "postgres", - "id": "020657e5-1020-4f24-bbc7-c1e715521e04", + "id": "61002ab9-5a20-41e2-9e1e-563371cb446d", "prevIds": [ "00000000-0000-0000-0000-000000000000" ], @@ -922,6 +922,19 @@ "schema": "public", "table": "inactive_memberships" }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_slug", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, { "type": "varchar(50)", "typeSchema": null, @@ -1117,6 +1130,19 @@ "schema": "public", "table": "memberships" }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_slug", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, { "type": "timestamp", "typeSchema": null, @@ -3204,6 +3230,27 @@ "schema": "public", "table": "inactive_memberships" }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "inactive_memberships_organizationSlug_idx", + "entityType": "indexes", + "schema": "public", + "table": "inactive_memberships" + }, { "nameExplicit": true, "columns": [ @@ -3302,6 +3349,27 @@ "schema": "public", "table": "memberships" }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "memberships_organizationSlug_idx", + "entityType": "indexes", + "schema": "public", + "table": "memberships" + }, { "nameExplicit": true, "columns": [ diff --git a/backend/drizzle/20260216065609_partman_setup/migration.sql b/backend/drizzle/20260216130001_partman_setup/migration.sql similarity index 100% rename from backend/drizzle/20260216065609_partman_setup/migration.sql rename to backend/drizzle/20260216130001_partman_setup/migration.sql diff --git a/backend/drizzle/20260216065609_partman_setup/snapshot.json b/backend/drizzle/20260216130001_partman_setup/snapshot.json similarity index 98% rename from backend/drizzle/20260216065609_partman_setup/snapshot.json rename to backend/drizzle/20260216130001_partman_setup/snapshot.json index 57956c761..95747eef6 100644 --- a/backend/drizzle/20260216065609_partman_setup/snapshot.json +++ b/backend/drizzle/20260216130001_partman_setup/snapshot.json @@ -1,7 +1,7 @@ { "version": "8", "dialect": "postgres", - "id": "020657e5-1020-4f24-bbc7-c1e715521e04", + "id": "61002ab9-5a20-41e2-9e1e-563371cb446d", "prevIds": [ "00000000-0000-0000-0000-000000000000" ], @@ -922,6 +922,19 @@ "schema": "public", "table": "inactive_memberships" }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_slug", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, { "type": "varchar(50)", "typeSchema": null, @@ -1117,6 +1130,19 @@ "schema": "public", "table": "memberships" }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_slug", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, { "type": "timestamp", "typeSchema": null, @@ -3204,6 +3230,27 @@ "schema": "public", "table": "inactive_memberships" }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "inactive_memberships_organizationSlug_idx", + "entityType": "indexes", + "schema": "public", + "table": "inactive_memberships" + }, { "nameExplicit": true, "columns": [ @@ -3302,6 +3349,27 @@ "schema": "public", "table": "memberships" }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "memberships_organizationSlug_idx", + "entityType": "indexes", + "schema": "public", + "table": "memberships" + }, { "nameExplicit": true, "columns": [ diff --git a/backend/drizzle/20260216065610_rls_setup/migration.sql b/backend/drizzle/20260216130003_rls_setup/migration.sql similarity index 100% rename from backend/drizzle/20260216065610_rls_setup/migration.sql rename to backend/drizzle/20260216130003_rls_setup/migration.sql diff --git a/backend/drizzle/20260216065610_rls_setup/snapshot.json b/backend/drizzle/20260216130003_rls_setup/snapshot.json similarity index 98% rename from backend/drizzle/20260216065610_rls_setup/snapshot.json rename to backend/drizzle/20260216130003_rls_setup/snapshot.json index 57956c761..95747eef6 100644 --- a/backend/drizzle/20260216065610_rls_setup/snapshot.json +++ b/backend/drizzle/20260216130003_rls_setup/snapshot.json @@ -1,7 +1,7 @@ { "version": "8", "dialect": "postgres", - "id": "020657e5-1020-4f24-bbc7-c1e715521e04", + "id": "61002ab9-5a20-41e2-9e1e-563371cb446d", "prevIds": [ "00000000-0000-0000-0000-000000000000" ], @@ -922,6 +922,19 @@ "schema": "public", "table": "inactive_memberships" }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_slug", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, { "type": "varchar(50)", "typeSchema": null, @@ -1117,6 +1130,19 @@ "schema": "public", "table": "memberships" }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_slug", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, { "type": "timestamp", "typeSchema": null, @@ -3204,6 +3230,27 @@ "schema": "public", "table": "inactive_memberships" }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "inactive_memberships_organizationSlug_idx", + "entityType": "indexes", + "schema": "public", + "table": "inactive_memberships" + }, { "nameExplicit": true, "columns": [ @@ -3302,6 +3349,27 @@ "schema": "public", "table": "memberships" }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "memberships_organizationSlug_idx", + "entityType": "indexes", + "schema": "public", + "table": "memberships" + }, { "nameExplicit": true, "columns": [ diff --git a/backend/drizzle/20260216065612_immutability_setup/migration.sql b/backend/drizzle/20260216130004_immutability_setup/migration.sql similarity index 100% rename from backend/drizzle/20260216065612_immutability_setup/migration.sql rename to backend/drizzle/20260216130004_immutability_setup/migration.sql diff --git a/backend/drizzle/20260216130004_immutability_setup/snapshot.json b/backend/drizzle/20260216130004_immutability_setup/snapshot.json new file mode 100644 index 000000000..95747eef6 --- /dev/null +++ b/backend/drizzle/20260216130004_immutability_setup/snapshot.json @@ -0,0 +1,5058 @@ +{ + "version": "8", + "dialect": "postgres", + "id": "61002ab9-5a20-41e2-9e1e-563371cb446d", + "prevIds": [ + "00000000-0000-0000-0000-000000000000" + ], + "ddl": [ + { + "values": [ + "active", + "suspended", + "archived" + ], + "name": "tenant_status", + "entityType": "enums", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "activities", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": true, + "name": "attachments", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "context_counters", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "emails", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": true, + "name": "inactive_memberships", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "last_seen", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": true, + "name": "memberships", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "oauth_accounts", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": true, + "name": "organizations", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": true, + "name": "pages", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "passkeys", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "passwords", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "rate_limits", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "requests", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "sessions", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "system_roles", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "tenants", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "tokens", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "totps", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "unsubscribe_tokens", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "users", + "entityType": "tables", + "schema": "public" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "varchar(24)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenant_id", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "entity_type", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resource_type", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "table_name", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "entity_id", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_id", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "changed_keys", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stx", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seq", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error", + "entityType": "columns", + "schema": "public", + "table": "activities" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'attachment'", + "generated": null, + "identity": null, + "name": "entity_type", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(24)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenant_id", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'New attachment'", + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_at", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stx", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(100000)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "keywords", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_by", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "public", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bucket_name", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "group_id", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "filename", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content_type", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "converted_content_type", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(2048)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "original_key", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(2048)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "converted_key", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(2048)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnail_key", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_id", + "entityType": "columns", + "schema": "public", + "table": "attachments" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "context_key", + "entityType": "columns", + "schema": "public", + "table": "context_counters" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seq", + "entityType": "columns", + "schema": "public", + "table": "context_counters" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "m_seq", + "entityType": "columns", + "schema": "public", + "table": "context_counters" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "counts", + "entityType": "columns", + "schema": "public", + "table": "context_counters" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "public", + "table": "context_counters" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "emails" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "emails" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "emails" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "verified", + "entityType": "columns", + "schema": "public", + "table": "emails" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token_id", + "entityType": "columns", + "schema": "public", + "table": "emails" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "emails" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verified_at", + "entityType": "columns", + "schema": "public", + "table": "emails" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, + { + "type": "varchar(24)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenant_id", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "context_type", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token_id", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'member'", + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rejected_at", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_id", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_slug", + "entityType": "columns", + "schema": "public", + "table": "inactive_memberships" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "last_seen" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_seen_at", + "entityType": "columns", + "schema": "public", + "table": "last_seen" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "varchar(24)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenant_id", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "context_type", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'member'", + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_at", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_by", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "archived", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "muted", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "display_order", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_id", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "organization_slug", + "entityType": "columns", + "schema": "public", + "table": "memberships" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "oauth_accounts" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "oauth_accounts" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "public", + "table": "oauth_accounts" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider_user_id", + "entityType": "columns", + "schema": "public", + "table": "oauth_accounts" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "oauth_accounts" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "verified", + "entityType": "columns", + "schema": "public", + "table": "oauth_accounts" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verified_at", + "entityType": "columns", + "schema": "public", + "table": "oauth_accounts" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "oauth_accounts" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'organization'", + "generated": null, + "identity": null, + "name": "entity_type", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(24)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenant_id", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_at", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(2048)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnail_url", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(2048)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "banner_url", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_by", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "short_name", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'en'", + "generated": null, + "identity": null, + "name": "default_language", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "json", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[\"en\"]'", + "generated": null, + "identity": null, + "name": "languages", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "json", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"user\":1000,\"attachment\":100,\"page\":0}'", + "generated": null, + "identity": null, + "name": "restrictions", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notification_email", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "json", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "email_domains", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "color", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(2048)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logo_url", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(2048)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "website_url", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "varchar(100000)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcome_text", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "json", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "auth_strategies", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "chat_support", + "entityType": "columns", + "schema": "public", + "table": "organizations" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'page'", + "generated": null, + "identity": null, + "name": "entity_type", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "varchar(24)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenant_id", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'New page'", + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_at", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stx", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "varchar(100000)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "keywords", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_by", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'unpublished'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "public_access", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parent_id", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "display_order", + "entityType": "columns", + "schema": "public", + "table": "pages" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "varchar(2048)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credential_id", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "varchar(2048)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "public_key", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "device_name", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'desktop'", + "generated": null, + "identity": null, + "name": "device_type", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "device_os", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "browser", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name_on_device", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "passwords" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hashed_password", + "entityType": "columns", + "schema": "public", + "table": "passwords" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "passwords" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "passwords" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_at", + "entityType": "columns", + "schema": "public", + "table": "passwords" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key", + "entityType": "columns", + "schema": "public", + "table": "rate_limits" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "points", + "entityType": "columns", + "schema": "public", + "table": "rate_limits" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expire", + "entityType": "columns", + "schema": "public", + "table": "rate_limits" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "requests" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "requests" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "message", + "entityType": "columns", + "schema": "public", + "table": "requests" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "requests" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "requests" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token_id", + "entityType": "columns", + "schema": "public", + "table": "requests" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "sessions" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "secret", + "entityType": "columns", + "schema": "public", + "table": "sessions" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'regular'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "sessions" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "sessions" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "device_name", + "entityType": "columns", + "schema": "public", + "table": "sessions" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'desktop'", + "generated": null, + "identity": null, + "name": "device_type", + "entityType": "columns", + "schema": "public", + "table": "sessions" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "device_os", + "entityType": "columns", + "schema": "public", + "table": "sessions" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "browser", + "entityType": "columns", + "schema": "public", + "table": "sessions" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth_strategy", + "entityType": "columns", + "schema": "public", + "table": "sessions" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "sessions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "public", + "table": "sessions" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "system_roles" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "system_roles" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "public", + "table": "system_roles" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "system_roles" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_at", + "entityType": "columns", + "schema": "public", + "table": "system_roles" + }, + { + "type": "varchar(24)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "tenants" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "tenants" + }, + { + "type": "tenant_status", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "tenants" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "tenants" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_at", + "entityType": "columns", + "schema": "public", + "table": "tenants" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "tokens" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "secret", + "entityType": "columns", + "schema": "public", + "table": "tokens" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "single_use_token", + "entityType": "columns", + "schema": "public", + "table": "tokens" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "tokens" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "tokens" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "tokens" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "oauth_account_id", + "entityType": "columns", + "schema": "public", + "table": "tokens" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inactive_membership_id", + "entityType": "columns", + "schema": "public", + "table": "tokens" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "public", + "table": "tokens" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "tokens" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "public", + "table": "tokens" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "invoked_at", + "entityType": "columns", + "schema": "public", + "table": "tokens" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "totps" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "totps" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "secret", + "entityType": "columns", + "schema": "public", + "table": "totps" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "totps" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "unsubscribe_tokens" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "public", + "table": "unsubscribe_tokens" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "secret", + "entityType": "columns", + "schema": "public", + "table": "unsubscribe_tokens" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "unsubscribe_tokens" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'user'", + "generated": null, + "identity": null, + "name": "entity_type", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "varchar(2048)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnail_url", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "varchar(2048)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "banner_url", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "mfa_required", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "first_name", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_name", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "varchar", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'en'", + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "newsletter", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "user_flags", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_at", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_started_at", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_sign_in_at", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "type": "varchar(50)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modified_by", + "entityType": "columns", + "schema": "public", + "table": "users" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "created_at", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "activities_created_at_index", + "entityType": "indexes", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "activities_type_index", + "entityType": "indexes", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "activities_user_id_index", + "entityType": "indexes", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "entity_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "activities_entity_id_index", + "entityType": "indexes", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "table_name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "activities_table_name_index", + "entityType": "indexes", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenant_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "activities_tenant_id_index", + "entityType": "indexes", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "(stx->>'mutationId')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "activities_stx_id_index", + "entityType": "indexes", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "(error->>'lsn')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "error IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "activities_error_lsn_index", + "entityType": "indexes", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "activities_organization_id_index", + "entityType": "indexes", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "\"seq\" desc", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "activities_organization_id_seq_index", + "entityType": "indexes", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "attachments_organization_id_index", + "entityType": "indexes", + "schema": "public", + "table": "attachments" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenant_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "attachments_tenant_id_index", + "entityType": "indexes", + "schema": "public", + "table": "attachments" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "inactive_memberships_user_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "inactive_memberships" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "inactive_memberships_organization_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "inactive_memberships" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenant_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "inactive_memberships_tenant_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "inactive_memberships" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "inactive_memberships_email_idx", + "entityType": "indexes", + "schema": "public", + "table": "inactive_memberships" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "rejected_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "inactive_memberships_org_pending_idx", + "entityType": "indexes", + "schema": "public", + "table": "inactive_memberships" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "inactive_memberships_organizationSlug_idx", + "entityType": "indexes", + "schema": "public", + "table": "inactive_memberships" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "memberships_user_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "memberships" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "memberships_organization_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "memberships" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenant_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "memberships_tenant_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "memberships" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "context_type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "organization_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "role", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "memberships_context_org_role_idx", + "entityType": "indexes", + "schema": "public", + "table": "memberships" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "organization_slug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "memberships_organizationSlug_idx", + "entityType": "indexes", + "schema": "public", + "table": "memberships" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "name", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "organizations_name_index", + "entityType": "indexes", + "schema": "public", + "table": "organizations" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "created_at", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "organizations_created_at_index", + "entityType": "indexes", + "schema": "public", + "table": "organizations" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenant_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "organizations_tenant_id_index", + "entityType": "indexes", + "schema": "public", + "table": "organizations" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenant_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "pages_tenant_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "pages" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "requests_emails", + "entityType": "indexes", + "schema": "public", + "table": "requests" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "created_at", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "requests_created_at", + "entityType": "indexes", + "schema": "public", + "table": "requests" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "secret", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "sessions_secret_idx", + "entityType": "indexes", + "schema": "public", + "table": "sessions" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "sessions_user_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "sessions" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "tenants_status_index", + "entityType": "indexes", + "schema": "public", + "table": "tenants" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "created_at", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "tenants_created_at_index", + "entityType": "indexes", + "schema": "public", + "table": "tenants" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "secret", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "tokens_secret_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "tokens" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "tokens_user_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "tokens" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "secret", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "unsubscribe_tokens_secret_idx", + "entityType": "indexes", + "schema": "public", + "table": "unsubscribe_tokens" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "unsubscribe_tokens_user_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "unsubscribe_tokens" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "name", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "users_name_index", + "entityType": "indexes", + "schema": "public", + "table": "users" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "users_email_index", + "entityType": "indexes", + "schema": "public", + "table": "users" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "created_at", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "users_created_at_index", + "entityType": "indexes", + "schema": "public", + "table": "users" + }, + { + "nameExplicit": false, + "columns": [ + "tenant_id" + ], + "schemaTo": "public", + "tableTo": "tenants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "activities_tenant_id_tenants_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "activities_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": false, + "columns": [ + "tenant_id", + "organization_id" + ], + "schemaTo": "public", + "tableTo": "organizations", + "columnsTo": [ + "tenant_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "activities_mcflvig2gMS8_fkey", + "entityType": "fks", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": false, + "columns": [ + "organization_id" + ], + "schemaTo": "public", + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "activities_organization_id_organizations_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "activities" + }, + { + "nameExplicit": false, + "columns": [ + "tenant_id" + ], + "schemaTo": "public", + "tableTo": "tenants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "attachments_tenant_id_tenants_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "attachments" + }, + { + "nameExplicit": false, + "columns": [ + "created_by" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "attachments_created_by_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "attachments" + }, + { + "nameExplicit": false, + "columns": [ + "modified_by" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "attachments_modified_by_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "attachments" + }, + { + "nameExplicit": false, + "columns": [ + "organization_id" + ], + "schemaTo": "public", + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "attachments_organization_id_organizations_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "attachments" + }, + { + "nameExplicit": false, + "columns": [ + "tenant_id", + "organization_id" + ], + "schemaTo": "public", + "tableTo": "organizations", + "columnsTo": [ + "tenant_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "attachments_Ytb3N4m0pWsH_fkey", + "entityType": "fks", + "schema": "public", + "table": "attachments" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "emails_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "emails" + }, + { + "nameExplicit": false, + "columns": [ + "tenant_id" + ], + "schemaTo": "public", + "tableTo": "tenants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "inactive_memberships_tenant_id_tenants_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "inactive_memberships" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "inactive_memberships_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "inactive_memberships" + }, + { + "nameExplicit": false, + "columns": [ + "created_by" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "inactive_memberships_created_by_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "inactive_memberships" + }, + { + "nameExplicit": false, + "columns": [ + "organization_id" + ], + "schemaTo": "public", + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "inactive_memberships_organization_id_organizations_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "inactive_memberships" + }, + { + "nameExplicit": false, + "columns": [ + "tenant_id", + "organization_id" + ], + "schemaTo": "public", + "tableTo": "organizations", + "columnsTo": [ + "tenant_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "inactive_memberships_gmmCA2ACknk4_fkey", + "entityType": "fks", + "schema": "public", + "table": "inactive_memberships" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "last_seen_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "last_seen" + }, + { + "nameExplicit": false, + "columns": [ + "tenant_id" + ], + "schemaTo": "public", + "tableTo": "tenants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "memberships_tenant_id_tenants_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "memberships" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "memberships_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "memberships" + }, + { + "nameExplicit": false, + "columns": [ + "created_by" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "memberships_created_by_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "memberships" + }, + { + "nameExplicit": false, + "columns": [ + "modified_by" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "memberships_modified_by_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "memberships" + }, + { + "nameExplicit": false, + "columns": [ + "organization_id" + ], + "schemaTo": "public", + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "memberships_organization_id_organizations_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "memberships" + }, + { + "nameExplicit": false, + "columns": [ + "tenant_id", + "organization_id" + ], + "schemaTo": "public", + "tableTo": "organizations", + "columnsTo": [ + "tenant_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "memberships_Yta3VHtyCTj4_fkey", + "entityType": "fks", + "schema": "public", + "table": "memberships" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "oauth_accounts_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "oauth_accounts" + }, + { + "nameExplicit": false, + "columns": [ + "tenant_id" + ], + "schemaTo": "public", + "tableTo": "tenants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "organizations_tenant_id_tenants_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "organizations" + }, + { + "nameExplicit": false, + "columns": [ + "created_by" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "organizations_created_by_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "organizations" + }, + { + "nameExplicit": false, + "columns": [ + "modified_by" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "organizations_modified_by_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "organizations" + }, + { + "nameExplicit": false, + "columns": [ + "tenant_id" + ], + "schemaTo": "public", + "tableTo": "tenants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "pages_tenant_id_tenants_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "pages" + }, + { + "nameExplicit": false, + "columns": [ + "created_by" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "pages_created_by_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "pages" + }, + { + "nameExplicit": false, + "columns": [ + "modified_by" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "pages_modified_by_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "pages" + }, + { + "nameExplicit": false, + "columns": [ + "parent_id" + ], + "schemaTo": "public", + "tableTo": "pages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "pages_parent_id_pages_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "pages" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "passkeys_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "passkeys" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "passwords_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "passwords" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "sessions_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "sessions" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "system_roles_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "system_roles" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tokens_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "tokens" + }, + { + "nameExplicit": false, + "columns": [ + "oauth_account_id" + ], + "schemaTo": "public", + "tableTo": "oauth_accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tokens_oauth_account_id_oauth_accounts_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "tokens" + }, + { + "nameExplicit": false, + "columns": [ + "created_by" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tokens_created_by_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "tokens" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "totps_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "totps" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "unsubscribe_tokens_user_id_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "unsubscribe_tokens" + }, + { + "nameExplicit": false, + "columns": [ + "modified_by" + ], + "schemaTo": "public", + "tableTo": "users", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "users_modified_by_users_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "users" + }, + { + "columns": [ + "id", + "created_at" + ], + "nameExplicit": false, + "name": "activities_pkey", + "entityType": "pks", + "schema": "public", + "table": "activities" + }, + { + "columns": [ + "id", + "expires_at" + ], + "nameExplicit": false, + "name": "sessions_pkey", + "entityType": "pks", + "schema": "public", + "table": "sessions" + }, + { + "columns": [ + "id", + "expires_at" + ], + "nameExplicit": false, + "name": "tokens_pkey", + "entityType": "pks", + "schema": "public", + "table": "tokens" + }, + { + "columns": [ + "id", + "created_at" + ], + "nameExplicit": false, + "name": "unsubscribe_tokens_pkey", + "entityType": "pks", + "schema": "public", + "table": "unsubscribe_tokens" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "attachments_pkey", + "schema": "public", + "table": "attachments", + "entityType": "pks" + }, + { + "columns": [ + "context_key" + ], + "nameExplicit": false, + "name": "context_counters_pkey", + "schema": "public", + "table": "context_counters", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "emails_pkey", + "schema": "public", + "table": "emails", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "inactive_memberships_pkey", + "schema": "public", + "table": "inactive_memberships", + "entityType": "pks" + }, + { + "columns": [ + "user_id" + ], + "nameExplicit": false, + "name": "last_seen_pkey", + "schema": "public", + "table": "last_seen", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "memberships_pkey", + "schema": "public", + "table": "memberships", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "oauth_accounts_pkey", + "schema": "public", + "table": "oauth_accounts", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "organizations_pkey", + "schema": "public", + "table": "organizations", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "pages_pkey", + "schema": "public", + "table": "pages", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "passkeys_pkey", + "schema": "public", + "table": "passkeys", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "passwords_pkey", + "schema": "public", + "table": "passwords", + "entityType": "pks" + }, + { + "columns": [ + "key" + ], + "nameExplicit": false, + "name": "rate_limits_pkey", + "schema": "public", + "table": "rate_limits", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "requests_pkey", + "schema": "public", + "table": "requests", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "system_roles_pkey", + "schema": "public", + "table": "system_roles", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tenants_pkey", + "schema": "public", + "table": "tenants", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "totps_pkey", + "schema": "public", + "table": "totps", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "users_pkey", + "schema": "public", + "table": "users", + "entityType": "pks" + }, + { + "nameExplicit": true, + "columns": [ + "tenant_id", + "email", + "context_type", + "organization_id" + ], + "nullsNotDistinct": true, + "name": "inactive_memberships_tenant_email_ctx", + "entityType": "uniques", + "schema": "public", + "table": "inactive_memberships" + }, + { + "nameExplicit": true, + "columns": [ + "tenant_id", + "user_id", + "context_type", + "organization_id" + ], + "nullsNotDistinct": true, + "name": "memberships_tenant_user_ctx", + "entityType": "uniques", + "schema": "public", + "table": "memberships" + }, + { + "nameExplicit": false, + "columns": [ + "provider", + "provider_user_id", + "email" + ], + "nullsNotDistinct": false, + "name": "oauth_accounts_provider_provider_user_id_email_unique", + "entityType": "uniques", + "schema": "public", + "table": "oauth_accounts" + }, + { + "nameExplicit": true, + "columns": [ + "tenant_id", + "id" + ], + "nullsNotDistinct": false, + "name": "organizations_tenant_id_unique", + "entityType": "uniques", + "schema": "public", + "table": "organizations" + }, + { + "nameExplicit": true, + "columns": [ + "parent_id", + "display_order" + ], + "nullsNotDistinct": false, + "name": "pages_group_order", + "entityType": "uniques", + "schema": "public", + "table": "pages" + }, + { + "nameExplicit": false, + "columns": [ + "email" + ], + "nullsNotDistinct": false, + "name": "emails_email_key", + "schema": "public", + "table": "emails", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "slug" + ], + "nullsNotDistinct": false, + "name": "organizations_slug_key", + "schema": "public", + "table": "organizations", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "nullsNotDistinct": false, + "name": "passwords_user_id_key", + "schema": "public", + "table": "passwords", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "nullsNotDistinct": false, + "name": "system_roles_user_id_key", + "schema": "public", + "table": "system_roles", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "slug" + ], + "nullsNotDistinct": false, + "name": "users_slug_key", + "schema": "public", + "table": "users", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "email" + ], + "nullsNotDistinct": false, + "name": "users_email_key", + "schema": "public", + "table": "users", + "entityType": "uniques" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "public" + ], + "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n\n", + "withCheck": null, + "name": "attachments_select_policy", + "entityType": "policies", + "schema": "public", + "table": "attachments" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "public" + ], + "using": null, + "withCheck": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n\n", + "name": "attachments_insert_policy", + "entityType": "policies", + "schema": "public", + "table": "attachments" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "public" + ], + "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n\n", + "withCheck": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n\n", + "name": "attachments_update_policy", + "entityType": "policies", + "schema": "public", + "table": "attachments" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "public" + ], + "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n\n", + "withCheck": null, + "name": "attachments_delete_policy", + "entityType": "policies", + "schema": "public", + "table": "attachments" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "public" + ], + "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"inactive_memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"inactive_memberships\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"inactive_memberships\".\"tenant_id\"\n )\n\n", + "withCheck": null, + "name": "inactive_memberships_select_policy", + "entityType": "policies", + "schema": "public", + "table": "inactive_memberships" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "public" + ], + "using": null, + "withCheck": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"inactive_memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"inactive_memberships\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"inactive_memberships\".\"tenant_id\"\n )\n\n", + "name": "inactive_memberships_insert_policy", + "entityType": "policies", + "schema": "public", + "table": "inactive_memberships" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "public" + ], + "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"inactive_memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"inactive_memberships\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"inactive_memberships\".\"tenant_id\"\n )\n\n", + "withCheck": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"inactive_memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"inactive_memberships\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"inactive_memberships\".\"tenant_id\"\n )\n\n", + "name": "inactive_memberships_update_policy", + "entityType": "policies", + "schema": "public", + "table": "inactive_memberships" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "public" + ], + "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"inactive_memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"inactive_memberships\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"inactive_memberships\".\"tenant_id\"\n )\n\n", + "withCheck": null, + "name": "inactive_memberships_delete_policy", + "entityType": "policies", + "schema": "public", + "table": "inactive_memberships" + }, + { + "as": "RESTRICTIVE", + "for": "SELECT", + "roles": [ + "public" + ], + "using": "COALESCE(current_setting('app.tenant_id', true), '') != '' OR COALESCE(current_setting('app.user_id', true), '') != ''", + "withCheck": null, + "name": "memberships_context_guard", + "entityType": "policies", + "schema": "public", + "table": "memberships" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "public" + ], + "using": "current_setting('app.is_authenticated', true)::boolean = true AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND \"memberships\".\"user_id\" = current_setting('app.user_id', true)::text\n", + "withCheck": null, + "name": "memberships_select_own_policy", + "entityType": "policies", + "schema": "public", + "table": "memberships" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "public" + ], + "using": "current_setting('app.is_authenticated', true)::boolean = true AND \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n", + "withCheck": null, + "name": "memberships_select_tenant_policy", + "entityType": "policies", + "schema": "public", + "table": "memberships" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "public" + ], + "using": null, + "withCheck": "\n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n AND current_setting('app.is_authenticated', true)::boolean = true", + "name": "memberships_insert_policy", + "entityType": "policies", + "schema": "public", + "table": "memberships" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "public" + ], + "using": "\n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n AND current_setting('app.is_authenticated', true)::boolean = true", + "withCheck": "\n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n AND current_setting('app.is_authenticated', true)::boolean = true", + "name": "memberships_update_policy", + "entityType": "policies", + "schema": "public", + "table": "memberships" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "public" + ], + "using": "\n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"memberships\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n AND current_setting('app.is_authenticated', true)::boolean = true", + "withCheck": null, + "name": "memberships_delete_policy", + "entityType": "policies", + "schema": "public", + "table": "memberships" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "public" + ], + "using": "\n current_setting('app.is_authenticated', true)::boolean = true\n AND COALESCE(current_setting('app.user_id', true), '') != ''\n AND (\n \"organizations\".\"created_by\" = current_setting('app.user_id', true)::text\n OR EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"organizations\".\"id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"organizations\".\"tenant_id\"\n )\n )\n ", + "withCheck": null, + "name": "organizations_select_policy", + "entityType": "policies", + "schema": "public", + "table": "organizations" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "public" + ], + "using": null, + "withCheck": "\n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"organizations\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n AND current_setting('app.is_authenticated', true)::boolean = true", + "name": "organizations_insert_policy", + "entityType": "policies", + "schema": "public", + "table": "organizations" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "public" + ], + "using": "\n current_setting('app.is_authenticated', true)::boolean = true\n AND COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"organizations\".\"id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"organizations\".\"tenant_id\"\n )\n ", + "withCheck": "\n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"organizations\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n AND current_setting('app.is_authenticated', true)::boolean = true", + "name": "organizations_update_policy", + "entityType": "policies", + "schema": "public", + "table": "organizations" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "public" + ], + "using": "\n current_setting('app.is_authenticated', true)::boolean = true\n AND COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"organizations\".\"id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"organizations\".\"tenant_id\"\n )\n ", + "withCheck": null, + "name": "organizations_delete_policy", + "entityType": "policies", + "schema": "public", + "table": "organizations" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "public" + ], + "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"pages\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND \n current_setting('app.is_authenticated', true)::boolean = true OR \"pages\".\"public_access\" = true\n\n", + "withCheck": null, + "name": "pages_select_policy", + "entityType": "policies", + "schema": "public", + "table": "pages" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "public" + ], + "using": null, + "withCheck": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"pages\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n", + "name": "pages_insert_policy", + "entityType": "policies", + "schema": "public", + "table": "pages" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "public" + ], + "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"pages\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n", + "withCheck": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"pages\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n", + "name": "pages_update_policy", + "entityType": "policies", + "schema": "public", + "table": "pages" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "public" + ], + "using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"pages\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n", + "withCheck": null, + "name": "pages_delete_policy", + "entityType": "policies", + "schema": "public", + "table": "pages" + } + ], + "renames": [] +} \ No newline at end of file diff --git a/backend/mocks/mock-membership.ts b/backend/mocks/mock-membership.ts index c49114ee8..1bf09a41e 100644 --- a/backend/mocks/mock-membership.ts +++ b/backend/mocks/mock-membership.ts @@ -6,7 +6,9 @@ import type { UserModel } from '#/db/schema/users'; import { nanoid } from '#/utils/nanoid'; import { generateMockContextEntityIdColumns, + generateMockContextEntitySlugColumns, type MockContextEntityIdColumns, + type MockContextEntitySlugColumns, mockNanoid, mockPaginated, mockTenantId, @@ -24,7 +26,8 @@ type MembershipBase = { displayOrder: number; muted: boolean; archived: boolean; -} & MockContextEntityIdColumns; +} & MockContextEntityIdColumns & + MockContextEntitySlugColumns; // Tracks the current order offset for memberships per context (e.g., organization) const membershipOrderMap: Map = new Map(); @@ -96,6 +99,7 @@ export const mockMembershipBase = (key = 'membership-base:default'): MembershipB contextType: 'organization' as const, userId: mockNanoid(), ...generateMockContextEntityIdColumns(), + ...generateMockContextEntitySlugColumns(), role: faker.helpers.arrayElement(roles.all), displayOrder: faker.number.int({ min: 1, max: 100 }), muted: false, @@ -113,12 +117,14 @@ export const mockMembership = (key = 'membership:default'): MembershipModel => const createdAt = faker.date.past({ refDate }).toISOString(); const userId = mockNanoid(); const contextEntityColumns = generateMockContextEntityIdColumns(); + const contextEntitySlugColumns = generateMockContextEntitySlugColumns(); return { id: mockNanoid(), contextType: 'organization' as const, userId, ...contextEntityColumns, + ...contextEntitySlugColumns, role: faker.helpers.arrayElement(roles.all), displayOrder: faker.number.int({ min: 1, max: 100 }), muted: false, @@ -145,6 +151,7 @@ export const mockInactiveMembership = (key = 'inactive-membership:default'): Ina const createdAt = faker.date.past({ refDate }).toISOString(); const userId = mockNanoid(); const contextEntityColumns = generateMockContextEntityIdColumns(); + const contextEntitySlugColumns = generateMockContextEntitySlugColumns(); const tokenId = mockNanoid(); return { @@ -158,6 +165,7 @@ export const mockInactiveMembership = (key = 'inactive-membership:default'): Ina createdAt, createdBy: mockNanoid(), ...contextEntityColumns, + ...contextEntitySlugColumns, tenantId: 'test01', // Default test tenant }; }); diff --git a/backend/mocks/utils/index.ts b/backend/mocks/utils/index.ts index 3d1c9bdd9..eef65bbf4 100644 --- a/backend/mocks/utils/index.ts +++ b/backend/mocks/utils/index.ts @@ -1,5 +1,10 @@ export { withFakerSeed } from './faker-seed'; -export { generateMockContextEntityIdColumns, type MockContextEntityIdColumns } from './mock-context-entity-id-columns'; +export { + generateMockContextEntityIdColumns, + generateMockContextEntitySlugColumns, + type MockContextEntityIdColumns, + type MockContextEntitySlugColumns, +} from './mock-context-entity-id-columns'; export { generateMockEntityCounts, type MockEntityCounts } from './mock-entity-counts'; export { generateMockFullCounts } from './mock-full-counts'; export { mockMany } from './mock-many'; diff --git a/backend/mocks/utils/mock-context-entity-id-columns.ts b/backend/mocks/utils/mock-context-entity-id-columns.ts index f90f8ed7d..3d82353ef 100644 --- a/backend/mocks/utils/mock-context-entity-id-columns.ts +++ b/backend/mocks/utils/mock-context-entity-id-columns.ts @@ -9,6 +9,14 @@ export type MockContextEntityIdColumns = { [K in ContextEntityType as (typeof appConfig.entityIdColumnKeys)[K]]: string; }; +/** + * Type for dynamically generated context entity slug columns in mocks. + * Maps each context entity type to its corresponding slug column (e.g., organization -> organizationSlug). + */ +export type MockContextEntitySlugColumns = { + [K in ContextEntityType as (typeof appConfig.entitySlugColumnKeys)[K]]: string | null; +}; + /** * Generates mock ID columns dynamically based on context entity types from appConfig. * @@ -27,3 +35,26 @@ export const generateMockContextEntityIdColumns = (mode: 'all' | 'relatable' = ' return columns as MockContextEntityIdColumns; }; + +/** + * Generates mock slug columns dynamically based on context entity types from appConfig. + * + * @param mode - 'all' includes all context entity types, 'relatable' only includes + * those in the hierarchy's relatableContextTypes. Defaults to 'all'. + * @returns An object with mock slug values for each context entity slug column. + */ +export const generateMockContextEntitySlugColumns = ( + mode: 'all' | 'relatable' = 'all', +): MockContextEntitySlugColumns => { + const entityTypes = mode === 'all' ? appConfig.contextEntityTypes : hierarchy.relatableContextTypes; + const columns = {} as Record; + + for (const entityType of entityTypes) { + const columnName = appConfig.entitySlugColumnKeys[entityType]; + if (columnName) { + columns[columnName] = `mock-${entityType}-slug`; + } + } + + return columns as MockContextEntitySlugColumns; +}; diff --git a/backend/scripts/drizzle-studio/start.ts b/backend/scripts/drizzle-studio/start.ts index 9df62954e..e22ca07e5 100644 --- a/backend/scripts/drizzle-studio/start.ts +++ b/backend/scripts/drizzle-studio/start.ts @@ -6,7 +6,7 @@ import { STUDIO_PORT } from './port'; import { checkMark } from '../../src/utils/console'; const __dirname = dirname(fileURLToPath(import.meta.url)); -const parentDir = resolve(__dirname, '..'); +const parentDir = resolve(__dirname, '../..'); // Load .env variables from the parent directory dotenv.config({ path: resolve(parentDir, '.env') }); diff --git a/backend/src/db/schema/inactive-memberships.ts b/backend/src/db/schema/inactive-memberships.ts index 998736e63..1f4bec3a6 100644 --- a/backend/src/db/schema/inactive-memberships.ts +++ b/backend/src/db/schema/inactive-memberships.ts @@ -10,6 +10,21 @@ import { nanoid } from '#/utils/nanoid'; const roleEnum = roles.all; +/** + * Generate slug columns for each context entity type dynamically. + * These store the entity slugs for quick access without needing to join. + */ +const contextEntitySlugColumns = appConfig.contextEntityTypes.reduce( + (acc, entityType) => { + const slugColumnKey = appConfig.entitySlugColumnKeys[entityType]; + if (slugColumnKey) { + acc[slugColumnKey] = varchar({ length: maxLength.field }); + } + return acc; + }, + {} as Record>, +); + /** Inactive memberships track pending invitations and rejected membership requests. */ export const inactiveMembershipsTable = pgTable( 'inactive_memberships', @@ -31,6 +46,8 @@ export const inactiveMembershipsTable = pgTable( organizationId: varchar({ length: maxLength.id }) .notNull() .references(() => organizationsTable.id, { onDelete: 'cascade' }), + // Dynamic slug columns for each context entity type + ...contextEntitySlugColumns, }, (table) => [ index('inactive_memberships_user_id_idx').on(table.userId), @@ -38,6 +55,14 @@ export const inactiveMembershipsTable = pgTable( index('inactive_memberships_tenant_id_idx').on(table.tenantId), index('inactive_memberships_email_idx').on(table.email), index('inactive_memberships_org_pending_idx').on(table.organizationId, table.rejectedAt), + // Indexes for slug columns + ...appConfig.contextEntityTypes + .filter((t) => appConfig.entitySlugColumnKeys[t]) + .map((t) => + index(`inactive_memberships_${appConfig.entitySlugColumnKeys[t]}_idx`).on( + table[appConfig.entitySlugColumnKeys[t] as keyof typeof table], + ), + ), // Include contextType + all entity ID columns so forks with additional context types // get proper uniqueness. nullsNotDistinct treats NULLs as equal. unique('inactive_memberships_tenant_email_ctx') diff --git a/backend/src/db/schema/memberships.ts b/backend/src/db/schema/memberships.ts index dc1c4e318..920a7d2c5 100644 --- a/backend/src/db/schema/memberships.ts +++ b/backend/src/db/schema/memberships.ts @@ -11,6 +11,21 @@ import { nanoid } from '#/utils/nanoid'; const roleEnum = roles.all; +/** + * Generate slug columns for each context entity type dynamically. + * These store the entity slugs for quick access without needing to join. + */ +const contextEntitySlugColumns = appConfig.contextEntityTypes.reduce( + (acc, entityType) => { + const slugColumnKey = appConfig.entitySlugColumnKeys[entityType]; + if (slugColumnKey) { + acc[slugColumnKey] = varchar({ length: maxLength.field }); + } + return acc; + }, + {} as Record>, +); + /** * Memberships table to track active memberships of users in organizations and other context entities. * Each membership belongs to exactly one tenant (RLS isolation boundary). @@ -39,12 +54,22 @@ export const membershipsTable = pgTable( organizationId: varchar({ length: maxLength.id }) .notNull() .references(() => organizationsTable.id, { onDelete: 'cascade' }), + // Dynamic slug columns for each context entity type + ...contextEntitySlugColumns, }, (table) => [ index('memberships_user_id_idx').on(table.userId), index('memberships_organization_id_idx').on(table.organizationId), index('memberships_tenant_id_idx').on(table.tenantId), index('memberships_context_org_role_idx').on(table.contextType, table.organizationId, table.role), + // Indexes for slug columns + ...appConfig.contextEntityTypes + .filter((t) => appConfig.entitySlugColumnKeys[t]) + .map((t) => + index(`memberships_${appConfig.entitySlugColumnKeys[t]}_idx`).on( + table[appConfig.entitySlugColumnKeys[t] as keyof typeof table], + ), + ), // Include contextType + all entity ID columns so forks with additional context types // (e.g. workspace, project) get proper uniqueness without manual schema changes. // nullsNotDistinct ensures NULL entity IDs are treated as equal, preventing duplicates. diff --git a/backend/src/modules/memberships/helpers/index.ts b/backend/src/modules/memberships/helpers/index.ts index a85f65380..2b7a74cc1 100644 --- a/backend/src/modules/memberships/helpers/index.ts +++ b/backend/src/modules/memberships/helpers/index.ts @@ -58,6 +58,38 @@ export const getBaseMembershipEntityId = (entity: E ); }; +/** + * Returns an object mapping base membership entity slugs for the given entity. + * + * Each mapping corresponds to a context entity type defined in `appConfig.contextEntityTypes`. + * The key of each mapping is derived from the values of `appConfig.entitySlugColumnKeys` + * (e.g. `"organizationSlug"`, `"workspaceSlug"`), and the value is the corresponding string slug. + * Some slugs may be null if not available. + * + * @template T - The specific context entity type. + * @param entity - The entity object to extract membership slug information from. + * @returns An object mapping base membership entity slugs for the given entity. + */ +export const getBaseMembershipEntitySlugs = (entity: EntityModel) => { + return appConfig.contextEntityTypes.reduce( + (acc, contextEntityType) => { + const entityFieldSlugName = appConfig.entitySlugColumnKeys[contextEntityType]; + if (!entityFieldSlugName) return acc; + + if (entity.entityType === contextEntityType) { + // For the entity itself, use its slug if available + acc[entityFieldSlugName] = (entity as unknown as Record).slug ?? null; + } else if (entityFieldSlugName in entity) { + // For parent entities, the slug may be stored in the entity + acc[entityFieldSlugName] = entity[entityFieldSlugName as keyof typeof entity] as string | null; + } + + return acc; + }, + {} as Record<(typeof appConfig.entitySlugColumnKeys)[ContextEntityType], string | null>, + ); +}; + /** * Batch insert direct memberships for existing users. The function assumes that * the data is already deduped, normalized and valid. @@ -104,6 +136,9 @@ export const insertMemberships = async ( // Get organizationId: prefer entity.organizationId if present, else entity.id (organization) const targetEntitiesIdColumnKeys = getBaseMembershipEntityId(entity); + // Get entity slugs for quick access without joins + const targetEntitiesSlugColumnKeys = getBaseMembershipEntitySlugs(entity); + // Compute incremental order per user: start from global max, then +10 per assignment const prevMax = maxOrdersByUser.get(userId) ?? 0; const alreadyAssigned = assignedCounts.get(userId) ?? 0; @@ -120,7 +155,7 @@ export const insertMemberships = async ( displayOrder: nextOrder, } as const; - return { targetEntitiesIdColumnKeys, baseMembership, entity }; + return { targetEntitiesIdColumnKeys, targetEntitiesSlugColumnKeys, baseMembership, entity }; }); /** @@ -130,19 +165,29 @@ export const insertMemberships = async ( */ const rootRows: InsertMembershipModel[] = prepared .filter(({ entity }) => entity.entityType !== rootContextType) - .map(({ baseMembership, targetEntitiesIdColumnKeys, entity }) => { + .map(({ baseMembership, targetEntitiesIdColumnKeys, targetEntitiesSlugColumnKeys, entity }) => { return { ...baseMembership, tenantId: entity.tenantId, role: 'member', // parent membership is always 'member' [rootIdColumnKey]: targetEntitiesIdColumnKeys[rootIdColumnKey], contextType: rootContextType, + // Include slugs for the root context entity + ...Object.entries(targetEntitiesSlugColumnKeys).reduce( + (acc, [key, value]) => { + if (key === appConfig.entitySlugColumnKeys[rootContextType]) { + acc[key] = value; + } + return acc; + }, + {} as Record, + ), } as InsertMembershipModel; }); // Build associated entity membership rows (when an associated relationship exists) const associatedRows = prepared - .map(({ baseMembership, targetEntitiesIdColumnKeys, entity }) => { + .map(({ baseMembership, targetEntitiesIdColumnKeys, targetEntitiesSlugColumnKeys, entity }) => { // Find a associated relationship for this entity type const relation = appConfig.menuStructure.find((rel) => rel.subentityType === entity.entityType); if (!relation) return null; @@ -158,11 +203,16 @@ export const insertMemberships = async ( const targetEntityIdColumnKey = appConfig.entityIdColumnKeys[entity.entityType]; const { [targetEntityIdColumnKey]: _, ...remainingIdColumnKeys } = targetEntitiesIdColumnKeys; + // Get the target entity's slug field to exclude it + const targetEntitySlugColumnKey = appConfig.entitySlugColumnKeys[entity.entityType]; + const { [targetEntitySlugColumnKey]: __, ...remainingSlugColumnKeys } = targetEntitiesSlugColumnKeys; + return { ...baseMembership, tenantId: entity.tenantId, role: 'member', // parent/associated membership is always 'member' ...remainingIdColumnKeys, + ...remainingSlugColumnKeys, contextType: associatedType, } as InsertMembershipModel; }) @@ -170,11 +220,12 @@ export const insertMemberships = async ( // Build target entity membership rows (the ones we return after insert) const targetRows: InsertMembershipModel[] = prepared.map( - ({ baseMembership, targetEntitiesIdColumnKeys, entity }) => ({ + ({ baseMembership, targetEntitiesIdColumnKeys, targetEntitiesSlugColumnKeys, entity }) => ({ ...baseMembership, tenantId: entity.tenantId, contextType: entity.entityType, ...targetEntitiesIdColumnKeys, + ...targetEntitiesSlugColumnKeys, }), ); diff --git a/backend/src/modules/memberships/memberships-handlers.ts b/backend/src/modules/memberships/memberships-handlers.ts index 2c1a9c1c4..8327082c6 100644 --- a/backend/src/modules/memberships/memberships-handlers.ts +++ b/backend/src/modules/memberships/memberships-handlers.ts @@ -14,7 +14,11 @@ import { type Env } from '#/lib/context'; import { AppError } from '#/lib/error'; import { mailer } from '#/lib/mailer'; import { resolveEntity } from '#/lib/resolve-entity'; -import { getBaseMembershipEntityId, insertMemberships } from '#/modules/memberships/helpers'; +import { + getBaseMembershipEntityId, + getBaseMembershipEntitySlugs, + insertMemberships, +} from '#/modules/memberships/helpers'; import { membershipBaseSelect } from '#/modules/memberships/helpers/select'; import membershipRoutes from '#/modules/memberships/memberships-routes'; import { memberSelect, userBaseSelect } from '#/modules/user/helpers/select'; @@ -205,6 +209,7 @@ const membershipsRouteHandlers = app contextType: entityType, tenantId: ctx.var.tenantId, ...getBaseMembershipEntityId(entity), + ...getBaseMembershipEntitySlugs(entity), })); inactiveMembershipsToInsert.push(...inactiveMembershipsForExistingUsers); @@ -300,6 +305,7 @@ const membershipsRouteHandlers = app tokenId: tokensByEmail.get(email)!, // link inactive membership → token tenantId: ctx.var.tenantId, ...getBaseMembershipEntityId(entity), + ...getBaseMembershipEntitySlugs(entity), })); inactiveMembershipsToInsert.push(...newUserInactiveMemberships); diff --git a/cella.config.ts b/cella.config.ts index 422c7ad15..269b8a138 100644 --- a/cella.config.ts +++ b/cella.config.ts @@ -61,7 +61,6 @@ export default defineConfig({ "frontend/public/favicon.svg", "frontend/public/static/openapi.json", "frontend/src/nav-config.tsx", - "frontend/src/routes-resolver.ts", "frontend/src/routes-config.tsx", "frontend/src/menu-config.tsx", "frontend/src/alert-config.tsx", diff --git a/frontend/public/static/docs.gen/details.gen/me.gen.json b/frontend/public/static/docs.gen/details.gen/me.gen.json index 57847c4ae..322105b89 100644 --- a/frontend/public/static/docs.gen/details.gen/me.gen.json +++ b/frontend/public/static/docs.gen/details.gen/me.gen.json @@ -898,6 +898,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } }, "ref": "#/components/schemas/InactiveMembership" @@ -934,6 +939,7 @@ "createdAt": "2024-11-13T18:39:21.444Z", "createdBy": "5w1ul2bx3ld4na8k0ts708fo", "organizationId": "ft7nt6w77qphfz9detwtt178", + "organizationSlug": "mock-organization-slug", "tenantId": "test01" } }, @@ -960,6 +966,7 @@ "createdAt": "2024-04-12T10:35:38.557Z", "createdBy": "gtt9htxwawq5tdvqh553onul", "organizationId": "okmsol2r5n4cy72j57t1tgy0", + "organizationSlug": "mock-organization-slug", "tenantId": "test01" } } @@ -1354,6 +1361,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } }, "ref": "#/components/schemas/MembershipBase" diff --git a/frontend/public/static/docs.gen/details.gen/memberships.gen.json b/frontend/public/static/docs.gen/details.gen/memberships.gen.json index 00bd3bd83..368bea757 100644 --- a/frontend/public/static/docs.gen/details.gen/memberships.gen.json +++ b/frontend/public/static/docs.gen/details.gen/memberships.gen.json @@ -55,6 +55,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } }, "ref": "#/components/schemas/MembershipBase" @@ -83,6 +88,7 @@ "contextType": "organization", "userId": "avw3f7pkm7vsxl2157n34cen", "organizationId": "80754cxm7om1aq3batq3hdpx", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 32, "muted": false, @@ -354,6 +360,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } }, "ref": "#/components/schemas/Membership", @@ -364,6 +375,7 @@ "contextType": "organization", "userId": "xg7596t8jiy8d0v8irrljzhy", "organizationId": "7ul53b62aw5h7k6x44nbu2r5", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 49, "muted": false, @@ -688,6 +700,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } }, "ref": "#/components/schemas/MembershipBase" @@ -726,6 +743,7 @@ "contextType": "organization", "userId": "gu87zf240qkfh0faoqjip69q", "organizationId": "fpb1r33xdbp099f3xi8028r0", + "organizationSlug": "mock-organization-slug", "role": "member", "displayOrder": 38, "muted": false, @@ -757,6 +775,7 @@ "contextType": "organization", "userId": "ilwj64zmkwsnsmrzo2zxd2hr", "organizationId": "eylomg4p6xgvt4g11e2hqqxx", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 7, "muted": false, @@ -914,6 +933,7 @@ "createdAt": "2024-11-21T04:00:59.122Z", "createdBy": "ikgme3gy3a9lhe0ctrmzc53x", "organizationId": "9xn03u76eo7z71y60a882cwp", + "organizationSlug": "mock-organization-slug", "tenantId": "test01" }, { @@ -927,6 +947,7 @@ "createdAt": "2024-10-29T08:46:20.790Z", "createdBy": "e44bpmhsyauxcwuwjsrzvzac", "organizationId": "clxs8vayzrul7vmeyahbgyu0", + "organizationSlug": "mock-organization-slug", "tenantId": "test01" } ], diff --git a/frontend/public/static/docs.gen/details.gen/organizations.gen.json b/frontend/public/static/docs.gen/details.gen/organizations.gen.json index 916bdbb3f..f8645b9db 100644 --- a/frontend/public/static/docs.gen/details.gen/organizations.gen.json +++ b/frontend/public/static/docs.gen/details.gen/organizations.gen.json @@ -177,6 +177,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } }, "ref": "#/components/schemas/MembershipBase" @@ -276,6 +281,7 @@ "contextType": "organization", "userId": "1t4n7coocr6ixfzcb6x5wab0", "organizationId": "kzmv5qbhdcqeiuvwlosan0fc", + "organizationSlug": "mock-organization-slug", "role": "member", "displayOrder": 95, "muted": false, @@ -330,6 +336,7 @@ "contextType": "organization", "userId": "u4oy2u1m55abgsmrl1zezeoj", "organizationId": "p3t0ygxx0aa83en3sk1fs1we", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 20, "muted": false, @@ -696,6 +703,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } }, "ref": "#/components/schemas/MembershipBase" @@ -785,6 +797,7 @@ "contextType": "organization", "userId": "gu87zf240qkfh0faoqjip69q", "organizationId": "qqp8d07imsvjbtqtl3rtjgxd", + "organizationSlug": "mock-organization-slug", "role": "member", "displayOrder": 38, "muted": false, @@ -839,6 +852,7 @@ "contextType": "organization", "userId": "ilwj64zmkwsnsmrzo2zxd2hr", "organizationId": "hg5ogh3yr2b2dbwf7b9eckaj", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 7, "muted": false, @@ -1108,6 +1122,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } }, "ref": "#/components/schemas/MembershipBase" @@ -1191,6 +1210,7 @@ "contextType": "organization", "userId": "36vxzq0rzt4pucvepsu63uw1", "organizationId": "hmo9fwr239kqavr3yur671kl", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 69, "muted": false, @@ -1445,6 +1465,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } }, "ref": "#/components/schemas/MembershipBase" @@ -1528,6 +1553,7 @@ "contextType": "organization", "userId": "36vxzq0rzt4pucvepsu63uw1", "organizationId": "hmo9fwr239kqavr3yur671kl", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 69, "muted": false, diff --git a/frontend/public/static/docs.gen/details.gen/users.gen.json b/frontend/public/static/docs.gen/details.gen/users.gen.json index 878d3878f..62c81d652 100644 --- a/frontend/public/static/docs.gen/details.gen/users.gen.json +++ b/frontend/public/static/docs.gen/details.gen/users.gen.json @@ -145,6 +145,7 @@ "contextType": "organization", "userId": "gu87zf240qkfh0faoqjip69q", "organizationId": "fpb1r33xdbp099f3xi8028r0", + "organizationSlug": "mock-organization-slug", "role": "member", "displayOrder": 38, "muted": false, @@ -180,6 +181,7 @@ "contextType": "organization", "userId": "ilwj64zmkwsnsmrzo2zxd2hr", "organizationId": "eylomg4p6xgvt4g11e2hqqxx", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 7, "muted": false, diff --git a/frontend/public/static/docs.gen/schemas.gen.json b/frontend/public/static/docs.gen/schemas.gen.json index b19e3096a..62a3519aa 100644 --- a/frontend/public/static/docs.gen/schemas.gen.json +++ b/frontend/public/static/docs.gen/schemas.gen.json @@ -142,6 +142,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } } }, @@ -153,6 +158,7 @@ "contextType": "organization", "userId": "avw3f7pkm7vsxl2157n34cen", "organizationId": "80754cxm7om1aq3batq3hdpx", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 32, "muted": false, @@ -1138,6 +1144,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } } }, @@ -1154,6 +1165,7 @@ "createdAt": "2024-02-08T11:19:07.168Z", "createdBy": "n0dfrh6s450ooxn5tb992nwz", "organizationId": "9angnio9zojjlzk3croh621f", + "organizationSlug": "mock-organization-slug", "tenantId": "test01" } }, @@ -1447,6 +1459,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } }, "ref": "#/components/schemas/MembershipBase" @@ -1530,6 +1547,7 @@ "contextType": "organization", "userId": "36vxzq0rzt4pucvepsu63uw1", "organizationId": "hmo9fwr239kqavr3yur671kl", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 69, "muted": false, @@ -1907,6 +1925,11 @@ "type": "string", "required": true, "maxLength": 50 + }, + "organizationSlug": { + "type": ["string", "null"], + "required": true, + "maxLength": 255 } } }, @@ -1917,6 +1940,7 @@ "contextType": "organization", "userId": "xg7596t8jiy8d0v8irrljzhy", "organizationId": "7ul53b62aw5h7k6x44nbu2r5", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 49, "muted": false, diff --git a/frontend/public/static/openapi.json b/frontend/public/static/openapi.json index 51ef5588e..78d9b415c 100644 --- a/frontend/public/static/openapi.json +++ b/frontend/public/static/openapi.json @@ -382,6 +382,13 @@ "organizationId": { "type": "string", "maxLength": 50 + }, + "organizationSlug": { + "type": [ + "string", + "null" + ], + "maxLength": 255 } }, "required": [ @@ -393,7 +400,8 @@ "archived", "muted", "displayOrder", - "organizationId" + "organizationId", + "organizationSlug" ], "description": "Core membership fields shared across active and inactive memberships.", "example": { @@ -402,6 +410,7 @@ "contextType": "organization", "userId": "avw3f7pkm7vsxl2157n34cen", "organizationId": "80754cxm7om1aq3batq3hdpx", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 32, "muted": false, @@ -1422,6 +1431,13 @@ "organizationId": { "type": "string", "maxLength": 50 + }, + "organizationSlug": { + "type": [ + "string", + "null" + ], + "maxLength": 255 } }, "required": [ @@ -1435,7 +1451,8 @@ "role", "rejectedAt", "createdBy", - "organizationId" + "organizationId", + "organizationSlug" ], "description": "A membership record for a user who has not yet accepted an invitation.", "example": { @@ -1449,6 +1466,7 @@ "createdAt": "2024-02-08T11:19:07.168Z", "createdBy": "n0dfrh6s450ooxn5tb992nwz", "organizationId": "9angnio9zojjlzk3croh621f", + "organizationSlug": "mock-organization-slug", "tenantId": "test01" } }, @@ -1924,6 +1942,7 @@ "contextType": "organization", "userId": "36vxzq0rzt4pucvepsu63uw1", "organizationId": "hmo9fwr239kqavr3yur671kl", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 69, "muted": false, @@ -2354,6 +2373,13 @@ "organizationId": { "type": "string", "maxLength": 50 + }, + "organizationSlug": { + "type": [ + "string", + "null" + ], + "maxLength": 255 } }, "required": [ @@ -2369,7 +2395,8 @@ "archived", "muted", "displayOrder", - "organizationId" + "organizationId", + "organizationSlug" ], "description": "A user's membership in a context entity, including role and activity data.", "example": { @@ -2377,6 +2404,7 @@ "contextType": "organization", "userId": "xg7596t8jiy8d0v8irrljzhy", "organizationId": "7ul53b62aw5h7k6x44nbu2r5", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 49, "muted": false, @@ -5065,6 +5093,7 @@ "createdAt": "2024-11-13T18:39:21.444Z", "createdBy": "5w1ul2bx3ld4na8k0ts708fo", "organizationId": "ft7nt6w77qphfz9detwtt178", + "organizationSlug": "mock-organization-slug", "tenantId": "test01" } }, @@ -5091,6 +5120,7 @@ "createdAt": "2024-04-12T10:35:38.557Z", "createdBy": "gtt9htxwawq5tdvqh553onul", "organizationId": "okmsol2r5n4cy72j57t1tgy0", + "organizationSlug": "mock-organization-slug", "tenantId": "test01" } } @@ -7817,6 +7847,7 @@ "contextType": "organization", "userId": "36vxzq0rzt4pucvepsu63uw1", "organizationId": "hmo9fwr239kqavr3yur671kl", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 69, "muted": false, @@ -7905,6 +7936,7 @@ "contextType": "organization", "userId": "1t4n7coocr6ixfzcb6x5wab0", "organizationId": "kzmv5qbhdcqeiuvwlosan0fc", + "organizationSlug": "mock-organization-slug", "role": "member", "displayOrder": 95, "muted": false, @@ -7966,6 +7998,7 @@ "contextType": "organization", "userId": "u4oy2u1m55abgsmrl1zezeoj", "organizationId": "p3t0ygxx0aa83en3sk1fs1we", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 20, "muted": false, @@ -8297,6 +8330,7 @@ "contextType": "organization", "userId": "gu87zf240qkfh0faoqjip69q", "organizationId": "qqp8d07imsvjbtqtl3rtjgxd", + "organizationSlug": "mock-organization-slug", "role": "member", "displayOrder": 38, "muted": false, @@ -8358,6 +8392,7 @@ "contextType": "organization", "userId": "ilwj64zmkwsnsmrzo2zxd2hr", "organizationId": "hg5ogh3yr2b2dbwf7b9eckaj", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 7, "muted": false, @@ -8506,6 +8541,7 @@ "contextType": "organization", "userId": "36vxzq0rzt4pucvepsu63uw1", "organizationId": "hmo9fwr239kqavr3yur671kl", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 69, "muted": false, @@ -8771,6 +8807,7 @@ "contextType": "organization", "userId": "36vxzq0rzt4pucvepsu63uw1", "organizationId": "hmo9fwr239kqavr3yur671kl", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 69, "muted": false, @@ -9746,6 +9783,7 @@ "contextType": "organization", "userId": "gu87zf240qkfh0faoqjip69q", "organizationId": "fpb1r33xdbp099f3xi8028r0", + "organizationSlug": "mock-organization-slug", "role": "member", "displayOrder": 38, "muted": false, @@ -9781,6 +9819,7 @@ "contextType": "organization", "userId": "ilwj64zmkwsnsmrzo2zxd2hr", "organizationId": "eylomg4p6xgvt4g11e2hqqxx", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 7, "muted": false, @@ -11121,6 +11160,7 @@ "contextType": "organization", "userId": "avw3f7pkm7vsxl2157n34cen", "organizationId": "80754cxm7om1aq3batq3hdpx", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 32, "muted": false, @@ -11377,6 +11417,7 @@ "contextType": "organization", "userId": "xg7596t8jiy8d0v8irrljzhy", "organizationId": "7ul53b62aw5h7k6x44nbu2r5", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 49, "muted": false, @@ -11792,6 +11833,7 @@ "contextType": "organization", "userId": "gu87zf240qkfh0faoqjip69q", "organizationId": "fpb1r33xdbp099f3xi8028r0", + "organizationSlug": "mock-organization-slug", "role": "member", "displayOrder": 38, "muted": false, @@ -11823,6 +11865,7 @@ "contextType": "organization", "userId": "ilwj64zmkwsnsmrzo2zxd2hr", "organizationId": "eylomg4p6xgvt4g11e2hqqxx", + "organizationSlug": "mock-organization-slug", "role": "admin", "displayOrder": 7, "muted": false, @@ -12043,6 +12086,7 @@ "createdAt": "2024-11-21T04:00:59.122Z", "createdBy": "ikgme3gy3a9lhe0ctrmzc53x", "organizationId": "9xn03u76eo7z71y60a882cwp", + "organizationSlug": "mock-organization-slug", "tenantId": "test01" }, { @@ -12056,6 +12100,7 @@ "createdAt": "2024-10-29T08:46:20.790Z", "createdBy": "e44bpmhsyauxcwuwjsrzvzac", "organizationId": "clxs8vayzrul7vmeyahbgyu0", + "organizationSlug": "mock-organization-slug", "tenantId": "test01" } ], diff --git a/frontend/src/api.gen/types.gen.ts b/frontend/src/api.gen/types.gen.ts index dab873d5a..866fbf83f 100644 --- a/frontend/src/api.gen/types.gen.ts +++ b/frontend/src/api.gen/types.gen.ts @@ -48,6 +48,7 @@ export type MembershipBase = { muted: boolean; displayOrder: number; organizationId: string; + organizationSlug: string | null; }; /** @@ -251,6 +252,7 @@ export type InactiveMembership = { rejectedAt: string | null; createdBy: string; organizationId: string; + organizationSlug: string | null; }; /** @@ -447,6 +449,7 @@ export type Membership = { muted: boolean; displayOrder: number; organizationId: string; + organizationSlug: string | null; }; export type GetActivitiesData = { diff --git a/frontend/src/api.gen/zod.gen.ts b/frontend/src/api.gen/zod.gen.ts index b314a0c98..19c56f401 100644 --- a/frontend/src/api.gen/zod.gen.ts +++ b/frontend/src/api.gen/zod.gen.ts @@ -46,6 +46,7 @@ export const zMembershipBase = z.object({ muted: z.boolean(), displayOrder: z.number().gte(-140737488355328).lte(140737488355327), organizationId: z.string().max(50), + organizationSlug: z.union([z.string().max(255), z.null()]), }); /** @@ -255,6 +256,7 @@ export const zInactiveMembership = z.object({ rejectedAt: z.union([z.string(), z.null()]), createdBy: z.string().max(50), organizationId: z.string().max(50), + organizationSlug: z.union([z.string().max(255), z.null()]), }); /** @@ -441,6 +443,7 @@ export const zMembership = z.object({ muted: z.boolean(), displayOrder: z.number().gte(-140737488355328).lte(140737488355327), organizationId: z.string().max(50), + organizationSlug: z.union([z.string().max(255), z.null()]), }); export const zGetActivitiesData = z.object({ diff --git a/frontend/src/modules/common/page/header.tsx b/frontend/src/modules/common/page/header.tsx index d612277d8..5e1ba1e88 100644 --- a/frontend/src/modules/common/page/header.tsx +++ b/frontend/src/modules/common/page/header.tsx @@ -17,7 +17,7 @@ import { } from '~/modules/ui/breadcrumb'; import { useFindInListCache } from '~/query/basic'; import { useMembershipForEntity } from '~/query/membership-enrichment'; -import { getContextEntityRoute } from '~/routes-resolver'; +import { baseEntityRoutes } from '~/routes-config'; type PageHeaderProps = Omit & { entity: ContextEntityBase | UserBase; @@ -42,8 +42,20 @@ export function PageHeader({ entity, panel, parent, disableScroll, ...coverProps // Scroll to page header on load if (!disableScroll) useScrollTo(scrollToRef); - // Get parent route using app-specific resolver (handles hierarchy differences per fork) - const parentRoute = parentData ? getContextEntityRoute(parentData) : null; + // Build parent route - use membership slug first, fallback to entity slug/id + const parentRoute = parentData + ? { + to: baseEntityRoutes[parentData.entityType], + params: { + tenantId: parentData.tenantId, + orgSlug: + (parentData as unknown as { membership?: { organizationSlug?: string | null } }).membership + ?.organizationSlug ?? + parentData.slug ?? + parentData.id, + }, + } + : null; return (
diff --git a/frontend/src/modules/entities/entity-grid/tile.tsx b/frontend/src/modules/entities/entity-grid/tile.tsx index c34156628..42fe15870 100644 --- a/frontend/src/modules/entities/entity-grid/tile.tsx +++ b/frontend/src/modules/entities/entity-grid/tile.tsx @@ -6,7 +6,7 @@ import { AvatarWrap } from '~/modules/common/avatar-wrap'; import type { ContextEntity } from '~/modules/entities/types'; import { Badge } from '~/modules/ui/badge'; import { Card, CardContent, CardFooter } from '~/modules/ui/card'; -import { getContextEntityRoute } from '~/routes-resolver'; +import { baseEntityRoutes } from '~/routes-config'; import { dateShort } from '~/utils/date-short'; import { numberToColorClass } from '~/utils/number-to-color-class'; @@ -14,14 +14,16 @@ import { numberToColorClass } from '~/utils/number-to-color-class'; * Tile component to display an entity in a grid layout. */ export const EntityGridTile = ({ entity }: { entity: ContextEntity & Pick }) => { - const { to, params, search } = getContextEntityRoute(entity); + // Build route - use membership slug first, fallback to entity slug/id + const entitySlug = entity.membership?.organizationSlug ?? entity.slug ?? entity.id; + const to = baseEntityRoutes[entity.entityType]; + const params = { tenantId: entity.tenantId, orgSlug: entitySlug }; return ( {typeof window !== 'undefined' && ( diff --git a/frontend/src/modules/navigation/app-search.tsx b/frontend/src/modules/navigation/app-search.tsx index de8dc7f7d..ae8622ed8 100644 --- a/frontend/src/modules/navigation/app-search.tsx +++ b/frontend/src/modules/navigation/app-search.tsx @@ -15,7 +15,7 @@ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, Command import { ScrollArea } from '~/modules/ui/scroll-area'; import { usersListQueryOptions } from '~/modules/user/query'; import { getContextEntityTypeToListQueries } from '~/offline-config'; -import { getContextEntityRoute } from '~/routes-resolver'; +import { baseEntityRoutes } from '~/routes-config'; import { useNavigationStore } from '~/store/navigation'; // Define searchable entity types @@ -106,8 +106,12 @@ export const AppSearch = () => { if (item.entityType === 'user') { navigate({ to: '.', search: (prev) => ({ ...prev, userSheetId: item.id }), resetScroll: false }); } else { - const { to, params, search } = getContextEntityRoute(item); - navigate({ to, params, search, resetScroll: false }); + // Build route - use membership slug first, fallback to entity slug/id + const entity = item as ContextEntity; + const entitySlug = entity.membership?.organizationSlug ?? entity.slug ?? entity.id; + const to = baseEntityRoutes[entity.entityType]; + const params = { tenantId: entity.tenantId, orgSlug: entitySlug }; + navigate({ to, params, resetScroll: false }); } useDialoger.getState().remove(); diff --git a/frontend/src/modules/navigation/menu-sheet/item.tsx b/frontend/src/modules/navigation/menu-sheet/item.tsx index 874fcaf39..722f833a5 100644 --- a/frontend/src/modules/navigation/menu-sheet/item.tsx +++ b/frontend/src/modules/navigation/menu-sheet/item.tsx @@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next'; import { AvatarWrap } from '~/modules/common/avatar-wrap'; import { toaster } from '~/modules/common/toaster/service'; import type { UserMenuItem } from '~/modules/me/types'; -import { getContextEntityRoute } from '~/routes-resolver'; +import { baseEntityRoutes } from '~/routes-config'; import { useUIStore } from '~/store/ui'; import { cn } from '~/utils/cn'; @@ -25,8 +25,10 @@ export const MenuSheetItem = ({ item, icon: Icon, className, searchResults }: Me const canAccess = offlineAccess ? (isOnline ? true : !item.membership.archived) : true; const isSubitem = !searchResults && !item.submenu; - // Build route path for the entity - const { to, params, search } = getContextEntityRoute(item, isSubitem); + // Build route path for the entity - use membership slug first, fallback to entity slug/id + const entitySlug = item.membership.organizationSlug ?? item.slug ?? item.id; + const to = baseEntityRoutes[item.entityType]; + const params = { tenantId: item.tenantId, orgSlug: entitySlug }; return ( { - const { entityType, id, slug, tenantId } = item; - - const to = baseEntityRoutes[entityType]; - - // Organization routes use tenantId and orgSlug params - // Currently cella only has organization as context entity type - return { to, params: { tenantId, orgSlug: slug || id }, search: {} }; -}; diff --git a/frontend/vite/openapi-parser/tests/__snapshots__/parse-spec.test.ts.snap b/frontend/vite/openapi-parser/tests/__snapshots__/parse-spec.test.ts.snap index 03249b17a..da7452f85 100644 --- a/frontend/vite/openapi-parser/tests/__snapshots__/parse-spec.test.ts.snap +++ b/frontend/vite/openapi-parser/tests/__snapshots__/parse-spec.test.ts.snap @@ -2,7 +2,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` { - "inputHash": "8c3f70a24bcf25b3", + "inputHash": "9a4d1e6b416dced1", "output": { "info": { "description": "⚠️ ATTENTION: PRERELEASE! @@ -1114,30 +1114,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "system", ], }, - { - "deprecated": false, - "description": "Returns a list of *users*.", - "extensions": { - "xCache": [], - "xGuard": [ - "authGuard", - "sysAdminGuard", - ], - "xRateLimiter": [], - }, - "hasExample": true, - "hasParams": true, - "hasRequestBody": false, - "hasResponseBody": true, - "hash": "tag/system/GET/system", - "id": "getUsers", - "method": "get", - "path": "/system", - "summary": "Get list of users", - "tags": [ - "system", - ], - }, { "deprecated": false, "description": "Deletes one or more *users* from the system based on a list of IDs. This also removes the user's memberships (cascade) and sets references to the user to \`null\` where applicable.", @@ -1419,7 +1395,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "hasExample": false, "hasParams": false, "hasRequestBody": true, - "hasResponseBody": false, + "hasResponseBody": true, "hash": "tag/requests/DELETE/requests", "id": "deleteRequests", "method": "delete", @@ -1761,7 +1737,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "hasExample": false, "hasParams": true, "hasRequestBody": true, - "hasResponseBody": false, + "hasResponseBody": true, "hash": "tag/pages/DELETE/{tenantId}/pages", "id": "deletePages", "method": "delete", @@ -1798,12 +1774,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, { "deprecated": false, - "description": "Returns a list of *users* in an organization context.", + "description": "Returns a list of *users*.", "extensions": { "xCache": [], "xGuard": [ "authGuard", - "tenantGuard", + "crossTenantGuard", ], "xRateLimiter": [], }, @@ -1811,10 +1787,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "hasParams": true, "hasRequestBody": false, "hasResponseBody": true, - "hash": "tag/users/GET/{tenantId}/{orgId}/users", + "hash": "tag/users/GET/users", "id": "getUsers", "method": "get", - "path": "/{tenantId}/{orgId}/users", + "path": "/users", "summary": "Get list of users", "tags": [ "users", @@ -1822,12 +1798,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, { "deprecated": false, - "description": "Retrieves a *user* by ID in an organization context. Pass \`?slug=true\` to resolve by slug instead.", + "description": "Retrieves a *user* by ID. The requesting user must share at least one context entity membership. Pass \`?slug=true\` to resolve by slug instead.", "extensions": { "xCache": [], "xGuard": [ "authGuard", - "tenantGuard", + "crossTenantGuard", ], "xRateLimiter": [], }, @@ -1835,10 +1811,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "hasParams": true, "hasRequestBody": false, "hasResponseBody": true, - "hash": "tag/users/GET/{tenantId}/{orgId}/users/{userId}", + "hash": "tag/users/GET/users/{userId}", "id": "getUser", "method": "get", - "path": "/{tenantId}/{orgId}/users/{userId}", + "path": "/users/{userId}", "summary": "Get user", "tags": [ "users", @@ -2179,7 +2155,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "name": "base", }, { - "count": 15, + "count": 13, "description": "Complete data schemas", "name": "data", }, @@ -2271,10 +2247,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "Base schema for entities with memberships (e.g. organization).", "example": { "bannerUrl": null, "createdAt": "2024-09-15T16:29:26.122Z", - "description": "Automated eco-centric open architecture", "entityType": "organization", "id": "bafp6iiu2dt74olfvl618xur", "modifiedAt": "2024-12-04T06:32:26.983Z", @@ -2298,13 +2274,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, "type": "string", }, - "description": { - "required": true, - "type": [ - "string", - "null", - ], - }, "entityType": { "enum": [ "organization", @@ -2349,6 +2318,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "Core membership fields shared across active and inactive memberships.", "example": { "archived": false, "contextType": "organization", @@ -2356,6 +2326,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "vn86f6g3ci8ybeh37sz3gscf", "muted": false, "organizationId": "80754cxm7om1aq3batq3hdpx", + "organizationSlug": "mock-organization-slug", "role": "admin", "tenantId": "gmpj3u", "userId": "avw3f7pkm7vsxl2157n34cen", @@ -2382,6 +2353,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "number", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -2390,9 +2362,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "role": { "enum": [ "admin", @@ -2402,10 +2383,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -2416,11 +2399,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "example": { "fieldVersions": { "name": 1, }, - "id": "oucavr5r34v981pcrg8lwo1m", + "mutationId": "oucavr5r34v981pcrg8lwo1m", "sourceId": "wd4527bghf5s4igm3ddc22cy", "version": 2, }, @@ -2432,7 +2416,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -2451,26 +2435,27 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "Realtime notification delivered via SSE for entity and membership changes.", "example": { "action": "update", - "cacheToken": "GhED0dmvcIKucngWTXW94wdNnjfgQkom", + "cacheToken": "UyMeEcuBnWoD28KSeQr21dJgZDmxiD2W", "contextType": null, - "entityId": "r6fj30k69pgq5wresno8gbti", - "entityType": "page", - "organizationId": "nocwhipwzpzyyyf0gv66b9yz", + "entityId": "gj2w2bwxrkgnv0oa592jxwar", + "entityType": "attachment", + "organizationId": "c2u05q7olzsfy1csy8m2q98f", "resourceType": null, - "seq": 560, + "seq": 550, "stx": { "fieldVersions": { "name": 1, }, - "id": "mul9o7zuh9pqbrwqxd7fwfkl", - "sourceId": "5u2s0r3ld4uhi5g84g54ez4e", - "version": 3, + "mutationId": "g5bhj6q04ey9pbycghixqzn7", + "sourceId": "8ex8g1epv4xwf03jl4snuwh0", + "version": 5, }, }, - "name": "AppStreamNotification", - "ref": "#/components/schemas/AppStreamNotification", + "name": "StreamNotification", + "ref": "#/components/schemas/StreamNotification", "schema": { "properties": { "action": { @@ -2545,13 +2530,14 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "extendsRef": "#/components/schemas/StxBase", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -2577,64 +2563,45 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "Error info for failed CDC activities (dead letters).", "example": { - "action": "create", - "activityId": "ragf1ycwc0b2iz21o03r2akl", - "changedKeys": [ - "status", - "keywords", - "name", - ], - "createdAt": "2024-08-23T15:19:27.671Z", - "entityId": "4gxf4cgd71szihzxxvrwn5qz", - "entityType": "page", - "modifiedAt": "2024-11-19T07:37:33.898Z", + "code": null, + "lsn": "0/16B3A40", + "message": "Connection timeout during processing", + "resolved": false, + "retryCount": 3, }, - "name": "PublicStreamNotification", - "ref": "#/components/schemas/PublicStreamNotification", + "name": "ActivityError", + "ref": "#/components/schemas/ActivityError", "schema": { "properties": { - "action": { - "enum": [ - "create", - "update", - "delete", - ], - "required": true, - "type": "string", - }, - "activityId": { - "required": true, - "type": "string", - }, - "changedKeys": { - "itemType": "string", - "required": true, + "code": { + "required": false, "type": [ - "array", + "string", "null", ], }, - "createdAt": { + "lsn": { "required": true, "type": "string", }, - "entityId": { + "message": { "required": true, "type": "string", }, - "entityType": { - "enum": [ - "attachment", - "page", - ], + "resolved": { + "required": false, + "type": "boolean", + }, + "retryCount": { "required": true, - "type": "string", + "type": "number", }, }, "type": "object", }, - "schemaTag": "data", + "schemaTag": "errors", "type": "object", }, { @@ -2725,6 +2692,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "Standard error response returned by all API endpoints.", "example": { "message": "error:bad_request_action", "name": "BadRequestError", @@ -3156,6 +3124,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "An auditable event recording an entity change, used for sync and history.", "example": { "action": "update", "changedKeys": [ @@ -3203,6 +3172,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "entityId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -3226,7 +3196,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "error": { "anyOf": [ { - "description": "Error info for failed CDC activities (dead letters)", + "description": "Error info for failed CDC activities (dead letters).", "properties": { "code": { "required": false, @@ -3253,7 +3223,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, }, "ref": "#/components/schemas/ActivityError", - "refDescription": "Error info for failed CDC activities (dead letters)", "required": false, "type": "object", }, @@ -3265,10 +3234,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "organizationId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -3301,12 +3272,13 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "stx": { "anyOf": [ { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -3331,10 +3303,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, }, "tableName": { + "maxLength": 255, "required": true, "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": [ "string", @@ -3342,10 +3316,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "type": { + "maxLength": 255, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -3359,48 +3335,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { - "description": "Error info for failed CDC activities (dead letters)", - "example": { - "code": null, - "lsn": "0/16B3A40", - "message": "Connection timeout during processing", - "resolved": false, - "retryCount": 3, - }, - "name": "ActivityError", - "ref": "#/components/schemas/ActivityError", - "schema": { - "properties": { - "code": { - "required": false, - "type": [ - "string", - "null", - ], - }, - "lsn": { - "required": true, - "type": "string", - }, - "message": { - "required": true, - "type": "string", - }, - "resolved": { - "required": false, - "type": "boolean", - }, - "retryCount": { - "required": true, - "type": "number", - }, - }, - "type": "object", - }, - "schemaTag": "errors", - "type": "object", - }, - { + "description": "The currently authenticated user with their system role.", "example": { "systemRole": null, "user": { @@ -3431,7 +3366,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "schema": { "properties": { "systemRole": { - "description": "Explain system role here", + "description": "System-level role (e.g. admin) or user for standard access.", "enum": [ "admin", "user", @@ -3440,8 +3375,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "user": { + "description": "A user with profile data and last-seen activity timestamp.", "properties": { "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -3472,6 +3409,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "firstName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -3479,6 +3417,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -3491,6 +3430,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "lastName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -3498,17 +3438,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "lastSeenAt": { - "anyOf": [ - { - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], "required": true, + "type": [ + "string", + "null", + ], }, "lastSignInAt": { "required": true, @@ -3536,6 +3470,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -3543,6 +3478,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, @@ -3551,10 +3487,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -3583,6 +3521,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "A user with profile data and last-seen activity timestamp.", "example": { "bannerUrl": null, "createdAt": "2024-12-13T11:17:23.643Z", @@ -3610,6 +3549,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "schema": { "properties": { "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -3640,6 +3580,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "firstName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -3647,6 +3588,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -3659,6 +3601,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "lastName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -3666,17 +3609,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "lastSeenAt": { - "anyOf": [ - { - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], "required": true, + "type": [ + "string", + "null", + ], }, "lastSignInAt": { "required": true, @@ -3704,6 +3641,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -3711,6 +3649,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, @@ -3719,10 +3658,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -3746,6 +3687,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "Authentication metadata for the current user session.", "example": { "enabledOAuth": [ "github", @@ -3794,6 +3736,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "items": { "properties": { "browser": { + "maxLength": 255, "required": true, "type": [ "string", @@ -3805,6 +3748,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "deviceName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -3812,6 +3756,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "deviceOs": { + "maxLength": 255, "required": true, "type": [ "string", @@ -3827,14 +3772,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "nameOnDevice": { + "maxLength": 255, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -3862,6 +3810,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "browser": { + "maxLength": 255, "required": true, "type": [ "string", @@ -3873,6 +3822,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "deviceName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -3880,6 +3830,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "deviceOs": { + "maxLength": 255, "required": true, "type": [ "string", @@ -3899,6 +3850,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -3916,6 +3868,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -3932,6 +3885,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "A membership record for a user who has not yet accepted an invitation.", "example": { "contextType": "organization", "createdAt": "2024-02-08T11:19:07.168Z", @@ -3939,6 +3893,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "email": "angel25@hotmail.com", "id": "ukxfca4ddim4bvuklzn5bszg", "organizationId": "9angnio9zojjlzk3croh621f", + "organizationSlug": "mock-organization-slug", "rejectedAt": null, "role": "admin", "tenantId": "test01", @@ -3961,21 +3916,33 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": "string", }, "email": { + "maxLength": 255, "required": true, "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "rejectedAt": { "required": true, "type": [ @@ -3992,10 +3959,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "tokenId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -4003,6 +3972,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "userId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -4016,6 +3986,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "A signed token authorizing file uploads to the configured storage provider.", "example": { "params": { "auth": { @@ -4070,17 +4041,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "signature": { - "anyOf": [ - { - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], "required": true, + "type": [ + "string", + "null", + ], }, "sub": { "required": true, @@ -4093,6 +4058,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "A tenant representing an isolated data partition for multi-tenancy.", "name": "Tenant", "ref": "#/components/schemas/Tenant", "schema": { @@ -4135,6 +4101,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "A contact or waitlist submission from an unauthenticated user.", "example": { "createdAt": "2024-02-10T18:46:44.143Z", "email": "marlin62@yahoo.com", @@ -4152,14 +4119,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "email": { + "maxLength": 255, "required": true, "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "message": { + "maxLength": 255, "required": true, "type": [ "string", @@ -4186,127 +4156,23 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { - "name": "OrganizationIncluded", - "ref": "#/components/schemas/OrganizationIncluded", - "schema": { - "properties": { - "counts": { - "properties": { - "entities": { - "properties": { - "attachment": { - "required": true, - "type": "number", - }, - "page": { - "required": true, - "type": "number", - }, - }, - "required": true, - "type": "object", - }, - "membership": { - "properties": { - "admin": { - "required": true, - "type": "number", - }, - "member": { - "required": true, - "type": "number", - }, - "pending": { - "required": true, - "type": "number", - }, - "total": { - "required": true, - "type": "number", - }, - }, - "required": true, - "type": "object", - }, - }, - "required": false, - "type": "object", - }, - "membership": { - "properties": { - "archived": { - "required": true, - "type": "boolean", - }, - "contextType": { - "enum": [ - "organization", - ], - "required": true, - "type": "string", - }, - "displayOrder": { - "maximum": 140737488355327, - "minimum": -140737488355328, - "required": true, - "type": "number", - }, - "id": { - "required": true, - "type": "string", - }, - "muted": { - "required": true, - "type": "boolean", - }, - "organizationId": { - "required": true, - "type": "string", - }, - "role": { - "enum": [ - "admin", - "member", - ], - "required": true, - "type": "string", - }, - "tenantId": { - "required": true, - "type": "string", - }, - "userId": { - "required": true, - "type": "string", - }, - }, - "ref": "#/components/schemas/MembershipBase", - "required": false, - "type": "object", - }, - }, - "type": "object", - }, - "schemaTag": "data", - "type": "object", - }, - { - "example": { - "authStrategies": [ - "password", - ], - "bannerUrl": null, - "chatSupport": true, - "color": "#ecfdfe", - "country": "Turks and Caicos Islands", - "createdAt": "2024-12-25T15:29:47.111Z", - "createdBy": null, - "defaultLanguage": "en", - "description": "Multi-tiered zero trust firmware", - "emailDomains": [], - "entityType": "organization", - "id": "hmo9fwr239kqavr3yur671kl", - "included": { + "description": "An organization with settings, restrictions, and membership context.", + "example": { + "authStrategies": [ + "password", + ], + "bannerUrl": null, + "chatSupport": true, + "color": "#ecfdfe", + "country": "Turks and Caicos Islands", + "createdAt": "2024-12-25T15:29:47.111Z", + "createdBy": null, + "defaultLanguage": "en", + "description": "Multi-tiered zero trust firmware", + "emailDomains": [], + "entityType": "organization", + "id": "hmo9fwr239kqavr3yur671kl", + "included": { "counts": { "entities": { "attachment": 178, @@ -4326,6 +4192,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "kaba9fpc90mgtzmtjipw2v8s", "muted": false, "organizationId": "hmo9fwr239kqavr3yur671kl", + "organizationSlug": "mock-organization-slug", "role": "admin", "tenantId": "w4hg40", "userId": "36vxzq0rzt4pucvepsu63uw1", @@ -4371,6 +4238,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "array", }, "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -4408,6 +4276,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "color": { + "maxLength": 255, "required": true, "type": [ "string", @@ -4415,6 +4284,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "country": { + "maxLength": 255, "required": true, "type": [ "string", @@ -4426,6 +4296,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -4440,13 +4311,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, "type": "string", }, - "description": { - "required": true, - "type": [ - "string", - "null", - ], - }, "emailDomains": { "itemType": "string", "required": true, @@ -4460,6 +4324,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -4508,6 +4373,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "membership": { + "description": "Core membership fields shared across active and inactive memberships.", "properties": { "archived": { "required": true, @@ -4527,6 +4393,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "number", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -4535,9 +4402,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "role": { "enum": [ "admin", @@ -4547,10 +4423,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -4560,7 +4438,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, }, - "ref": "#/components/schemas/OrganizationIncluded", "required": false, "type": "object", }, @@ -4575,6 +4452,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "array", }, "logoUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -4589,6 +4467,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -4596,10 +4475,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "notificationEmail": { + "maxLength": 255, "required": true, "type": [ "string", @@ -4607,6 +4488,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "shortName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -4614,14 +4496,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -4629,6 +4514,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "timezone": { + "maxLength": 255, "required": true, "type": [ "string", @@ -4636,6 +4522,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "websiteUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -4643,6 +4530,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "welcomeText": { + "maxLength": 100000, "required": true, "type": [ "string", @@ -4656,6 +4544,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "A content page belonging to an organization.", "example": { "createdAt": "2024-08-06T10:28:33.226Z", "createdBy": "0f0ak5vkrrl687pmkwpa1vju", @@ -4672,7 +4561,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "status": "unpublished", "stx": { "fieldVersions": {}, - "id": "4tufkeho7gg1xwx21e333ngq", + "mutationId": "4tufkeho7gg1xwx21e333ngq", "sourceId": "src_ujcbpukfple60p8h3tnk9zpo", "version": 1, }, @@ -4687,6 +4576,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -4714,10 +4604,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "keywords": { + "maxLength": 100000, "required": true, "type": "string", }, @@ -4729,6 +4621,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -4736,10 +4629,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "parentId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -4760,12 +4655,13 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -4783,6 +4679,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, @@ -4793,22 +4690,23 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "Sync transaction metadata sent with mutations for idempotency and conflict detection.", "example": { - "baseVersion": 0, - "id": "efuoa1qdsm3eoz4p3a4an8mw", + "lastReadVersion": 0, + "mutationId": "efuoa1qdsm3eoz4p3a4an8mw", "sourceId": "mwbi2hv7uirbw4zg9xtdd05t", }, "name": "StxRequestBase", "ref": "#/components/schemas/StxRequestBase", "schema": { "properties": { - "baseVersion": { - "description": "Entity version when read (for conflict detection)", + "lastReadVersion": { + "description": "Entity version when last read (for conflict detection)", "minimum": 0, "required": true, "type": "integer", }, - "id": { + "mutationId": { "description": "Unique mutation ID (nanoid)", "maxLength": 32, "required": true, @@ -4827,6 +4725,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "A file attachment belonging to an organization.", "example": { "bucketName": "attachments", "contentType": "application/vnd.ms-fontobject", @@ -4849,7 +4748,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "size": "2524242", "stx": { "fieldVersions": {}, - "id": "pkeuemouu8t58r8fuj3tlenh", + "mutationId": "pkeuemouu8t58r8fuj3tlenh", "sourceId": "src_qurk6hu54pnfytf99mpmuhw0", "version": 1, }, @@ -4861,6 +4760,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "schema": { "properties": { "bucketName": { + "maxLength": 255, "required": true, "type": "string", }, @@ -4891,10 +4791,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "contentType": { + "maxLength": 255, "required": true, "type": "string", }, "convertedContentType": { + "maxLength": 255, "required": true, "type": [ "string", @@ -4902,6 +4804,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "convertedKey": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -4913,6 +4816,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -4934,10 +4838,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "filename": { + "maxLength": 255, "required": true, "type": "string", }, "groupId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -4945,10 +4851,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "keywords": { + "maxLength": 100000, "required": true, "type": "string", }, @@ -4960,6 +4868,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -4967,14 +4876,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, "originalKey": { + "maxLength": 2048, "required": true, "type": "string", }, @@ -4983,16 +4895,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "size": { + "maxLength": 255, "required": true, "type": "string", }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -5010,10 +4924,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "thumbnailKey": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -5027,6 +4943,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, { + "description": "A user's membership in a context entity, including role and activity data.", "example": { "archived": false, "contextType": "organization", @@ -5038,6 +4955,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "modifiedBy": null, "muted": false, "organizationId": "7ul53b62aw5h7k6x44nbu2r5", + "organizationSlug": "mock-organization-slug", "role": "admin", "tenantId": "test01", "userId": "xg7596t8jiy8d0v8irrljzhy", @@ -5062,6 +4980,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": "string", }, @@ -5072,6 +4991,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "number", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -5083,6 +5003,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -5094,9 +5015,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "role": { "enum": [ "admin", @@ -5106,10 +5036,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -5137,6 +5069,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "entityId": { + "maxLength": 50, "required": false, "type": [ "string", @@ -5194,14 +5127,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tableName": { + "maxLength": 255, "required": false, "type": "string", }, "type": { + "maxLength": 255, "required": false, "type": "string", }, "userId": { + "maxLength": 50, "required": false, "type": [ "string", @@ -5264,6 +5200,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "items": { "itemType": "object", "items": { + "description": "An auditable event recording an entity change, used for sync and history.", "properties": { "action": { "enum": [ @@ -5287,6 +5224,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "entityId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -5310,7 +5248,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "error": { "anyOf": [ { - "description": "Error info for failed CDC activities (dead letters)", + "description": "Error info for failed CDC activities (dead letters).", "properties": { "code": { "required": false, @@ -5337,7 +5275,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, }, "ref": "#/components/schemas/ActivityError", - "refDescription": "Error info for failed CDC activities (dead letters)", "required": false, "type": "object", }, @@ -5349,10 +5286,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "organizationId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -5385,12 +5324,13 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "stx": { "anyOf": [ { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -5415,10 +5355,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, }, "tableName": { + "maxLength": 255, "required": true, "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": [ "string", @@ -5426,10 +5368,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "type": { + "maxLength": 255, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -5577,7 +5521,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "size": "9665489", "stx": { "fieldVersions": {}, - "id": "vx9cfyey6mqh9hmikgme3gy3", + "mutationId": "vx9cfyey6mqh9hmikgme3gy3", "sourceId": "src_a9lhe0ctrmzc53x7z222ydtq", "version": 1, }, @@ -5606,7 +5550,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "size": "1107841", "stx": { "fieldVersions": {}, - "id": "k6bwmvl0e44bpmhsyauxcwuw", + "mutationId": "k6bwmvl0e44bpmhsyauxcwuw", "sourceId": "src_jsrzvzac8qx1h9s6vzhgvcj0", "version": 1, }, @@ -5622,8 +5566,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "items": { "itemType": "object", "items": { + "description": "A file attachment belonging to an organization.", "properties": { "bucketName": { + "maxLength": 255, "required": true, "type": "string", }, @@ -5654,10 +5600,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "contentType": { + "maxLength": 255, "required": true, "type": "string", }, "convertedContentType": { + "maxLength": 255, "required": true, "type": [ "string", @@ -5665,6 +5613,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "convertedKey": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -5676,6 +5625,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -5697,10 +5647,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "filename": { + "maxLength": 255, "required": true, "type": "string", }, "groupId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -5708,10 +5660,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "keywords": { + "maxLength": 100000, "required": true, "type": "string", }, @@ -5723,6 +5677,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -5730,14 +5685,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, "originalKey": { + "maxLength": 2048, "required": true, "type": "string", }, @@ -5746,16 +5704,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "size": { + "maxLength": 255, "required": true, "type": "string", }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -5773,10 +5733,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "thumbnailKey": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -5857,7 +5819,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, "convertedContentType": { "maxLength": 255, - "required": true, + "required": false, "type": [ "string", "null", @@ -5865,7 +5827,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, "convertedKey": { "maxLength": 2048, - "required": true, + "required": false, "type": [ "string", "null", @@ -5873,7 +5835,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, "createdBy": { "maxLength": 50, - "required": true, + "required": false, "type": [ "string", "null", @@ -5886,7 +5848,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, "groupId": { "maxLength": 50, - "required": true, + "required": false, "type": [ "string", "null", @@ -5894,12 +5856,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, "id": { "maxLength": 50, - "required": true, + "required": false, "type": "string", }, "name": { "maxLength": 255, - "required": true, + "required": false, "type": "string", }, "organizationId": { @@ -5922,14 +5884,15 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "stx": { + "description": "Sync transaction metadata sent with mutations for idempotency and conflict detection.", "properties": { - "baseVersion": { - "description": "Entity version when read (for conflict detection)", + "lastReadVersion": { + "description": "Entity version when last read (for conflict detection)", "minimum": 0, "required": true, "type": "integer", }, - "id": { + "mutationId": { "description": "Unique mutation ID (nanoid)", "maxLength": 32, "required": true, @@ -5948,7 +5911,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, "thumbnailKey": { "maxLength": 2048, - "required": true, + "required": false, "type": [ "string", "null", @@ -6006,7 +5969,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "size": "7651256", "stx": { "fieldVersions": {}, - "id": "b6pakf4ovzm1ne3h55lgj31d", + "mutationId": "b6pakf4ovzm1ne3h55lgj31d", "sourceId": "src_63n9apx99a5auvr5cyj5s37i", "version": 1, }, @@ -6035,7 +5998,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "size": "6125227", "stx": { "fieldVersions": {}, - "id": "y4dvzpz75e03ldr2ga54hj92", + "mutationId": "y4dvzpz75e03ldr2ga54hj92", "sourceId": "src_yzr7v1itpc9wztvbcy21q04o", "version": 1, }, @@ -6051,8 +6014,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "data": { "itemType": "object", "items": { + "description": "A file attachment belonging to an organization.", "properties": { "bucketName": { + "maxLength": 255, "required": true, "type": "string", }, @@ -6083,10 +6048,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "contentType": { + "maxLength": 255, "required": true, "type": "string", }, "convertedContentType": { + "maxLength": 255, "required": true, "type": [ "string", @@ -6094,6 +6061,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "convertedKey": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -6105,6 +6073,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -6126,10 +6095,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "filename": { + "maxLength": 255, "required": true, "type": "string", }, "groupId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -6137,10 +6108,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "keywords": { + "maxLength": 100000, "required": true, "type": "string", }, @@ -6152,6 +6125,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -6159,14 +6133,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, "originalKey": { + "maxLength": 2048, "required": true, "type": "string", }, @@ -6175,16 +6152,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "size": { + "maxLength": 255, "required": true, "type": "string", }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -6202,10 +6181,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "thumbnailKey": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -6263,7 +6244,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "size": "7651256", "stx": { "fieldVersions": {}, - "id": "b6pakf4ovzm1ne3h55lgj31d", + "mutationId": "b6pakf4ovzm1ne3h55lgj31d", "sourceId": "src_63n9apx99a5auvr5cyj5s37i", "version": 1, }, @@ -6292,7 +6273,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "size": "6125227", "stx": { "fieldVersions": {}, - "id": "y4dvzpz75e03ldr2ga54hj92", + "mutationId": "y4dvzpz75e03ldr2ga54hj92", "sourceId": "src_yzr7v1itpc9wztvbcy21q04o", "version": 1, }, @@ -6308,8 +6289,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "data": { "itemType": "object", "items": { + "description": "A file attachment belonging to an organization.", "properties": { "bucketName": { + "maxLength": 255, "required": true, "type": "string", }, @@ -6340,10 +6323,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "contentType": { + "maxLength": 255, "required": true, "type": "string", }, "convertedContentType": { + "maxLength": 255, "required": true, "type": [ "string", @@ -6351,6 +6336,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "convertedKey": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -6362,6 +6348,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -6383,10 +6370,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "filename": { + "maxLength": 255, "required": true, "type": "string", }, "groupId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -6394,10 +6383,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "keywords": { + "maxLength": 100000, "required": true, "type": "string", }, @@ -6409,6 +6400,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -6416,14 +6408,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, "originalKey": { + "maxLength": 2048, "required": true, "type": "string", }, @@ -6432,16 +6427,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "size": { + "maxLength": 255, "required": true, "type": "string", }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -6459,10 +6456,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "thumbnailKey": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -6545,7 +6544,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, "stx": { "properties": { - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -6763,7 +6762,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "size": "2524242", "stx": { "fieldVersions": {}, - "id": "pkeuemouu8t58r8fuj3tlenh", + "mutationId": "pkeuemouu8t58r8fuj3tlenh", "sourceId": "src_qurk6hu54pnfytf99mpmuhw0", "version": 1, }, @@ -6774,8 +6773,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/Attachment", "schema": { "contentType": "application/json", + "description": "A file attachment belonging to an organization.", "properties": { "bucketName": { + "maxLength": 255, "required": true, "type": "string", }, @@ -6806,10 +6807,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "contentType": { + "maxLength": 255, "required": true, "type": "string", }, "convertedContentType": { + "maxLength": 255, "required": true, "type": [ "string", @@ -6817,6 +6820,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "convertedKey": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -6828,6 +6832,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -6849,10 +6854,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "filename": { + "maxLength": 255, "required": true, "type": "string", }, "groupId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -6860,10 +6867,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "keywords": { + "maxLength": 100000, "required": true, "type": "string", }, @@ -6875,6 +6884,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -6882,14 +6892,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, "originalKey": { + "maxLength": 2048, "required": true, "type": "string", }, @@ -6898,16 +6911,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "size": { + "maxLength": 255, "required": true, "type": "string", }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -6925,10 +6940,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "thumbnailKey": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -6995,14 +7012,15 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "stx": { + "description": "Sync transaction metadata sent with mutations for idempotency and conflict detection.", "properties": { - "baseVersion": { - "description": "Entity version when read (for conflict detection)", + "lastReadVersion": { + "description": "Entity version when last read (for conflict detection)", "minimum": 0, "required": true, "type": "integer", }, - "id": { + "mutationId": { "description": "Unique mutation ID (nanoid)", "maxLength": 32, "required": true, @@ -7069,7 +7087,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "size": "2524242", "stx": { "fieldVersions": {}, - "id": "pkeuemouu8t58r8fuj3tlenh", + "mutationId": "pkeuemouu8t58r8fuj3tlenh", "sourceId": "src_qurk6hu54pnfytf99mpmuhw0", "version": 1, }, @@ -7080,8 +7098,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/Attachment", "schema": { "contentType": "application/json", + "description": "A file attachment belonging to an organization.", "properties": { "bucketName": { + "maxLength": 255, "required": true, "type": "string", }, @@ -7112,10 +7132,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "contentType": { + "maxLength": 255, "required": true, "type": "string", }, "convertedContentType": { + "maxLength": 255, "required": true, "type": [ "string", @@ -7123,6 +7145,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "convertedKey": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -7134,6 +7157,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -7155,10 +7179,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "filename": { + "maxLength": 255, "required": true, "type": "string", }, "groupId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -7166,10 +7192,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "keywords": { + "maxLength": 100000, "required": true, "type": "string", }, @@ -7181,6 +7209,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -7188,14 +7217,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, "originalKey": { + "maxLength": 2048, "required": true, "type": "string", }, @@ -7204,16 +7236,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "size": { + "maxLength": 255, "required": true, "type": "string", }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -7231,10 +7265,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "thumbnailKey": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -8471,6 +8507,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "contentType": "application/json", "properties": { "browser": { + "maxLength": 255, "required": true, "type": [ "string", @@ -8482,6 +8519,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "deviceName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -8489,6 +8527,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "deviceOs": { + "maxLength": 255, "required": true, "type": [ "string", @@ -8504,14 +8543,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "nameOnDevice": { + "maxLength": 255, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -9246,16 +9288,26 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": false, "type": "string", }, + "seqs": { + "description": "JSON-encoded client seqs for gap detection: {"scopeId":42}. Unchanged scopes are excluded from the response.", + "required": false, + "type": "string", + }, }, }, }, "responses": [ { "contentType": "application/json", - "description": "Catch-up activities or SSE stream started", + "description": "Catch-up summary or SSE stream started", "schema": { "contentType": "application/json", "properties": { + "changes": { + "description": "Per-entityType change summary: { [entityType]: { seq, deletedIds } }", + "required": true, + "type": "object", + }, "cursor": { "description": "Last activity ID (use as offset for next request)", "required": true, @@ -9264,55 +9316,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "null", ], }, - "notifications": { - "itemType": "object", - "items": { - "properties": { - "action": { - "enum": [ - "create", - "update", - "delete", - ], - "required": true, - "type": "string", - }, - "activityId": { - "required": true, - "type": "string", - }, - "changedKeys": { - "itemType": "string", - "required": true, - "type": [ - "array", - "null", - ], - }, - "createdAt": { - "required": true, - "type": "string", - }, - "entityId": { - "required": true, - "type": "string", - }, - "entityType": { - "enum": [ - "attachment", - "page", - ], - "required": true, - "type": "string", - }, - }, - "ref": "#/components/schemas/PublicStreamNotification", - "type": "object", - }, - "ref": "#/components/schemas/PublicStreamNotification", - "required": true, - "type": "array", - }, }, "type": "object", }, @@ -9374,39 +9377,35 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": false, "type": "string", }, + "seqs": { + "description": "JSON-encoded client seqs for gap detection: {"scopeId":42}. Unchanged scopes are excluded from the response.", + "required": false, + "type": "string", + }, }, }, }, "responses": [ { "contentType": "application/json", - "description": "SSE stream or notification response", + "description": "SSE stream or catchup summary response", "example": { - "cursor": "ll6ebv8jmzcs1cydc8ytq68u", - "notifications": [ - { - "action": "create", - "cacheToken": "hg18eRugoaB38Ug7A1n7Zj018TyC3pwn", - "contextType": null, - "entityId": "p4mjvy3c0rjatirn6hp0rcgf", - "entityType": "page", - "organizationId": "ufjhv1cwh0j4x3xi7ae54uen", - "resourceType": null, - "seq": 526, - "stx": { - "fieldVersions": { - "name": 1, - }, - "id": "hd7xubc5zuydxdgepv2tpr0z", - "sourceId": "jt0hyw517e6fpcmgsgfuxfwx", - "version": 1, - }, + "changes": { + "org-example-id": { + "deletedIds": [], + "seq": 42, }, - ], + }, + "cursor": "d9909rsl2y2ii9vbcsc2ywg7", }, "schema": { "contentType": "application/json", "properties": { + "changes": { + "description": "Per-org change summary: { [orgId]: { seq, deletedIds, membership? } }", + "required": true, + "type": "object", + }, "cursor": { "description": "Last activity ID (use as offset for next request)", "required": true, @@ -9415,115 +9414,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "null", ], }, - "notifications": { - "itemType": "object", - "items": { - "properties": { - "action": { - "enum": [ - "create", - "update", - "delete", - ], - "required": true, - "type": "string", - }, - "cacheToken": { - "required": true, - "type": [ - "string", - "null", - ], - }, - "contextType": { - "enum": [ - "organization", - null, - ], - "required": true, - "type": [ - "string", - "null", - ], - }, - "entityId": { - "required": true, - "type": "string", - }, - "entityType": { - "enum": [ - "attachment", - "page", - null, - ], - "required": true, - "type": [ - "string", - "null", - ], - }, - "organizationId": { - "required": true, - "type": [ - "string", - "null", - ], - }, - "resourceType": { - "enum": [ - "request", - "membership", - "inactive_membership", - "tenant", - null, - ], - "required": true, - "type": [ - "string", - "null", - ], - }, - "seq": { - "required": true, - "type": [ - "integer", - "null", - ], - }, - "stx": { - "extendsRef": "#/components/schemas/StxBase", - "properties": { - "fieldVersions": { - "required": true, - "type": "object", - }, - "id": { - "required": true, - "type": "string", - }, - "sourceId": { - "required": true, - "type": "string", - }, - "version": { - "required": true, - "type": "integer", - }, - }, - "required": true, - "type": [ - "object", - "null", - ], - }, - }, - "ref": "#/components/schemas/AppStreamNotification", - "type": "object", - }, - "ref": "#/components/schemas/AppStreamNotification", - "required": true, - "type": "array", - }, }, "type": "object", }, @@ -9603,9 +9493,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/Me", "schema": { "contentType": "application/json", + "description": "The currently authenticated user with their system role.", "properties": { "systemRole": { - "description": "Explain system role here", + "description": "System-level role (e.g. admin) or user for standard access.", "enum": [ "admin", "user", @@ -9614,8 +9505,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "user": { + "description": "A user with profile data and last-seen activity timestamp.", "properties": { "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -9646,6 +9539,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "firstName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -9653,6 +9547,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -9665,6 +9560,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "lastName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -9672,17 +9568,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "lastSeenAt": { - "anyOf": [ - { - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], "required": true, + "type": [ + "string", + "null", + ], }, "lastSignInAt": { "required": true, @@ -9710,6 +9600,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -9717,6 +9608,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, @@ -9725,10 +9617,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -9896,8 +9790,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/User", "schema": { "contentType": "application/json", + "description": "A user with profile data and last-seen activity timestamp.", "properties": { "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -9928,6 +9824,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "firstName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -9935,6 +9832,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -9947,6 +9845,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "lastName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -9954,17 +9853,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "lastSeenAt": { - "anyOf": [ - { - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], "required": true, + "type": [ + "string", + "null", + ], }, "lastSignInAt": { "required": true, @@ -9992,6 +9885,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -9999,6 +9893,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, @@ -10007,10 +9902,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -10185,8 +10082,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/User", "schema": { "contentType": "application/json", + "description": "A user with profile data and last-seen activity timestamp.", "properties": { "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -10217,6 +10116,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "firstName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -10224,6 +10124,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -10236,6 +10137,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "lastName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -10243,17 +10145,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "lastSeenAt": { - "anyOf": [ - { - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], "required": true, + "type": [ + "string", + "null", + ], }, "lastSignInAt": { "required": true, @@ -10281,6 +10177,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -10288,6 +10185,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, @@ -10296,10 +10194,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -10392,6 +10292,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/MeAuthData", "schema": { "contentType": "application/json", + "description": "Authentication metadata for the current user session.", "properties": { "enabledOAuth": { "enum": [ @@ -10414,6 +10315,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "items": { "properties": { "browser": { + "maxLength": 255, "required": true, "type": [ "string", @@ -10425,6 +10327,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "deviceName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -10432,6 +10335,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "deviceOs": { + "maxLength": 255, "required": true, "type": [ "string", @@ -10447,14 +10351,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "nameOnDevice": { + "maxLength": 255, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -10482,6 +10389,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "browser": { + "maxLength": 255, "required": true, "type": [ "string", @@ -10493,6 +10401,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "deviceName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -10500,6 +10409,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "deviceOs": { + "maxLength": 255, "required": true, "type": [ "string", @@ -10519,6 +10429,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -10536,6 +10447,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -10600,7 +10512,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "entity": { "bannerUrl": null, "createdAt": "2024-12-25T19:05:51.784Z", - "description": "Diverse demand-driven matrices", "entityType": "organization", "id": "kk63h1dxe8cgq643ccglytgb", "modifiedAt": "2024-12-27T22:12:06.410Z", @@ -10616,6 +10527,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "email": "russ.herzog17@yahoo.com", "id": "6gr354pie22th7dif16z86xc", "organizationId": "ft7nt6w77qphfz9detwtt178", + "organizationSlug": "mock-organization-slug", "rejectedAt": null, "role": "admin", "tenantId": "test01", @@ -10627,7 +10539,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "entity": { "bannerUrl": null, "createdAt": "2024-03-25T23:28:46.492Z", - "description": "Automated eco-centric capability", "entityType": "organization", "id": "ip52vb8otvpz1qn2gfy3zjnp", "modifiedAt": "2024-06-03T13:50:52.760Z", @@ -10643,6 +10554,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "email": "bethany.osinski75@gmail.com", "id": "3gqwjug71n1cwllydl9l6917", "organizationId": "okmsol2r5n4cy72j57t1tgy0", + "organizationSlug": "mock-organization-slug", "rejectedAt": null, "role": "admin", "tenantId": "test01", @@ -10661,6 +10573,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "items": { "properties": { "entity": { + "description": "Base schema for entities with memberships (e.g. organization).", "properties": { "bannerUrl": { "required": true, @@ -10673,13 +10586,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, "type": "string", }, - "description": { - "required": true, - "type": [ - "string", - "null", - ], - }, "entityType": { "enum": [ "organization", @@ -10723,6 +10629,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "inactiveMembership": { + "description": "A membership record for a user who has not yet accepted an invitation.", "properties": { "contextType": { "enum": [ @@ -10736,21 +10643,33 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": "string", }, "email": { + "maxLength": 255, "required": true, "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "rejectedAt": { "required": true, "type": [ @@ -10767,10 +10686,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "tokenId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -10778,6 +10699,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "userId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -11039,6 +10961,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/UploadToken", "schema": { "contentType": "application/json", + "description": "A signed token authorizing file uploads to the configured storage provider.", "properties": { "params": { "anyOf": [ @@ -11078,17 +11001,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "signature": { - "anyOf": [ - { - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], "required": true, + "type": [ + "string", + "null", + ], }, "sub": { "required": true, @@ -11203,6 +11120,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "items": { "itemType": "object", "items": { + "description": "Core membership fields shared across active and inactive memberships.", "properties": { "archived": { "required": true, @@ -11222,6 +11140,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "number", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -11230,9 +11149,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "role": { "enum": [ "admin", @@ -11242,10 +11170,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -11373,6 +11303,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "vn86f6g3ci8ybeh37sz3gscf", "muted": false, "organizationId": "80754cxm7om1aq3batq3hdpx", + "organizationSlug": "mock-organization-slug", "role": "admin", "tenantId": "gmpj3u", "userId": "avw3f7pkm7vsxl2157n34cen", @@ -11387,6 +11318,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "data": { "itemType": "object", "items": { + "description": "Core membership fields shared across active and inactive memberships.", "properties": { "archived": { "required": true, @@ -11406,6 +11338,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "number", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -11414,9 +11347,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "role": { "enum": [ "admin", @@ -11426,10 +11368,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -11675,6 +11619,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "modifiedBy": null, "muted": false, "organizationId": "7ul53b62aw5h7k6x44nbu2r5", + "organizationSlug": "mock-organization-slug", "role": "admin", "tenantId": "test01", "userId": "xg7596t8jiy8d0v8irrljzhy", @@ -11683,6 +11628,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/Membership", "schema": { "contentType": "application/json", + "description": "A user's membership in a context entity, including role and activity data.", "properties": { "archived": { "required": true, @@ -11700,6 +11646,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": "string", }, @@ -11710,6 +11657,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "number", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -11721,6 +11669,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -11732,9 +11681,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "role": { "enum": [ "admin", @@ -11744,10 +11702,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -11822,7 +11782,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "example": { "bannerUrl": null, "createdAt": "2024-09-15T16:29:26.122Z", - "description": "Automated eco-centric open architecture", "entityType": "organization", "id": "bafp6iiu2dt74olfvl618xur", "modifiedAt": "2024-12-04T06:32:26.983Z", @@ -11835,6 +11794,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/ContextEntityBase", "schema": { "contentType": "application/json", + "description": "Base schema for entities with memberships (e.g. organization).", "properties": { "bannerUrl": { "required": true, @@ -11847,13 +11807,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, "type": "string", }, - "description": { - "required": true, - "type": [ - "string", - "null", - ], - }, "entityType": { "enum": [ "organization", @@ -12035,6 +11988,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "300jor4orrvsgezqoyxfckg3", "muted": false, "organizationId": "fpb1r33xdbp099f3xi8028r0", + "organizationSlug": "mock-organization-slug", "role": "member", "tenantId": "ifex0a", "userId": "gu87zf240qkfh0faoqjip69q", @@ -12066,6 +12020,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "1u44cckbz5av195r4h3wiruz", "muted": false, "organizationId": "eylomg4p6xgvt4g11e2hqqxx", + "organizationSlug": "mock-organization-slug", "role": "admin", "tenantId": "44b7wk", "userId": "ilwj64zmkwsnsmrzo2zxd2hr", @@ -12088,6 +12043,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "items": { "properties": { "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -12118,6 +12074,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "firstName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -12125,6 +12082,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -12137,6 +12095,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "lastName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -12144,17 +12103,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "lastSeenAt": { - "anyOf": [ - { - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], "required": true, + "type": [ + "string", + "null", + ], }, "lastSignInAt": { "required": true, @@ -12171,6 +12124,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "membership": { + "description": "Core membership fields shared across active and inactive memberships.", "properties": { "archived": { "required": true, @@ -12190,6 +12144,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "number", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -12198,9 +12153,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "role": { "enum": [ "admin", @@ -12210,10 +12174,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -12234,6 +12200,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -12241,14 +12208,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -12382,6 +12352,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "email": "troy.reichert@hotmail.com", "id": "eyvjbbm5piweg2q4gqa3vx9c", "organizationId": "9xn03u76eo7z71y60a882cwp", + "organizationSlug": "mock-organization-slug", "rejectedAt": null, "role": "member", "tenantId": "test01", @@ -12395,6 +12366,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "email": "kurt_treutel@yahoo.com", "id": "pi37syiavgc67t5nr6k4huj5", "organizationId": "clxs8vayzrul7vmeyahbgyu0", + "organizationSlug": "mock-organization-slug", "rejectedAt": null, "role": "admin", "tenantId": "test01", @@ -12416,6 +12388,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -13158,6 +13131,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "3y6ee6h5lc8sjfv4trxwe3yb", "muted": false, "organizationId": "kzmv5qbhdcqeiuvwlosan0fc", + "organizationSlug": "mock-organization-slug", "role": "member", "tenantId": "89fjn2", "userId": "1t4n7coocr6ixfzcb6x5wab0", @@ -13219,6 +13193,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "ry5f7szmj5jhp0ad93klgj3e", "muted": false, "organizationId": "p3t0ygxx0aa83en3sk1fs1we", + "organizationSlug": "mock-organization-slug", "role": "admin", "tenantId": "j6ly81", "userId": "u4oy2u1m55abgsmrl1zezeoj", @@ -13254,6 +13229,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "data": { "itemType": "object", "items": { + "description": "An organization with settings, restrictions, and membership context.", "extendsRef": "#/components/schemas/Organization", "properties": { "authStrategies": { @@ -13271,6 +13247,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "array", }, "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -13308,6 +13285,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "color": { + "maxLength": 255, "required": true, "type": [ "string", @@ -13315,6 +13293,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "country": { + "maxLength": 255, "required": true, "type": [ "string", @@ -13326,6 +13305,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -13340,13 +13320,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, "type": "string", }, - "description": { - "required": true, - "type": [ - "string", - "null", - ], - }, "emailDomains": { "itemType": "string", "required": true, @@ -13360,11 +13333,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "included": { - "extendsRef": "#/components/schemas/OrganizationIncluded", "properties": { "counts": { "properties": { @@ -13409,6 +13382,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "membership": { + "description": "Core membership fields shared across active and inactive memberships.", "properties": { "archived": { "required": true, @@ -13428,6 +13402,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "number", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -13436,9 +13411,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "role": { "enum": [ "admin", @@ -13448,10 +13432,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -13475,6 +13461,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "array", }, "logoUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -13489,6 +13476,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -13496,10 +13484,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "notificationEmail": { + "maxLength": 255, "required": true, "type": [ "string", @@ -13507,6 +13497,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "shortName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -13514,14 +13505,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -13529,6 +13523,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "timezone": { + "maxLength": 255, "required": true, "type": [ "string", @@ -13536,6 +13531,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "websiteUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -13543,6 +13539,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "welcomeText": { + "maxLength": 100000, "required": true, "type": [ "string", @@ -13803,6 +13800,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "300jor4orrvsgezqoyxfckg3", "muted": false, "organizationId": "qqp8d07imsvjbtqtl3rtjgxd", + "organizationSlug": "mock-organization-slug", "role": "member", "tenantId": "ifex0a", "userId": "gu87zf240qkfh0faoqjip69q", @@ -13864,6 +13862,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "1u44cckbz5av195r4h3wiruz", "muted": false, "organizationId": "hg5ogh3yr2b2dbwf7b9eckaj", + "organizationSlug": "mock-organization-slug", "role": "admin", "tenantId": "44b7wk", "userId": "ilwj64zmkwsnsmrzo2zxd2hr", @@ -13899,6 +13898,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "items": { "itemType": "object", "items": { + "description": "An organization with settings, restrictions, and membership context.", "properties": { "authStrategies": { "enum": [ @@ -13915,6 +13915,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "array", }, "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -13952,6 +13953,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "color": { + "maxLength": 255, "required": true, "type": [ "string", @@ -13959,6 +13961,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "country": { + "maxLength": 255, "required": true, "type": [ "string", @@ -13970,6 +13973,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -13984,13 +13988,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, "type": "string", }, - "description": { - "required": true, - "type": [ - "string", - "null", - ], - }, "emailDomains": { "itemType": "string", "required": true, @@ -14004,6 +14001,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -14052,6 +14050,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "membership": { + "description": "Core membership fields shared across active and inactive memberships.", "properties": { "archived": { "required": true, @@ -14071,6 +14070,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "number", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -14079,9 +14079,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "role": { "enum": [ "admin", @@ -14091,10 +14100,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -14104,7 +14115,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, }, - "ref": "#/components/schemas/OrganizationIncluded", "required": false, "type": "object", }, @@ -14119,6 +14129,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "array", }, "logoUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -14133,6 +14144,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -14140,10 +14152,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "notificationEmail": { + "maxLength": 255, "required": true, "type": [ "string", @@ -14151,6 +14165,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "shortName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -14158,14 +14173,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -14173,6 +14191,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "timezone": { + "maxLength": 255, "required": true, "type": [ "string", @@ -14180,6 +14199,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "websiteUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -14187,6 +14207,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "welcomeText": { + "maxLength": 100000, "required": true, "type": [ "string", @@ -14321,6 +14342,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "kaba9fpc90mgtzmtjipw2v8s", "muted": false, "organizationId": "hmo9fwr239kqavr3yur671kl", + "organizationSlug": "mock-organization-slug", "role": "admin", "tenantId": "w4hg40", "userId": "36vxzq0rzt4pucvepsu63uw1", @@ -14351,6 +14373,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/Organization", "schema": { "contentType": "application/json", + "description": "An organization with settings, restrictions, and membership context.", "properties": { "authStrategies": { "enum": [ @@ -14367,6 +14390,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "array", }, "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -14404,6 +14428,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "color": { + "maxLength": 255, "required": true, "type": [ "string", @@ -14411,6 +14436,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "country": { + "maxLength": 255, "required": true, "type": [ "string", @@ -14422,6 +14448,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -14436,13 +14463,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, "type": "string", }, - "description": { - "required": true, - "type": [ - "string", - "null", - ], - }, "emailDomains": { "itemType": "string", "required": true, @@ -14456,6 +14476,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -14504,6 +14525,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "membership": { + "description": "Core membership fields shared across active and inactive memberships.", "properties": { "archived": { "required": true, @@ -14523,6 +14545,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "number", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -14531,9 +14554,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "role": { "enum": [ "admin", @@ -14543,10 +14575,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -14556,7 +14590,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, }, - "ref": "#/components/schemas/OrganizationIncluded", "required": false, "type": "object", }, @@ -14571,6 +14604,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "array", }, "logoUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -14585,6 +14619,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -14592,10 +14627,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "notificationEmail": { + "maxLength": 255, "required": true, "type": [ "string", @@ -14603,6 +14640,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "shortName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -14610,14 +14648,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -14625,6 +14666,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "timezone": { + "maxLength": 255, "required": true, "type": [ "string", @@ -14632,6 +14674,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "websiteUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -14639,6 +14682,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "welcomeText": { + "maxLength": 100000, "required": true, "type": [ "string", @@ -14888,6 +14932,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "kaba9fpc90mgtzmtjipw2v8s", "muted": false, "organizationId": "hmo9fwr239kqavr3yur671kl", + "organizationSlug": "mock-organization-slug", "role": "admin", "tenantId": "w4hg40", "userId": "36vxzq0rzt4pucvepsu63uw1", @@ -14918,6 +14963,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/Organization", "schema": { "contentType": "application/json", + "description": "An organization with settings, restrictions, and membership context.", "properties": { "authStrategies": { "enum": [ @@ -14934,6 +14980,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "array", }, "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -14971,6 +15018,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "color": { + "maxLength": 255, "required": true, "type": [ "string", @@ -14978,6 +15026,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "country": { + "maxLength": 255, "required": true, "type": [ "string", @@ -14989,6 +15038,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -15003,13 +15053,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": true, "type": "string", }, - "description": { - "required": true, - "type": [ - "string", - "null", - ], - }, "emailDomains": { "itemType": "string", "required": true, @@ -15023,6 +15066,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -15071,6 +15115,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "membership": { + "description": "Core membership fields shared across active and inactive memberships.", "properties": { "archived": { "required": true, @@ -15090,6 +15135,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "number", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -15098,9 +15144,18 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "organizationId": { + "maxLength": 50, "required": true, "type": "string", }, + "organizationSlug": { + "maxLength": 255, + "required": true, + "type": [ + "string", + "null", + ], + }, "role": { "enum": [ "admin", @@ -15110,10 +15165,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "userId": { + "maxLength": 50, "required": true, "type": "string", }, @@ -15123,7 +15180,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, }, - "ref": "#/components/schemas/OrganizationIncluded", "required": false, "type": "object", }, @@ -15138,6 +15194,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "array", }, "logoUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -15152,6 +15209,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -15159,10 +15217,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "notificationEmail": { + "maxLength": 255, "required": true, "type": [ "string", @@ -15170,6 +15230,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "shortName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -15177,14 +15238,17 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -15192,6 +15256,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "timezone": { + "maxLength": 255, "required": true, "type": [ "string", @@ -15199,6 +15264,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "websiteUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -15206,6 +15272,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "welcomeText": { + "maxLength": 100000, "required": true, "type": [ "string", @@ -15322,7 +15389,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "status": "unpublished", "stx": { "fieldVersions": {}, - "id": "y6mqh9hmikgme3gy3a9lhe0c", + "mutationId": "y6mqh9hmikgme3gy3a9lhe0c", "sourceId": "src_trmzc53x7z222ydtq57iu31m", "version": 1, }, @@ -15344,7 +15411,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "status": "unpublished", "stx": { "fieldVersions": {}, - "id": "4bpmhsyauxcwuwjsrzvzac8q", + "mutationId": "4bpmhsyauxcwuwjsrzvzac8q", "sourceId": "src_x1h9s6vzhgvcj0rs3xtuk03g", "version": 1, }, @@ -15359,12 +15426,14 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "items": { "itemType": "object", "items": { + "description": "A content page belonging to an organization.", "properties": { "createdAt": { "required": true, "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -15392,10 +15461,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "keywords": { + "maxLength": 100000, "required": true, "type": "string", }, @@ -15407,6 +15478,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -15414,10 +15486,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "parentId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -15438,12 +15512,13 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -15461,6 +15536,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, @@ -15550,7 +15626,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "status": "unpublished", "stx": { "fieldVersions": {}, - "id": "4tufkeho7gg1xwx21e333ngq", + "mutationId": "4tufkeho7gg1xwx21e333ngq", "sourceId": "src_ujcbpukfple60p8h3tnk9zpo", "version": 1, }, @@ -15560,12 +15636,14 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/Page", "schema": { "contentType": "application/json", + "description": "A content page belonging to an organization.", "properties": { "createdAt": { "required": true, "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -15593,10 +15671,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "keywords": { + "maxLength": 100000, "required": true, "type": "string", }, @@ -15608,6 +15688,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -15615,10 +15696,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "parentId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -15639,12 +15722,13 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -15662,6 +15746,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, @@ -15718,18 +15803,19 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "properties": { "name": { "maxLength": 255, - "required": true, + "required": false, "type": "string", }, "stx": { + "description": "Sync transaction metadata sent with mutations for idempotency and conflict detection.", "properties": { - "baseVersion": { - "description": "Entity version when read (for conflict detection)", + "lastReadVersion": { + "description": "Entity version when last read (for conflict detection)", "minimum": 0, "required": true, "type": "integer", }, - "id": { + "mutationId": { "description": "Unique mutation ID (nanoid)", "maxLength": 32, "required": true, @@ -15787,7 +15873,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "status": "unpublished", "stx": { "fieldVersions": {}, - "id": "akf4ovzm1ne3h55lgj31d63n", + "mutationId": "akf4ovzm1ne3h55lgj31d63n", "sourceId": "src_9apx99a5auvr5cyj5s37irnj", "version": 1, }, @@ -15809,7 +15895,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "status": "unpublished", "stx": { "fieldVersions": {}, - "id": "4hj92yzr7v1itpc9wztvbcy2", + "mutationId": "4hj92yzr7v1itpc9wztvbcy2", "sourceId": "src_1q04oq81k5rbzt4yq63pob5r", "version": 1, }, @@ -15824,12 +15910,14 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "data": { "itemType": "object", "items": { + "description": "A content page belonging to an organization.", "properties": { "createdAt": { "required": true, "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -15857,10 +15945,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "keywords": { + "maxLength": 100000, "required": true, "type": "string", }, @@ -15872,6 +15962,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -15879,10 +15970,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "parentId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -15903,12 +15996,13 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -15926,6 +16020,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, @@ -15974,7 +16069,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "status": "unpublished", "stx": { "fieldVersions": {}, - "id": "akf4ovzm1ne3h55lgj31d63n", + "mutationId": "akf4ovzm1ne3h55lgj31d63n", "sourceId": "src_9apx99a5auvr5cyj5s37irnj", "version": 1, }, @@ -15996,7 +16091,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "status": "unpublished", "stx": { "fieldVersions": {}, - "id": "4hj92yzr7v1itpc9wztvbcy2", + "mutationId": "4hj92yzr7v1itpc9wztvbcy2", "sourceId": "src_1q04oq81k5rbzt4yq63pob5r", "version": 1, }, @@ -16011,12 +16106,14 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "data": { "itemType": "object", "items": { + "description": "A content page belonging to an organization.", "properties": { "createdAt": { "required": true, "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -16044,10 +16141,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "keywords": { + "maxLength": 100000, "required": true, "type": "string", }, @@ -16059,6 +16158,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -16066,10 +16166,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "parentId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -16090,12 +16192,13 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -16113,6 +16216,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, @@ -16206,8 +16310,30 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, "responses": [ { - "description": "Page(s) deleted", - "status": 204, + "contentType": "application/json", + "description": "Success", + "schema": { + "contentType": "application/json", + "properties": { + "data": { + "required": true, + "type": "array", + }, + "rejectedItemIds": { + "description": "Identifiers of items that could not be processed", + "itemType": "string", + "required": true, + "type": "array", + }, + "rejectionReasons": { + "description": "Map of reason code to rejected item IDs", + "required": false, + "type": "object", + }, + }, + "type": "object", + }, + "status": 200, }, { "contentType": "application/json", @@ -16253,7 +16379,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "contentType": "application/json", "properties": { "description": { - "maxLength": 255, + "maxLength": 100000, "required": false, "type": [ "string", @@ -16267,7 +16393,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "number", }, "keywords": { - "maxLength": 255, + "maxLength": 100000, "required": false, "type": "string", }, @@ -16294,14 +16420,15 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "stx": { + "description": "Sync transaction metadata sent with mutations for idempotency and conflict detection.", "properties": { - "baseVersion": { - "description": "Entity version when read (for conflict detection)", + "lastReadVersion": { + "description": "Entity version when last read (for conflict detection)", "minimum": 0, "required": true, "type": "integer", }, - "id": { + "mutationId": { "description": "Unique mutation ID (nanoid)", "maxLength": 32, "required": true, @@ -16357,7 +16484,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "status": "unpublished", "stx": { "fieldVersions": {}, - "id": "4tufkeho7gg1xwx21e333ngq", + "mutationId": "4tufkeho7gg1xwx21e333ngq", "sourceId": "src_ujcbpukfple60p8h3tnk9zpo", "version": 1, }, @@ -16367,12 +16494,14 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/Page", "schema": { "contentType": "application/json", + "description": "A content page belonging to an organization.", "properties": { "createdAt": { "required": true, "type": "string", }, "createdBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -16400,10 +16529,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "keywords": { + "maxLength": 100000, "required": true, "type": "string", }, @@ -16415,6 +16546,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -16422,10 +16554,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, "parentId": { + "maxLength": 50, "required": true, "type": [ "string", @@ -16446,12 +16580,13 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "stx": { + "description": "Sync transaction metadata stored on entities for offline and realtime support.", "properties": { "fieldVersions": { "required": true, "type": "object", }, - "id": { + "mutationId": { "required": true, "type": "string", }, @@ -16469,6 +16604,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "object", }, "tenantId": { + "maxLength": 24, "required": true, "type": "string", }, @@ -16567,20 +16703,24 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/Request", "schema": { "contentType": "application/json", + "description": "A contact or waitlist submission from an unauthenticated user.", "properties": { "createdAt": { "required": true, "type": "string", }, "email": { + "maxLength": 255, "required": true, "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "message": { + "maxLength": 255, "required": true, "type": [ "string", @@ -16713,20 +16853,24 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "items": { "itemType": "object", "items": { + "description": "A contact or waitlist submission from an unauthenticated user.", "properties": { "createdAt": { "required": true, "type": "string", }, "email": { + "maxLength": 255, "required": true, "type": "string", }, "id": { + "maxLength": 50, "required": true, "type": "string", }, "message": { + "maxLength": 255, "required": true, "type": [ "string", @@ -16820,8 +16964,30 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` }, "responses": [ { - "description": "Requests deleted", - "status": 204, + "contentType": "application/json", + "description": "Success", + "schema": { + "contentType": "application/json", + "properties": { + "data": { + "required": true, + "type": "array", + }, + "rejectedItemIds": { + "description": "Identifiers of items that could not be processed", + "itemType": "string", + "required": true, + "type": "array", + }, + "rejectionReasons": { + "description": "Map of reason code to rejected item IDs", + "required": false, + "type": "object", + }, + }, + "type": "object", + }, + "status": 200, }, { "contentType": "application/json", @@ -16955,528 +17121,126 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, { - "operationId": "getUsers", + "operationId": "deleteUsers", "request": { - "query": { + "body": { + "contentType": "application/json", "properties": { - "limit": { - "required": false, - "type": "string", + "ids": { + "itemType": "string", + "maxItems": 50, + "minItems": 1, + "required": true, + "type": "array", }, - "offset": { - "required": false, - "type": "string", + }, + "required": true, + "type": "object", + }, + }, + "responses": [ + { + "contentType": "application/json", + "description": "Success", + "schema": { + "contentType": "application/json", + "properties": { + "data": { + "required": true, + "type": "array", + }, + "rejectedItemIds": { + "description": "Identifiers of items that could not be processed", + "itemType": "string", + "required": true, + "type": "array", + }, + "rejectionReasons": { + "description": "Map of reason code to rejected item IDs", + "required": false, + "type": "object", + }, }, - "order": { - "enum": [ - "asc", - "desc", - ], + "type": "object", + }, + "status": 200, + }, + { + "contentType": "application/json", + "description": "Bad request: problem processing request.", + "name": "BadRequestError", + "ref": "#/components/responses/BadRequestError", + "status": 400, + }, + { + "contentType": "application/json", + "description": "Unauthorized: authentication required.", + "name": "UnauthorizedError", + "ref": "#/components/responses/UnauthorizedError", + "status": 401, + }, + { + "contentType": "application/json", + "description": "Forbidden: insufficient permissions.", + "name": "ForbiddenError", + "ref": "#/components/responses/ForbiddenError", + "status": 403, + }, + { + "contentType": "application/json", + "description": "Not found: resource does not exist.", + "name": "NotFoundError", + "ref": "#/components/responses/NotFoundError", + "status": 404, + }, + { + "contentType": "application/json", + "description": "Rate limit: too many requests.", + "name": "TooManyRequestsError", + "ref": "#/components/responses/TooManyRequestsError", + "status": 429, + }, + ], + }, + { + "operationId": "updateUser", + "request": { + "body": { + "contentType": "application/json", + "properties": { + "bannerUrl": { + "maxLength": 2048, "required": false, - "type": "string", + "type": [ + "string", + "null", + ], }, - "q": { + "firstName": { "maxLength": 255, + "minLength": 2, "required": false, - "type": "string", - }, - "role": { - "enum": [ - "admin", + "type": [ + "string", + "null", ], - "required": false, - "type": "string", }, - "sort": { + "language": { "enum": [ - "id", - "name", - "email", - "role", - "createdAt", - "lastSeenAt", + "en", + "nl", ], "required": false, "type": "string", }, - "targetEntityId": { - "maxLength": 50, + "lastName": { + "maxLength": 255, + "minLength": 2, "required": false, - "type": "string", - }, - "targetEntityType": { - "enum": [ - "organization", - ], - "required": false, - "type": "string", - }, - }, - }, - }, - "responses": [ - { - "contentType": "application/json", - "description": "Users", - "example": { - "items": [ - { - "bannerUrl": null, - "createdAt": "2024-11-11T02:15:51.916Z", - "description": null, - "email": "becky.gutmann@gmail.com", - "entityType": "user", - "firstName": "Becky", - "id": "mybas8856dxliw6zkuiovvao", - "language": "en", - "lastName": "Gutmann", - "lastSeenAt": "2024-11-11T02:15:51.916Z", - "lastSignInAt": "2024-11-11T02:15:51.916Z", - "lastStartedAt": "2024-11-11T02:15:51.916Z", - "memberships": [ - { - "archived": false, - "contextType": "organization", - "displayOrder": 38, - "id": "300jor4orrvsgezqoyxfckg3", - "muted": false, - "organizationId": "fpb1r33xdbp099f3xi8028r0", - "role": "member", - "tenantId": "ifex0a", - "userId": "gu87zf240qkfh0faoqjip69q", - }, - ], - "mfaRequired": false, - "modifiedAt": "2024-11-11T02:15:51.916Z", - "modifiedBy": null, - "name": "Becky Gutmann", - "newsletter": true, - "slug": "beckygutmann", - "thumbnailUrl": null, - "userFlags": {}, - }, - { - "bannerUrl": null, - "createdAt": "2024-05-19T00:16:13.149Z", - "description": null, - "email": "lonie_kuhn75@gmail.com", - "entityType": "user", - "firstName": "Lonie", - "id": "rfau2m1vkjc8nvp8e05meqcc", - "language": "en", - "lastName": "Kuhn", - "lastSeenAt": "2024-05-19T00:16:13.149Z", - "lastSignInAt": "2024-05-19T00:16:13.149Z", - "lastStartedAt": "2024-05-19T00:16:13.149Z", - "memberships": [ - { - "archived": false, - "contextType": "organization", - "displayOrder": 7, - "id": "1u44cckbz5av195r4h3wiruz", - "muted": false, - "organizationId": "eylomg4p6xgvt4g11e2hqqxx", - "role": "admin", - "tenantId": "44b7wk", - "userId": "ilwj64zmkwsnsmrzo2zxd2hr", - }, - ], - "mfaRequired": false, - "modifiedAt": "2024-05-19T00:16:13.149Z", - "modifiedBy": null, - "name": "Lonie Kuhn", - "newsletter": true, - "slug": "loniekuhn64", - "thumbnailUrl": null, - "userFlags": {}, - }, - ], - "total": 2, - }, - "schema": { - "contentType": "application/json", - "properties": { - "items": { - "itemType": "object", - "items": { - "extendsRef": "#/components/schemas/User", - "properties": { - "bannerUrl": { - "required": true, - "type": [ - "string", - "null", - ], - }, - "createdAt": { - "required": true, - "type": "string", - }, - "description": { - "required": true, - "type": [ - "string", - "null", - ], - }, - "email": { - "format": "email", - "required": true, - "type": "string", - }, - "entityType": { - "enum": [ - "user", - ], - "required": true, - "type": "string", - }, - "firstName": { - "required": true, - "type": [ - "string", - "null", - ], - }, - "id": { - "required": true, - "type": "string", - }, - "language": { - "enum": [ - "en", - "nl", - ], - "required": true, - "type": "string", - }, - "lastName": { - "required": true, - "type": [ - "string", - "null", - ], - }, - "lastSeenAt": { - "anyOf": [ - { - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], - "required": true, - }, - "lastSignInAt": { - "required": true, - "type": [ - "string", - "null", - ], - }, - "lastStartedAt": { - "required": true, - "type": [ - "string", - "null", - ], - }, - "memberships": { - "itemType": "object", - "items": { - "properties": { - "archived": { - "required": true, - "type": "boolean", - }, - "contextType": { - "enum": [ - "organization", - ], - "required": true, - "type": "string", - }, - "displayOrder": { - "maximum": 140737488355327, - "minimum": -140737488355328, - "required": true, - "type": "number", - }, - "id": { - "required": true, - "type": "string", - }, - "muted": { - "required": true, - "type": "boolean", - }, - "organizationId": { - "required": true, - "type": "string", - }, - "role": { - "enum": [ - "admin", - "member", - ], - "required": true, - "type": "string", - }, - "tenantId": { - "required": true, - "type": "string", - }, - "userId": { - "required": true, - "type": "string", - }, - }, - "ref": "#/components/schemas/MembershipBase", - "type": "object", - }, - "ref": "#/components/schemas/MembershipBase", - "required": true, - "type": "array", - }, - "mfaRequired": { - "required": true, - "type": "boolean", - }, - "modifiedAt": { - "required": true, - "type": [ - "string", - "null", - ], - }, - "modifiedBy": { - "required": true, - "type": [ - "string", - "null", - ], - }, - "name": { - "required": true, - "type": "string", - }, - "newsletter": { - "required": true, - "type": "boolean", - }, - "role": { - "anyOf": [ - { - "enum": [ - "admin", - ], - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], - "required": false, - }, - "slug": { - "required": true, - "type": "string", - }, - "thumbnailUrl": { - "required": true, - "type": [ - "string", - "null", - ], - }, - "userFlags": { - "properties": { - "finishedOnboarding": { - "required": true, - "type": "boolean", - }, - }, - "required": true, - "type": "object", - }, - }, - "type": "object", - }, - "required": true, - "type": "array", - }, - "total": { - "required": true, - "type": "number", - }, - }, - "type": "object", - }, - "status": 200, - }, - { - "contentType": "application/json", - "description": "Bad request: problem processing request.", - "name": "BadRequestError", - "ref": "#/components/responses/BadRequestError", - "status": 400, - }, - { - "contentType": "application/json", - "description": "Unauthorized: authentication required.", - "name": "UnauthorizedError", - "ref": "#/components/responses/UnauthorizedError", - "status": 401, - }, - { - "contentType": "application/json", - "description": "Forbidden: insufficient permissions.", - "name": "ForbiddenError", - "ref": "#/components/responses/ForbiddenError", - "status": 403, - }, - { - "contentType": "application/json", - "description": "Not found: resource does not exist.", - "name": "NotFoundError", - "ref": "#/components/responses/NotFoundError", - "status": 404, - }, - { - "contentType": "application/json", - "description": "Rate limit: too many requests.", - "name": "TooManyRequestsError", - "ref": "#/components/responses/TooManyRequestsError", - "status": 429, - }, - ], - }, - { - "operationId": "deleteUsers", - "request": { - "body": { - "contentType": "application/json", - "properties": { - "ids": { - "itemType": "string", - "maxItems": 50, - "minItems": 1, - "required": true, - "type": "array", - }, - }, - "required": true, - "type": "object", - }, - }, - "responses": [ - { - "contentType": "application/json", - "description": "Success", - "schema": { - "contentType": "application/json", - "properties": { - "data": { - "required": true, - "type": "array", - }, - "rejectedItemIds": { - "description": "Identifiers of items that could not be processed", - "itemType": "string", - "required": true, - "type": "array", - }, - "rejectionReasons": { - "description": "Map of reason code to rejected item IDs", - "required": false, - "type": "object", - }, - }, - "type": "object", - }, - "status": 200, - }, - { - "contentType": "application/json", - "description": "Bad request: problem processing request.", - "name": "BadRequestError", - "ref": "#/components/responses/BadRequestError", - "status": 400, - }, - { - "contentType": "application/json", - "description": "Unauthorized: authentication required.", - "name": "UnauthorizedError", - "ref": "#/components/responses/UnauthorizedError", - "status": 401, - }, - { - "contentType": "application/json", - "description": "Forbidden: insufficient permissions.", - "name": "ForbiddenError", - "ref": "#/components/responses/ForbiddenError", - "status": 403, - }, - { - "contentType": "application/json", - "description": "Not found: resource does not exist.", - "name": "NotFoundError", - "ref": "#/components/responses/NotFoundError", - "status": 404, - }, - { - "contentType": "application/json", - "description": "Rate limit: too many requests.", - "name": "TooManyRequestsError", - "ref": "#/components/responses/TooManyRequestsError", - "status": 429, - }, - ], - }, - { - "operationId": "updateUser", - "request": { - "body": { - "contentType": "application/json", - "properties": { - "bannerUrl": { - "maxLength": 2048, - "required": false, - "type": [ - "string", - "null", - ], - }, - "firstName": { - "maxLength": 255, - "minLength": 2, - "required": false, - "type": [ - "string", - "null", - ], - }, - "language": { - "enum": [ - "en", - "nl", - ], - "required": false, - "type": "string", - }, - "lastName": { - "maxLength": 255, - "minLength": 2, - "required": false, - "type": [ - "string", - "null", - ], + "type": [ + "string", + "null", + ], }, "newsletter": { "required": false, @@ -17540,8 +17304,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/User", "schema": { "contentType": "application/json", + "description": "A user with profile data and last-seen activity timestamp.", "properties": { "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -17572,6 +17338,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "firstName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -17579,6 +17346,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -17591,6 +17359,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "lastName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -17598,17 +17367,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "lastSeenAt": { - "anyOf": [ - { - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], "required": true, + "type": [ + "string", + "null", + ], }, "lastSignInAt": { "required": true, @@ -17636,6 +17399,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -17643,6 +17407,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, @@ -17651,10 +17416,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -17920,6 +17687,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "items": { "itemType": "object", "items": { + "description": "A tenant representing an isolated data partition for multi-tenancy.", "properties": { "createdAt": { "required": true, @@ -18041,6 +17809,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/Tenant", "schema": { "contentType": "application/json", + "description": "A tenant representing an isolated data partition for multi-tenancy.", "properties": { "createdAt": { "required": true, @@ -18138,6 +17907,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/Tenant", "schema": { "contentType": "application/json", + "description": "A tenant representing an isolated data partition for multi-tenancy.", "properties": { "createdAt": { "required": true, @@ -18257,6 +18027,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/Tenant", "schema": { "contentType": "application/json", + "description": "A tenant representing an isolated data partition for multi-tenancy.", "properties": { "createdAt": { "required": true, @@ -18404,20 +18175,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` { "operationId": "getUsers", "request": { - "path": { - "properties": { - "orgId": { - "maxLength": 50, - "required": true, - "type": "string", - }, - "tenantId": { - "maxLength": 50, - "required": true, - "type": "string", - }, - }, - }, "query": { "properties": { "limit": { @@ -18460,18 +18217,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "required": false, "type": "string", }, - "targetEntityId": { - "maxLength": 50, - "required": false, - "type": "string", - }, - "targetEntityType": { - "enum": [ - "organization", - ], - "required": false, - "type": "string", - }, }, }, }, @@ -18502,6 +18247,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "300jor4orrvsgezqoyxfckg3", "muted": false, "organizationId": "fpb1r33xdbp099f3xi8028r0", + "organizationSlug": "mock-organization-slug", "role": "member", "tenantId": "ifex0a", "userId": "gu87zf240qkfh0faoqjip69q", @@ -18537,6 +18283,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "id": "1u44cckbz5av195r4h3wiruz", "muted": false, "organizationId": "eylomg4p6xgvt4g11e2hqqxx", + "organizationSlug": "mock-organization-slug", "role": "admin", "tenantId": "44b7wk", "userId": "ilwj64zmkwsnsmrzo2zxd2hr", @@ -18560,9 +18307,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "items": { "itemType": "object", "items": { + "description": "A user with profile data and last-seen activity timestamp.", "extendsRef": "#/components/schemas/User", "properties": { "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -18593,6 +18342,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "firstName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -18600,6 +18350,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -18612,6 +18363,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "lastName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -18619,17 +18371,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "lastSeenAt": { - "anyOf": [ - { - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], "required": true, + "type": [ + "string", + "null", + ], }, "lastSignInAt": { "required": true, @@ -18645,63 +18391,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "null", ], }, - "memberships": { - "itemType": "object", - "items": { - "properties": { - "archived": { - "required": true, - "type": "boolean", - }, - "contextType": { - "enum": [ - "organization", - ], - "required": true, - "type": "string", - }, - "displayOrder": { - "maximum": 140737488355327, - "minimum": -140737488355328, - "required": true, - "type": "number", - }, - "id": { - "required": true, - "type": "string", - }, - "muted": { - "required": true, - "type": "boolean", - }, - "organizationId": { - "required": true, - "type": "string", - }, - "role": { - "enum": [ - "admin", - "member", - ], - "required": true, - "type": "string", - }, - "tenantId": { - "required": true, - "type": "string", - }, - "userId": { - "required": true, - "type": "string", - }, - }, - "ref": "#/components/schemas/MembershipBase", - "type": "object", - }, - "ref": "#/components/schemas/MembershipBase", - "required": true, - "type": "array", - }, "mfaRequired": { "required": true, "type": "boolean", @@ -18714,6 +18403,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -18721,6 +18411,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, @@ -18729,26 +18420,23 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "role": { - "anyOf": [ - { - "enum": [ - "admin", - ], - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, + "enum": [ + "admin", + null, ], "required": false, + "type": [ + "string", + "null", + ], }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -18822,16 +18510,6 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "request": { "path": { "properties": { - "orgId": { - "maxLength": 50, - "required": true, - "type": "string", - }, - "tenantId": { - "maxLength": 50, - "required": true, - "type": "string", - }, "userId": { "maxLength": 50, "required": true, @@ -18887,8 +18565,10 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "ref": "#/components/schemas/User", "schema": { "contentType": "application/json", + "description": "A user with profile data and last-seen activity timestamp.", "properties": { "bannerUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -18919,6 +18599,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "firstName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -18926,6 +18607,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "id": { + "maxLength": 50, "required": true, "type": "string", }, @@ -18938,6 +18620,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "string", }, "lastName": { + "maxLength": 255, "required": true, "type": [ "string", @@ -18945,17 +18628,11 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "lastSeenAt": { - "anyOf": [ - { - "required": false, - "type": "string", - }, - { - "required": false, - "type": "null", - }, - ], "required": true, + "type": [ + "string", + "null", + ], }, "lastSignInAt": { "required": true, @@ -18983,6 +18660,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "modifiedBy": { + "maxLength": 50, "required": true, "type": [ "string", @@ -18990,6 +18668,7 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` ], }, "name": { + "maxLength": 255, "required": true, "type": "string", }, @@ -18998,10 +18677,12 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "type": "boolean", }, "slug": { + "maxLength": 255, "required": true, "type": "string", }, "thumbnailUrl": { + "maxLength": 2048, "required": true, "type": [ "string", @@ -19066,91 +18747,93 @@ exports[`parseOpenApiSpec > parses cella backend spec correctly 1`] = ` "tags": [ { "count": 11, - "description": "Endpoints related to the *current user*, meaning the user associated with the active session making - the request. These routes are distinct from general \`users\` endpoints: while \`users\` may operate on - any user in the system, \`me\` endpoints are scoped exclusively to the *current user* and follow a - different authorization flow.", + "description": "Operations scoped to the current user (the user associated with the active session). Includes + profile management, session control, MFA toggling, upload token generation, viewing and responding + to membership invitations, leaving entities, and email unsubscription. Distinct from \`users\` + operations, which target any user in the system.", "name": "me", }, { "count": 2, - "description": "Endpoints for managing *users* at the system level. Unlike context entities (such as - \`organizations\`), a \`user\` is a "global" entity and not scoped to a specific context. These endpoints - are intended for administrative operations on any user in the system.", + "description": "Read-only operations for listing and retrieving users within an organization context. Write + operations on users are handled by the \`me\` (self) and \`system\` (admin) modules.", "name": "users", }, { "count": 6, - "description": "Endpoints for managing *memberships*, which represent one-to-one relationships between a - \`user\` and a contextual \`entity\` (e.g., an \`organization\`). Each membership includes role information - and status flags such as \`archived\` or \`muted\`. Memberships can also reference parent entities, - enabling hierarchical context.", + "description": "Operations for managing memberships, which represent relationships between a user and a + context entity (e.g., an organization). Includes inviting users, accepting or rejecting invitations, + updating role and status flags (archived, muted), listing members and pending invitations, and + removing memberships.", "name": "memberships", }, { "count": 5, - "description": "Endpoints for managing \`organizations\`, which are core context entities. Organizations are - the highest ancestor in the parent hierarchy. They define access boundaries and are often the minimal - primary scope for permission and resource management.", + "description": "Operations for managing organizations, which are core context entities and the highest + ancestor in the entity hierarchy. Supports creating, listing, retrieving, updating, and deleting + organizations within a tenant. Cross-tenant listing is available with elevated permissions.", "name": "organizations", }, { "count": 3, - "description": "Endpoints for handling incoming *requests* such as contact form submissions, newsletter signups, - and waitlist entries.", + "description": "Operations for handling public form submissions such as contact messages, newsletter signups, + and waitlist entries. Submission is public with bot protection and rate limiting. Listing and + deletion require system admin access.", "name": "requests", }, { "count": 3, - "description": "Endpoints that operate across multiple *entity types*, such as \`users\` and \`organizations\`. - *Entities* are identifiable domain objects that may be contextual, hierarchical (with parent/child - relations), or actor-like. These endpoints offer shared logic across modules, including slug validation - and entity visibility.", + "description": "Cross-cutting operations that apply across multiple entity types. Includes slug availability + checking and real-time SSE streaming (both a public stream for unauthenticated entity updates and + an authenticated app stream for per-user entity and membership notifications).", "name": "entities", }, { - "count": 6, - "description": "*System level* endpoints for administrative actions and platform wide functionality. These endpoints - support operations such as user invitations, file uploads, and webhook handling.", + "count": 5, + "description": "System admin operations for platform-wide user management. Includes listing, updating, and + deleting users, sending system-level invitations, sending newsletters, and handling payment + webhooks.", "name": "system", }, { "count": 27, - "description": "*Authentication* endpoints supporting multiple sign-in methods, including email/password, OAuth - (Google, Microsoft, GitHub), and passkeys (WebAuthn). These routes cover user sign-up, sign-in, password - recovery, email verification, account linking, and impersonation for system admins.", + "description": "Authentication operations supporting multiple sign-in methods: email/password, OAuth (GitHub, + Google, Microsoft), passkeys (WebAuthn), and TOTP. Covers sign-up, sign-in, sign-out, password + reset, token invocation, email checking, admin impersonation, and MFA credential management.", "name": "auth", }, { "count": 7, - "description": "Endpoints for managing file based *attachments* (e.g. images, PDFs, documents) linked to - entities such as organizations or users. Files are uploaded directly by the client; the API handles - metadata registration, linking, access, and preview utilities.", + "description": "Operations for managing file-based attachments (e.g., images, documents) linked to entities. + Files are uploaded directly by the client to S3; the API handles metadata registration, retrieval, + updates, deletion of records, and presigned URL generation for private files.", "name": "attachments", }, { "count": 5, - "description": "Endpoints for managing *pages*, which are product entities supporting realtime sync and offline - capabilities. Pages can be organized hierarchically and are used in /docs.", + "description": "Operations for managing pages, which are content entities with public read access. Read operations + are publicly available with caching. Write operations (create, update, delete) require system admin + access and are scoped to a tenant.", "name": "pages", }, { "count": 5, - "description": "Endpoints for retrieving system level statistics and basic observability data. Includes internal - metrics as well as simple, high level counts for entities such as \`users\` and \`organizations\`.", + "description": "Operations for retrieving system-level statistics and observability data. Includes public entity + counts (cached, with bot protection), raw system metrics, Node.js runtime metrics, entity cache + stats, and CDC sync pipeline metrics. Detailed metrics require system admin access.", "name": "metrics", }, { "count": 1, - "description": "Endpoints for retrieving *activities* (audit log entries). Activities track create, update, and - delete operations across all resources. This serves as an audit trail and can be extended for webhook - delivery.", + "description": "Operations for retrieving activities (audit log entries). Activities track create, update, and + delete events across all resources. Read-only, system admin access only.", "name": "activities", }, { "count": 5, - "description": "System-level endpoints for managing *tenants*. Tenants are top-level isolation boundaries used by - Row-Level Security (RLS) to partition data. Only system administrators can manage tenants.", + "description": "System admin operations for managing tenants. Tenants are top-level isolation boundaries used by + Row-Level Security (RLS) to partition data. Supports listing, retrieving, creating, updating, and + soft-deleting (archiving) tenants.", "name": "tenants", }, ], diff --git a/shared/default-config.ts b/shared/default-config.ts index 2101beb98..fda20b226 100644 --- a/shared/default-config.ts +++ b/shared/default-config.ts @@ -32,6 +32,11 @@ export const config = { page: 'pageId', } as const, + /** Maps context entity types to their slug column names - must match contextEntityTypes */ + entitySlugColumnKeys: { + organization: 'organizationSlug', + } as const, + /** Available CRUD actions for permission checks */ entityActions: ['create', 'read', 'update', 'delete', 'search'] as const, diff --git a/shared/src/builder/types.ts b/shared/src/builder/types.ts index 2303ba7f0..e7309f0db 100644 --- a/shared/src/builder/types.ts +++ b/shared/src/builder/types.ts @@ -153,6 +153,7 @@ export interface RequiredConfig; + entitySlugColumnKeys: Record; entityActions: T['entityActions']; resourceTypes: T['resourceTypes']; menuStructure: readonly MenuStructureItem[];