{
  "schemaVersion": 1,
  "sensitiveFieldsExcluded": true,
  "generatedAt": "1970-01-01T00:00:00.000Z",
  "packageName": "@happyvertical/smrt-social",
  "packageVersion": "0.49.2",
  "sourceManifestPath": "dist/manifest.json",
  "agentDocPath": "AGENTS.md",
  "sourceHashes": {
    "manifest": "c6245cb4d9488e5d51d5fbccaa89d847772b05bc2a3aac70ffd266e0023dc914",
    "packageJson": "266329e77dd864b1edccf68c38795e8ca50e8d04b02f10061395f10da684ce8c",
    "agents": "f31b84b31431fcb43ab480fafd9684d91f0e55a935e95aa31fd19ea1f31b0ad4"
  },
  "exports": [
    ".",
    "./manifest",
    "./manifest.json",
    "./server",
    "./svelte"
  ],
  "dependencies": {
    "@happyvertical/smrt-config": "workspace:*",
    "@happyvertical/smrt-content": "workspace:*",
    "@happyvertical/smrt-core": "workspace:*",
    "@happyvertical/smrt-secrets": "workspace:*",
    "@happyvertical/smrt-tenancy": "workspace:*",
    "@happyvertical/smrt-ui": "workspace:*",
    "@happyvertical/smrt-video": "workspace:*",
    "@happyvertical/utils": "catalog:",
    "@happyvertical/logger": "catalog:",
    "@happyvertical/smrt-vitest": "workspace:*",
    "@happyvertical/sql": "catalog:",
    "@sveltejs/package": "^2.5.8",
    "@types/node": "24.13.2",
    "svelte": "^5.56.4",
    "svelte-check": "^4.7.1",
    "typescript": "5.9.3",
    "vite": "8.1.4",
    "vitest": "4.1.10"
  },
  "smrtDependencies": [
    "@happyvertical/smrt-config",
    "@happyvertical/smrt-content",
    "@happyvertical/smrt-core",
    "@happyvertical/smrt-secrets",
    "@happyvertical/smrt-tenancy",
    "@happyvertical/smrt-ui",
    "@happyvertical/smrt-video",
    "@happyvertical/smrt-vitest"
  ],
  "sdkDependencies": [
    "@happyvertical/logger",
    "@happyvertical/sql",
    "@happyvertical/utils"
  ],
  "tags": [],
  "risks": [],
  "objects": [
    {
      "name": "OAuthState",
      "qualifiedName": "@happyvertical/smrt-social:OAuthState",
      "collection": "oauthstates",
      "tableName": "oauth_states",
      "packageName": "@happyvertical/smrt-social",
      "extends": "SmrtObject",
      "fields": [
        {
          "name": "created_at",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        },
        {
          "name": "updated_at",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        },
        {
          "name": "tenantId",
          "type": "text",
          "required": false,
          "columnType": "UUID"
        },
        {
          "name": "platform",
          "type": "text",
          "required": false,
          "columnType": "TEXT",
          "default": "youtube"
        },
        {
          "name": "state",
          "type": "text",
          "required": false,
          "columnType": "TEXT",
          "default": ""
        },
        {
          "name": "codeVerifier",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "redirectUri",
          "type": "text",
          "required": false,
          "columnType": "TEXT",
          "default": ""
        },
        {
          "name": "scopes",
          "type": "json",
          "required": false,
          "columnType": "JSON",
          "default": []
        },
        {
          "name": "expiresAt",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        }
      ],
      "relationships": [],
      "methods": [
        "generateCodeChallenge",
        "generateCodeVerifier",
        "generateState",
        "verifyState"
      ],
      "methodSignatures": [
        {
          "name": "generateCodeChallenge",
          "async": true,
          "static": true,
          "params": [
            "verifier: string"
          ],
          "returns": "Promise<string>"
        },
        {
          "name": "generateCodeVerifier",
          "static": true,
          "returns": "string"
        },
        {
          "name": "generateState",
          "static": true,
          "returns": "string"
        },
        {
          "name": "verifyState",
          "params": [
            "callbackState: string"
          ],
          "returns": "boolean"
        }
      ],
      "tenant": {
        "scoped": true,
        "mode": "optional",
        "field": "tenantId"
      },
      "tableStrategy": "sti",
      "conflictColumns": [
        "tenant_id",
        "slug",
        "context",
        "_meta_type"
      ],
      "surfaces": [
        {
          "kind": "api",
          "name": "oauthstates.list",
          "operation": "list",
          "objectName": "@happyvertical/smrt-social:OAuthState",
          "path": "/oauthstates",
          "method": "GET"
        },
        {
          "kind": "api",
          "name": "oauthstates.get",
          "operation": "get",
          "objectName": "@happyvertical/smrt-social:OAuthState",
          "path": "/oauthstates/[id]",
          "method": "GET"
        },
        {
          "kind": "api",
          "name": "oauthstates.create",
          "operation": "create",
          "objectName": "@happyvertical/smrt-social:OAuthState",
          "path": "/oauthstates",
          "method": "POST"
        },
        {
          "kind": "api",
          "name": "oauthstates.delete",
          "operation": "delete",
          "objectName": "@happyvertical/smrt-social:OAuthState",
          "path": "/oauthstates/[id]",
          "method": "DELETE"
        },
        {
          "kind": "cli",
          "name": "oauthstate_list",
          "operation": "list",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        },
        {
          "kind": "cli",
          "name": "oauthstate_get",
          "operation": "get",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        },
        {
          "kind": "cli",
          "name": "oauthstate_create",
          "operation": "create",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        },
        {
          "kind": "cli",
          "name": "oauthstate_update",
          "operation": "update",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        },
        {
          "kind": "cli",
          "name": "oauthstate_delete",
          "operation": "delete",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        },
        {
          "kind": "cli",
          "name": "oauthstate_verifyState",
          "operation": "verifyState",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        },
        {
          "kind": "cli",
          "name": "oauthstate_generateState",
          "operation": "generateState",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        },
        {
          "kind": "cli",
          "name": "oauthstate_generateCodeVerifier",
          "operation": "generateCodeVerifier",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        },
        {
          "kind": "cli",
          "name": "oauthstate_generateCodeChallenge",
          "operation": "generateCodeChallenge",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        }
      ],
      "withheldSurfaces": [
        {
          "kind": "api",
          "operation": "generateCodeChallenge",
          "code": "not-included",
          "reason": "not listed in api.include",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        },
        {
          "kind": "api",
          "operation": "generateCodeVerifier",
          "code": "not-included",
          "reason": "not listed in api.include",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        },
        {
          "kind": "api",
          "operation": "generateState",
          "code": "not-included",
          "reason": "not listed in api.include",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        },
        {
          "kind": "api",
          "operation": "verifyState",
          "code": "not-included",
          "reason": "not listed in api.include",
          "objectName": "@happyvertical/smrt-social:OAuthState"
        }
      ],
      "relationshipFeatures": [
        "uuidColumns"
      ],
      "tags": [],
      "risks": []
    },
    {
      "name": "SocialAccount",
      "qualifiedName": "@happyvertical/smrt-social:SocialAccount",
      "collection": "socialaccounts",
      "tableName": "social_accounts",
      "packageName": "@happyvertical/smrt-social",
      "extends": "SmrtObject",
      "fields": [
        {
          "name": "created_at",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        },
        {
          "name": "updated_at",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        },
        {
          "name": "tenantId",
          "type": "text",
          "required": false,
          "columnType": "UUID"
        },
        {
          "name": "name",
          "type": "text",
          "required": false,
          "columnType": "TEXT",
          "default": ""
        },
        {
          "name": "platform",
          "type": "text",
          "required": false,
          "columnType": "TEXT",
          "default": "youtube"
        },
        {
          "name": "platformUserId",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "platformUsername",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "platformUrl",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "accessToken",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "refreshToken",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "credentialSecretId",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "accessTokenSecretName",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "refreshTokenSecretName",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "tokenExpiresAt",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        },
        {
          "name": "isActive",
          "type": "boolean",
          "required": false,
          "columnType": "BOOLEAN",
          "default": true
        },
        {
          "name": "defaultHashtags",
          "type": "json",
          "required": false,
          "columnType": "JSON",
          "default": []
        },
        {
          "name": "scopes",
          "type": "json",
          "required": false,
          "columnType": "JSON",
          "default": []
        },
        {
          "name": "missingPermissions",
          "type": "json",
          "required": false,
          "columnType": "JSON",
          "default": []
        },
        {
          "name": "linkBehavior",
          "type": "text",
          "required": false,
          "columnType": "TEXT",
          "default": "description"
        },
        {
          "name": "publishMode",
          "type": "text",
          "required": false,
          "columnType": "TEXT",
          "default": "dry_run"
        },
        {
          "name": "publicPublishingAllowed",
          "type": "boolean",
          "required": false,
          "columnType": "BOOLEAN",
          "default": false
        },
        {
          "name": "status",
          "type": "text",
          "required": false,
          "columnType": "TEXT",
          "default": "connected"
        },
        {
          "name": "errorMessage",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        }
      ],
      "relationships": [],
      "methods": [
        "getCredentials",
        "getSlug",
        "setCredentials"
      ],
      "methodSignatures": [
        {
          "name": "getCredentials",
          "async": true,
          "returns": "Promise<Record<string, unknown> | null>"
        },
        {
          "name": "getSlug",
          "async": true,
          "returns": "Promise<string | null | undefined>"
        },
        {
          "name": "setCredentials",
          "async": true,
          "params": [
            "credentials: Record<string, unknown>",
            "options?: object"
          ],
          "returns": "Promise<void>"
        }
      ],
      "tenant": {
        "scoped": true,
        "mode": "optional",
        "field": "tenantId"
      },
      "tableStrategy": "sti",
      "conflictColumns": [
        "tenant_id",
        "slug",
        "context",
        "_meta_type"
      ],
      "surfaces": [
        {
          "kind": "api",
          "name": "socialaccounts.list",
          "operation": "list",
          "objectName": "@happyvertical/smrt-social:SocialAccount",
          "path": "/socialaccounts",
          "method": "GET"
        },
        {
          "kind": "api",
          "name": "socialaccounts.get",
          "operation": "get",
          "objectName": "@happyvertical/smrt-social:SocialAccount",
          "path": "/socialaccounts/[id]",
          "method": "GET"
        },
        {
          "kind": "api",
          "name": "socialaccounts.create",
          "operation": "create",
          "objectName": "@happyvertical/smrt-social:SocialAccount",
          "path": "/socialaccounts",
          "method": "POST"
        },
        {
          "kind": "api",
          "name": "socialaccounts.update",
          "operation": "update",
          "objectName": "@happyvertical/smrt-social:SocialAccount",
          "path": "/socialaccounts/[id]",
          "method": "PATCH"
        },
        {
          "kind": "api",
          "name": "socialaccounts.delete",
          "operation": "delete",
          "objectName": "@happyvertical/smrt-social:SocialAccount",
          "path": "/socialaccounts/[id]",
          "method": "DELETE"
        },
        {
          "kind": "cli",
          "name": "socialaccount_list",
          "operation": "list",
          "objectName": "@happyvertical/smrt-social:SocialAccount"
        },
        {
          "kind": "cli",
          "name": "socialaccount_get",
          "operation": "get",
          "objectName": "@happyvertical/smrt-social:SocialAccount"
        },
        {
          "kind": "cli",
          "name": "socialaccount_create",
          "operation": "create",
          "objectName": "@happyvertical/smrt-social:SocialAccount"
        },
        {
          "kind": "cli",
          "name": "socialaccount_update",
          "operation": "update",
          "objectName": "@happyvertical/smrt-social:SocialAccount"
        },
        {
          "kind": "cli",
          "name": "socialaccount_delete",
          "operation": "delete",
          "objectName": "@happyvertical/smrt-social:SocialAccount"
        },
        {
          "kind": "cli",
          "name": "socialaccount_setCredentials",
          "operation": "setCredentials",
          "objectName": "@happyvertical/smrt-social:SocialAccount"
        },
        {
          "kind": "cli",
          "name": "socialaccount_getCredentials",
          "operation": "getCredentials",
          "objectName": "@happyvertical/smrt-social:SocialAccount"
        },
        {
          "kind": "mcp",
          "name": "socialaccount_list",
          "operation": "list",
          "objectName": "@happyvertical/smrt-social:SocialAccount"
        },
        {
          "kind": "mcp",
          "name": "socialaccount_get",
          "operation": "get",
          "objectName": "@happyvertical/smrt-social:SocialAccount"
        }
      ],
      "withheldSurfaces": [
        {
          "kind": "api",
          "operation": "getCredentials",
          "code": "not-included",
          "reason": "not listed in api.include",
          "objectName": "@happyvertical/smrt-social:SocialAccount"
        },
        {
          "kind": "api",
          "operation": "getSlug",
          "code": "lifecycle-method",
          "reason": "`getSlug` is a framework lifecycle method, not a distinct operation",
          "objectName": "@happyvertical/smrt-social:SocialAccount"
        },
        {
          "kind": "api",
          "operation": "setCredentials",
          "code": "not-included",
          "reason": "not listed in api.include",
          "objectName": "@happyvertical/smrt-social:SocialAccount"
        }
      ],
      "relationshipFeatures": [
        "uuidColumns"
      ],
      "tags": [],
      "risks": []
    },
    {
      "name": "SocialPostAnalyticsSnapshot",
      "qualifiedName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot",
      "collection": "socialpostanalyticssnapshots",
      "tableName": "social_post_analytics_snapshots",
      "packageName": "@happyvertical/smrt-social",
      "extends": "SmrtObject",
      "fields": [
        {
          "name": "created_at",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        },
        {
          "name": "updated_at",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        },
        {
          "name": "tenantId",
          "type": "text",
          "required": false,
          "columnType": "UUID"
        },
        {
          "name": "socialPostId",
          "type": "foreignKey",
          "required": false,
          "related": "SocialPost",
          "columnType": "UUID"
        },
        {
          "name": "platform",
          "type": "text",
          "required": true,
          "columnType": "TEXT"
        },
        {
          "name": "analytics",
          "type": "json",
          "required": false,
          "columnType": "JSON"
        },
        {
          "name": "raw",
          "type": "json",
          "required": false,
          "columnType": "JSON"
        },
        {
          "name": "capturedAt",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        }
      ],
      "relationships": [
        {
          "name": "socialPostId",
          "type": "foreignKey",
          "required": false,
          "related": "SocialPost",
          "columnType": "UUID"
        }
      ],
      "methods": [],
      "tenant": {
        "scoped": true,
        "mode": "optional",
        "field": "tenantId"
      },
      "tableStrategy": "sti",
      "conflictColumns": [
        "tenant_id",
        "slug",
        "context",
        "_meta_type"
      ],
      "surfaces": [
        {
          "kind": "api",
          "name": "socialpostanalyticssnapshots.list",
          "operation": "list",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot",
          "path": "/socialpostanalyticssnapshots",
          "method": "GET"
        },
        {
          "kind": "api",
          "name": "socialpostanalyticssnapshots.get",
          "operation": "get",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot",
          "path": "/socialpostanalyticssnapshots/[id]",
          "method": "GET"
        },
        {
          "kind": "api",
          "name": "socialpostanalyticssnapshots.create",
          "operation": "create",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot",
          "path": "/socialpostanalyticssnapshots",
          "method": "POST"
        },
        {
          "kind": "api",
          "name": "socialpostanalyticssnapshots.delete",
          "operation": "delete",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot",
          "path": "/socialpostanalyticssnapshots/[id]",
          "method": "DELETE"
        },
        {
          "kind": "cli",
          "name": "socialpostanalyticssnapshot_list",
          "operation": "list",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
        },
        {
          "kind": "cli",
          "name": "socialpostanalyticssnapshot_get",
          "operation": "get",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
        },
        {
          "kind": "cli",
          "name": "socialpostanalyticssnapshot_create",
          "operation": "create",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
        },
        {
          "kind": "cli",
          "name": "socialpostanalyticssnapshot_update",
          "operation": "update",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
        },
        {
          "kind": "cli",
          "name": "socialpostanalyticssnapshot_delete",
          "operation": "delete",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
        },
        {
          "kind": "mcp",
          "name": "socialpostanalyticssnapshot_list",
          "operation": "list",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
        },
        {
          "kind": "mcp",
          "name": "socialpostanalyticssnapshot_get",
          "operation": "get",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
        }
      ],
      "relationshipFeatures": [
        "foreignKey",
        "uuidColumns"
      ],
      "tags": [],
      "risks": []
    },
    {
      "name": "SocialPost",
      "qualifiedName": "@happyvertical/smrt-social:SocialPost",
      "collection": "socialposts",
      "tableName": "social_posts",
      "packageName": "@happyvertical/smrt-social",
      "extends": "SmrtObject",
      "fields": [
        {
          "name": "created_at",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        },
        {
          "name": "updated_at",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        },
        {
          "name": "tenantId",
          "type": "text",
          "required": false,
          "columnType": "UUID"
        },
        {
          "name": "socialAccountId",
          "type": "foreignKey",
          "required": false,
          "related": "SocialAccount",
          "columnType": "UUID"
        },
        {
          "name": "videoContentId",
          "type": "crossPackageRef",
          "required": false,
          "related": "@happyvertical/smrt-video:VideoContent",
          "columnType": "UUID"
        },
        {
          "name": "contentId",
          "type": "crossPackageRef",
          "required": false,
          "related": "@happyvertical/smrt-content:Content",
          "columnType": "UUID"
        },
        {
          "name": "postType",
          "type": "text",
          "required": false,
          "columnType": "TEXT",
          "default": "text"
        },
        {
          "name": "mediaUrl",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "title",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "description",
          "type": "text",
          "required": false,
          "columnType": "TEXT",
          "default": ""
        },
        {
          "name": "hashtags",
          "type": "json",
          "required": false,
          "columnType": "JSON",
          "default": []
        },
        {
          "name": "linkUrl",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "platformPostId",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "platformUrl",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "scheduledAt",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        },
        {
          "name": "publishedAt",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        },
        {
          "name": "status",
          "type": "text",
          "required": false,
          "columnType": "TEXT",
          "default": "draft"
        },
        {
          "name": "errorMessage",
          "type": "text",
          "required": false,
          "columnType": "TEXT"
        },
        {
          "name": "analytics",
          "type": "json",
          "required": false,
          "columnType": "JSON"
        },
        {
          "name": "analyticsLastSyncedAt",
          "type": "datetime",
          "required": false,
          "columnType": "TIMESTAMP"
        }
      ],
      "relationships": [
        {
          "name": "socialAccountId",
          "type": "foreignKey",
          "required": false,
          "related": "SocialAccount",
          "columnType": "UUID"
        },
        {
          "name": "videoContentId",
          "type": "crossPackageRef",
          "required": false,
          "related": "@happyvertical/smrt-video:VideoContent",
          "columnType": "UUID"
        },
        {
          "name": "contentId",
          "type": "crossPackageRef",
          "required": false,
          "related": "@happyvertical/smrt-content:Content",
          "columnType": "UUID"
        }
      ],
      "methods": [],
      "tenant": {
        "scoped": true,
        "mode": "optional",
        "field": "tenantId"
      },
      "tableStrategy": "sti",
      "conflictColumns": [
        "tenant_id",
        "slug",
        "context",
        "_meta_type"
      ],
      "surfaces": [
        {
          "kind": "api",
          "name": "socialposts.list",
          "operation": "list",
          "objectName": "@happyvertical/smrt-social:SocialPost",
          "path": "/socialposts",
          "method": "GET"
        },
        {
          "kind": "api",
          "name": "socialposts.get",
          "operation": "get",
          "objectName": "@happyvertical/smrt-social:SocialPost",
          "path": "/socialposts/[id]",
          "method": "GET"
        },
        {
          "kind": "api",
          "name": "socialposts.create",
          "operation": "create",
          "objectName": "@happyvertical/smrt-social:SocialPost",
          "path": "/socialposts",
          "method": "POST"
        },
        {
          "kind": "api",
          "name": "socialposts.update",
          "operation": "update",
          "objectName": "@happyvertical/smrt-social:SocialPost",
          "path": "/socialposts/[id]",
          "method": "PATCH"
        },
        {
          "kind": "api",
          "name": "socialposts.delete",
          "operation": "delete",
          "objectName": "@happyvertical/smrt-social:SocialPost",
          "path": "/socialposts/[id]",
          "method": "DELETE"
        },
        {
          "kind": "cli",
          "name": "socialpost_list",
          "operation": "list",
          "objectName": "@happyvertical/smrt-social:SocialPost"
        },
        {
          "kind": "cli",
          "name": "socialpost_get",
          "operation": "get",
          "objectName": "@happyvertical/smrt-social:SocialPost"
        },
        {
          "kind": "cli",
          "name": "socialpost_create",
          "operation": "create",
          "objectName": "@happyvertical/smrt-social:SocialPost"
        },
        {
          "kind": "cli",
          "name": "socialpost_update",
          "operation": "update",
          "objectName": "@happyvertical/smrt-social:SocialPost"
        },
        {
          "kind": "cli",
          "name": "socialpost_delete",
          "operation": "delete",
          "objectName": "@happyvertical/smrt-social:SocialPost"
        },
        {
          "kind": "mcp",
          "name": "socialpost_list",
          "operation": "list",
          "objectName": "@happyvertical/smrt-social:SocialPost"
        },
        {
          "kind": "mcp",
          "name": "socialpost_get",
          "operation": "get",
          "objectName": "@happyvertical/smrt-social:SocialPost"
        }
      ],
      "relationshipFeatures": [
        "crossPackageRef",
        "foreignKey",
        "uuidColumns"
      ],
      "tags": [],
      "risks": []
    },
    {
      "name": "OAuthStateCollection",
      "qualifiedName": "@happyvertical/smrt-social:OAuthStateCollection",
      "collection": "oauthstates",
      "tableName": "oauth_state_collections",
      "packageName": "@happyvertical/smrt-social",
      "extends": "SmrtCollection",
      "fields": [],
      "relationships": [],
      "methods": [
        "deleteExpired",
        "findByState",
        "findExpired"
      ],
      "methodSignatures": [
        {
          "name": "deleteExpired",
          "async": true,
          "params": [
            "now?: Date"
          ],
          "returns": "Promise<number>"
        },
        {
          "name": "findByState",
          "async": true,
          "params": [
            "state: string"
          ],
          "returns": "Promise<OAuthState | null>"
        },
        {
          "name": "findExpired",
          "async": true,
          "params": [
            "now?: Date"
          ],
          "returns": "Promise<OAuthState[]>"
        }
      ],
      "surfaces": [
        {
          "kind": "api",
          "name": "oauthstates.findByState",
          "operation": "findByState",
          "objectName": "@happyvertical/smrt-social:OAuthStateCollection",
          "path": "/oauthstates/findByState",
          "method": "POST"
        },
        {
          "kind": "api",
          "name": "oauthstates.findExpired",
          "operation": "findExpired",
          "objectName": "@happyvertical/smrt-social:OAuthStateCollection",
          "path": "/oauthstates/findExpired",
          "method": "POST"
        },
        {
          "kind": "api",
          "name": "oauthstates.deleteExpired",
          "operation": "deleteExpired",
          "objectName": "@happyvertical/smrt-social:OAuthStateCollection",
          "path": "/oauthstates/deleteExpired",
          "method": "POST"
        },
        {
          "kind": "cli",
          "name": "oauthstatecollection_findByState",
          "operation": "findByState",
          "objectName": "@happyvertical/smrt-social:OAuthStateCollection"
        },
        {
          "kind": "cli",
          "name": "oauthstatecollection_findExpired",
          "operation": "findExpired",
          "objectName": "@happyvertical/smrt-social:OAuthStateCollection"
        },
        {
          "kind": "cli",
          "name": "oauthstatecollection_deleteExpired",
          "operation": "deleteExpired",
          "objectName": "@happyvertical/smrt-social:OAuthStateCollection"
        }
      ],
      "relationshipFeatures": [
        "uuidColumns"
      ],
      "tags": [],
      "risks": []
    },
    {
      "name": "SocialAccountCollection",
      "qualifiedName": "@happyvertical/smrt-social:SocialAccountCollection",
      "collection": "socialaccounts",
      "tableName": "social_account_collections",
      "packageName": "@happyvertical/smrt-social",
      "extends": "SmrtCollection",
      "fields": [],
      "relationships": [],
      "methods": [
        "findActive",
        "findNeedsAttention",
        "findReady"
      ],
      "methodSignatures": [
        {
          "name": "findActive",
          "async": true,
          "params": [
            "platform?: SocialPlatformType"
          ],
          "returns": "Promise<SocialAccount[]>"
        },
        {
          "name": "findNeedsAttention",
          "async": true,
          "returns": "Promise<SocialAccount[]>"
        },
        {
          "name": "findReady",
          "async": true,
          "params": [
            "platform?: SocialPlatformType"
          ],
          "returns": "Promise<SocialAccount[]>"
        }
      ],
      "surfaces": [
        {
          "kind": "api",
          "name": "socialaccounts.findActive",
          "operation": "findActive",
          "objectName": "@happyvertical/smrt-social:SocialAccountCollection",
          "path": "/socialaccounts/findActive",
          "method": "POST"
        },
        {
          "kind": "api",
          "name": "socialaccounts.findReady",
          "operation": "findReady",
          "objectName": "@happyvertical/smrt-social:SocialAccountCollection",
          "path": "/socialaccounts/findReady",
          "method": "POST"
        },
        {
          "kind": "api",
          "name": "socialaccounts.findNeedsAttention",
          "operation": "findNeedsAttention",
          "objectName": "@happyvertical/smrt-social:SocialAccountCollection",
          "path": "/socialaccounts/findNeedsAttention",
          "method": "POST"
        },
        {
          "kind": "cli",
          "name": "socialaccountcollection_findActive",
          "operation": "findActive",
          "objectName": "@happyvertical/smrt-social:SocialAccountCollection"
        },
        {
          "kind": "cli",
          "name": "socialaccountcollection_findReady",
          "operation": "findReady",
          "objectName": "@happyvertical/smrt-social:SocialAccountCollection"
        },
        {
          "kind": "cli",
          "name": "socialaccountcollection_findNeedsAttention",
          "operation": "findNeedsAttention",
          "objectName": "@happyvertical/smrt-social:SocialAccountCollection"
        },
        {
          "kind": "mcp",
          "name": "socialaccountcollection_findactive",
          "operation": "findActive",
          "objectName": "@happyvertical/smrt-social:SocialAccountCollection"
        },
        {
          "kind": "mcp",
          "name": "socialaccountcollection_findready",
          "operation": "findReady",
          "objectName": "@happyvertical/smrt-social:SocialAccountCollection"
        },
        {
          "kind": "mcp",
          "name": "socialaccountcollection_findneedsattention",
          "operation": "findNeedsAttention",
          "objectName": "@happyvertical/smrt-social:SocialAccountCollection"
        }
      ],
      "relationshipFeatures": [
        "uuidColumns"
      ],
      "tags": [],
      "risks": []
    },
    {
      "name": "SocialPostAnalyticsSnapshotCollection",
      "qualifiedName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection",
      "collection": "socialpostanalyticssnapshots",
      "tableName": "social_post_analytics_snapshot_collections",
      "packageName": "@happyvertical/smrt-social",
      "extends": "SmrtCollection",
      "fields": [],
      "relationships": [],
      "methods": [
        "findForPost",
        "findLatestForPost",
        "recordSnapshot"
      ],
      "methodSignatures": [
        {
          "name": "findForPost",
          "async": true,
          "params": [
            "socialPostId: string"
          ],
          "returns": "Promise<SocialPostAnalyticsSnapshot[]>"
        },
        {
          "name": "findLatestForPost",
          "async": true,
          "params": [
            "socialPostId: string"
          ],
          "returns": "Promise<SocialPostAnalyticsSnapshot | null>"
        },
        {
          "name": "recordSnapshot",
          "async": true,
          "params": [
            "options: object"
          ],
          "returns": "Promise<SocialPostAnalyticsSnapshot>"
        }
      ],
      "surfaces": [
        {
          "kind": "api",
          "name": "socialpostanalyticssnapshots.findForPost",
          "operation": "findForPost",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection",
          "path": "/socialpostanalyticssnapshots/findForPost",
          "method": "POST"
        },
        {
          "kind": "api",
          "name": "socialpostanalyticssnapshots.findLatestForPost",
          "operation": "findLatestForPost",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection",
          "path": "/socialpostanalyticssnapshots/findLatestForPost",
          "method": "POST"
        },
        {
          "kind": "cli",
          "name": "socialpostanalyticssnapshotcollection_recordSnapshot",
          "operation": "recordSnapshot",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
        },
        {
          "kind": "cli",
          "name": "socialpostanalyticssnapshotcollection_findForPost",
          "operation": "findForPost",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
        },
        {
          "kind": "cli",
          "name": "socialpostanalyticssnapshotcollection_findLatestForPost",
          "operation": "findLatestForPost",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
        },
        {
          "kind": "mcp",
          "name": "socialpostanalyticssnapshotcollection_recordsnapshot",
          "operation": "recordSnapshot",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
        },
        {
          "kind": "mcp",
          "name": "socialpostanalyticssnapshotcollection_findforpost",
          "operation": "findForPost",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
        },
        {
          "kind": "mcp",
          "name": "socialpostanalyticssnapshotcollection_findlatestforpost",
          "operation": "findLatestForPost",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
        }
      ],
      "withheldSurfaces": [
        {
          "kind": "api",
          "operation": "recordSnapshot",
          "code": "not-wireable",
          "reason": "not routed: `options` contains a member where `Date` is only hydrated as a top-level parameter, so a nested one arrives as a string",
          "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
        }
      ],
      "relationshipFeatures": [
        "uuidColumns"
      ],
      "tags": [],
      "risks": []
    },
    {
      "name": "SocialPostCollection",
      "qualifiedName": "@happyvertical/smrt-social:SocialPostCollection",
      "collection": "socialposts",
      "tableName": "social_post_collections",
      "packageName": "@happyvertical/smrt-social",
      "extends": "SmrtCollection",
      "fields": [],
      "relationships": [],
      "methods": [
        "createDraft",
        "findByStatus",
        "findDueForPublish",
        "findForAccount",
        "recordPublishFailure",
        "recordPublishSuccess",
        "updateLatestAnalytics"
      ],
      "methodSignatures": [
        {
          "name": "createDraft",
          "async": true,
          "params": [
            "options: CreateSocialPostDraftOptions"
          ],
          "returns": "Promise<SocialPost>"
        },
        {
          "name": "findByStatus",
          "async": true,
          "params": [
            "status: PostStatus"
          ],
          "returns": "Promise<SocialPost[]>"
        },
        {
          "name": "findDueForPublish",
          "async": true,
          "params": [
            "now?: Date"
          ],
          "returns": "Promise<SocialPost[]>"
        },
        {
          "name": "findForAccount",
          "async": true,
          "params": [
            "socialAccountId: string"
          ],
          "returns": "Promise<SocialPost[]>"
        },
        {
          "name": "recordPublishFailure",
          "async": true,
          "params": [
            "post: SocialPost",
            "error: Error | string"
          ],
          "returns": "Promise<SocialPost>"
        },
        {
          "name": "recordPublishSuccess",
          "async": true,
          "params": [
            "post: SocialPost",
            "data: PublishSuccessData"
          ],
          "returns": "Promise<SocialPost>"
        },
        {
          "name": "updateLatestAnalytics",
          "async": true,
          "params": [
            "post: SocialPost",
            "analytics: PostAnalytics",
            "syncedAt?: Date"
          ],
          "returns": "Promise<SocialPost>"
        }
      ],
      "surfaces": [
        {
          "kind": "api",
          "name": "socialposts.createDraft",
          "operation": "createDraft",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection",
          "path": "/socialposts/createDraft",
          "method": "POST"
        },
        {
          "kind": "api",
          "name": "socialposts.findByStatus",
          "operation": "findByStatus",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection",
          "path": "/socialposts/findByStatus",
          "method": "POST"
        },
        {
          "kind": "api",
          "name": "socialposts.findForAccount",
          "operation": "findForAccount",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection",
          "path": "/socialposts/findForAccount",
          "method": "POST"
        },
        {
          "kind": "api",
          "name": "socialposts.findDueForPublish",
          "operation": "findDueForPublish",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection",
          "path": "/socialposts/findDueForPublish",
          "method": "POST"
        },
        {
          "kind": "cli",
          "name": "socialpostcollection_createDraft",
          "operation": "createDraft",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "cli",
          "name": "socialpostcollection_findByStatus",
          "operation": "findByStatus",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "cli",
          "name": "socialpostcollection_findForAccount",
          "operation": "findForAccount",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "cli",
          "name": "socialpostcollection_findDueForPublish",
          "operation": "findDueForPublish",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "cli",
          "name": "socialpostcollection_recordPublishSuccess",
          "operation": "recordPublishSuccess",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "cli",
          "name": "socialpostcollection_recordPublishFailure",
          "operation": "recordPublishFailure",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "cli",
          "name": "socialpostcollection_updateLatestAnalytics",
          "operation": "updateLatestAnalytics",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "mcp",
          "name": "socialpostcollection_createdraft",
          "operation": "createDraft",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "mcp",
          "name": "socialpostcollection_findbystatus",
          "operation": "findByStatus",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "mcp",
          "name": "socialpostcollection_findforaccount",
          "operation": "findForAccount",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "mcp",
          "name": "socialpostcollection_finddueforpublish",
          "operation": "findDueForPublish",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "mcp",
          "name": "socialpostcollection_recordpublishsuccess",
          "operation": "recordPublishSuccess",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "mcp",
          "name": "socialpostcollection_recordpublishfailure",
          "operation": "recordPublishFailure",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "mcp",
          "name": "socialpostcollection_updatelatestanalytics",
          "operation": "updateLatestAnalytics",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        }
      ],
      "withheldSurfaces": [
        {
          "kind": "api",
          "operation": "recordPublishFailure",
          "code": "not-wireable",
          "reason": "not routed: parameter `post`: `SocialPost` is a model class instance, not JSON data",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "api",
          "operation": "recordPublishSuccess",
          "code": "not-wireable",
          "reason": "not routed: parameter `post`: `SocialPost` is a model class instance, not JSON data",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        },
        {
          "kind": "api",
          "operation": "updateLatestAnalytics",
          "code": "not-wireable",
          "reason": "not routed: parameter `post`: `SocialPost` is a model class instance, not JSON data",
          "objectName": "@happyvertical/smrt-social:SocialPostCollection"
        }
      ],
      "relationshipFeatures": [
        "uuidColumns"
      ],
      "tags": [],
      "risks": []
    }
  ],
  "surfaces": [
    {
      "kind": "api",
      "name": "oauthstates.list",
      "operation": "list",
      "objectName": "@happyvertical/smrt-social:OAuthState",
      "path": "/oauthstates",
      "method": "GET"
    },
    {
      "kind": "api",
      "name": "oauthstates.get",
      "operation": "get",
      "objectName": "@happyvertical/smrt-social:OAuthState",
      "path": "/oauthstates/[id]",
      "method": "GET"
    },
    {
      "kind": "api",
      "name": "oauthstates.create",
      "operation": "create",
      "objectName": "@happyvertical/smrt-social:OAuthState",
      "path": "/oauthstates",
      "method": "POST"
    },
    {
      "kind": "api",
      "name": "oauthstates.delete",
      "operation": "delete",
      "objectName": "@happyvertical/smrt-social:OAuthState",
      "path": "/oauthstates/[id]",
      "method": "DELETE"
    },
    {
      "kind": "cli",
      "name": "oauthstate_list",
      "operation": "list",
      "objectName": "@happyvertical/smrt-social:OAuthState"
    },
    {
      "kind": "cli",
      "name": "oauthstate_get",
      "operation": "get",
      "objectName": "@happyvertical/smrt-social:OAuthState"
    },
    {
      "kind": "cli",
      "name": "oauthstate_create",
      "operation": "create",
      "objectName": "@happyvertical/smrt-social:OAuthState"
    },
    {
      "kind": "cli",
      "name": "oauthstate_update",
      "operation": "update",
      "objectName": "@happyvertical/smrt-social:OAuthState"
    },
    {
      "kind": "cli",
      "name": "oauthstate_delete",
      "operation": "delete",
      "objectName": "@happyvertical/smrt-social:OAuthState"
    },
    {
      "kind": "cli",
      "name": "oauthstate_verifyState",
      "operation": "verifyState",
      "objectName": "@happyvertical/smrt-social:OAuthState"
    },
    {
      "kind": "cli",
      "name": "oauthstate_generateState",
      "operation": "generateState",
      "objectName": "@happyvertical/smrt-social:OAuthState"
    },
    {
      "kind": "cli",
      "name": "oauthstate_generateCodeVerifier",
      "operation": "generateCodeVerifier",
      "objectName": "@happyvertical/smrt-social:OAuthState"
    },
    {
      "kind": "cli",
      "name": "oauthstate_generateCodeChallenge",
      "operation": "generateCodeChallenge",
      "objectName": "@happyvertical/smrt-social:OAuthState"
    },
    {
      "kind": "api",
      "name": "socialaccounts.list",
      "operation": "list",
      "objectName": "@happyvertical/smrt-social:SocialAccount",
      "path": "/socialaccounts",
      "method": "GET"
    },
    {
      "kind": "api",
      "name": "socialaccounts.get",
      "operation": "get",
      "objectName": "@happyvertical/smrt-social:SocialAccount",
      "path": "/socialaccounts/[id]",
      "method": "GET"
    },
    {
      "kind": "api",
      "name": "socialaccounts.create",
      "operation": "create",
      "objectName": "@happyvertical/smrt-social:SocialAccount",
      "path": "/socialaccounts",
      "method": "POST"
    },
    {
      "kind": "api",
      "name": "socialaccounts.update",
      "operation": "update",
      "objectName": "@happyvertical/smrt-social:SocialAccount",
      "path": "/socialaccounts/[id]",
      "method": "PATCH"
    },
    {
      "kind": "api",
      "name": "socialaccounts.delete",
      "operation": "delete",
      "objectName": "@happyvertical/smrt-social:SocialAccount",
      "path": "/socialaccounts/[id]",
      "method": "DELETE"
    },
    {
      "kind": "cli",
      "name": "socialaccount_list",
      "operation": "list",
      "objectName": "@happyvertical/smrt-social:SocialAccount"
    },
    {
      "kind": "cli",
      "name": "socialaccount_get",
      "operation": "get",
      "objectName": "@happyvertical/smrt-social:SocialAccount"
    },
    {
      "kind": "cli",
      "name": "socialaccount_create",
      "operation": "create",
      "objectName": "@happyvertical/smrt-social:SocialAccount"
    },
    {
      "kind": "cli",
      "name": "socialaccount_update",
      "operation": "update",
      "objectName": "@happyvertical/smrt-social:SocialAccount"
    },
    {
      "kind": "cli",
      "name": "socialaccount_delete",
      "operation": "delete",
      "objectName": "@happyvertical/smrt-social:SocialAccount"
    },
    {
      "kind": "cli",
      "name": "socialaccount_setCredentials",
      "operation": "setCredentials",
      "objectName": "@happyvertical/smrt-social:SocialAccount"
    },
    {
      "kind": "cli",
      "name": "socialaccount_getCredentials",
      "operation": "getCredentials",
      "objectName": "@happyvertical/smrt-social:SocialAccount"
    },
    {
      "kind": "mcp",
      "name": "socialaccount_list",
      "operation": "list",
      "objectName": "@happyvertical/smrt-social:SocialAccount"
    },
    {
      "kind": "mcp",
      "name": "socialaccount_get",
      "operation": "get",
      "objectName": "@happyvertical/smrt-social:SocialAccount"
    },
    {
      "kind": "api",
      "name": "socialpostanalyticssnapshots.list",
      "operation": "list",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot",
      "path": "/socialpostanalyticssnapshots",
      "method": "GET"
    },
    {
      "kind": "api",
      "name": "socialpostanalyticssnapshots.get",
      "operation": "get",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot",
      "path": "/socialpostanalyticssnapshots/[id]",
      "method": "GET"
    },
    {
      "kind": "api",
      "name": "socialpostanalyticssnapshots.create",
      "operation": "create",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot",
      "path": "/socialpostanalyticssnapshots",
      "method": "POST"
    },
    {
      "kind": "api",
      "name": "socialpostanalyticssnapshots.delete",
      "operation": "delete",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot",
      "path": "/socialpostanalyticssnapshots/[id]",
      "method": "DELETE"
    },
    {
      "kind": "cli",
      "name": "socialpostanalyticssnapshot_list",
      "operation": "list",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
    },
    {
      "kind": "cli",
      "name": "socialpostanalyticssnapshot_get",
      "operation": "get",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
    },
    {
      "kind": "cli",
      "name": "socialpostanalyticssnapshot_create",
      "operation": "create",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
    },
    {
      "kind": "cli",
      "name": "socialpostanalyticssnapshot_update",
      "operation": "update",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
    },
    {
      "kind": "cli",
      "name": "socialpostanalyticssnapshot_delete",
      "operation": "delete",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
    },
    {
      "kind": "mcp",
      "name": "socialpostanalyticssnapshot_list",
      "operation": "list",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
    },
    {
      "kind": "mcp",
      "name": "socialpostanalyticssnapshot_get",
      "operation": "get",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshot"
    },
    {
      "kind": "api",
      "name": "socialposts.list",
      "operation": "list",
      "objectName": "@happyvertical/smrt-social:SocialPost",
      "path": "/socialposts",
      "method": "GET"
    },
    {
      "kind": "api",
      "name": "socialposts.get",
      "operation": "get",
      "objectName": "@happyvertical/smrt-social:SocialPost",
      "path": "/socialposts/[id]",
      "method": "GET"
    },
    {
      "kind": "api",
      "name": "socialposts.create",
      "operation": "create",
      "objectName": "@happyvertical/smrt-social:SocialPost",
      "path": "/socialposts",
      "method": "POST"
    },
    {
      "kind": "api",
      "name": "socialposts.update",
      "operation": "update",
      "objectName": "@happyvertical/smrt-social:SocialPost",
      "path": "/socialposts/[id]",
      "method": "PATCH"
    },
    {
      "kind": "api",
      "name": "socialposts.delete",
      "operation": "delete",
      "objectName": "@happyvertical/smrt-social:SocialPost",
      "path": "/socialposts/[id]",
      "method": "DELETE"
    },
    {
      "kind": "cli",
      "name": "socialpost_list",
      "operation": "list",
      "objectName": "@happyvertical/smrt-social:SocialPost"
    },
    {
      "kind": "cli",
      "name": "socialpost_get",
      "operation": "get",
      "objectName": "@happyvertical/smrt-social:SocialPost"
    },
    {
      "kind": "cli",
      "name": "socialpost_create",
      "operation": "create",
      "objectName": "@happyvertical/smrt-social:SocialPost"
    },
    {
      "kind": "cli",
      "name": "socialpost_update",
      "operation": "update",
      "objectName": "@happyvertical/smrt-social:SocialPost"
    },
    {
      "kind": "cli",
      "name": "socialpost_delete",
      "operation": "delete",
      "objectName": "@happyvertical/smrt-social:SocialPost"
    },
    {
      "kind": "mcp",
      "name": "socialpost_list",
      "operation": "list",
      "objectName": "@happyvertical/smrt-social:SocialPost"
    },
    {
      "kind": "mcp",
      "name": "socialpost_get",
      "operation": "get",
      "objectName": "@happyvertical/smrt-social:SocialPost"
    },
    {
      "kind": "api",
      "name": "oauthstates.findByState",
      "operation": "findByState",
      "objectName": "@happyvertical/smrt-social:OAuthStateCollection",
      "path": "/oauthstates/findByState",
      "method": "POST"
    },
    {
      "kind": "api",
      "name": "oauthstates.findExpired",
      "operation": "findExpired",
      "objectName": "@happyvertical/smrt-social:OAuthStateCollection",
      "path": "/oauthstates/findExpired",
      "method": "POST"
    },
    {
      "kind": "api",
      "name": "oauthstates.deleteExpired",
      "operation": "deleteExpired",
      "objectName": "@happyvertical/smrt-social:OAuthStateCollection",
      "path": "/oauthstates/deleteExpired",
      "method": "POST"
    },
    {
      "kind": "cli",
      "name": "oauthstatecollection_findByState",
      "operation": "findByState",
      "objectName": "@happyvertical/smrt-social:OAuthStateCollection"
    },
    {
      "kind": "cli",
      "name": "oauthstatecollection_findExpired",
      "operation": "findExpired",
      "objectName": "@happyvertical/smrt-social:OAuthStateCollection"
    },
    {
      "kind": "cli",
      "name": "oauthstatecollection_deleteExpired",
      "operation": "deleteExpired",
      "objectName": "@happyvertical/smrt-social:OAuthStateCollection"
    },
    {
      "kind": "api",
      "name": "socialaccounts.findActive",
      "operation": "findActive",
      "objectName": "@happyvertical/smrt-social:SocialAccountCollection",
      "path": "/socialaccounts/findActive",
      "method": "POST"
    },
    {
      "kind": "api",
      "name": "socialaccounts.findReady",
      "operation": "findReady",
      "objectName": "@happyvertical/smrt-social:SocialAccountCollection",
      "path": "/socialaccounts/findReady",
      "method": "POST"
    },
    {
      "kind": "api",
      "name": "socialaccounts.findNeedsAttention",
      "operation": "findNeedsAttention",
      "objectName": "@happyvertical/smrt-social:SocialAccountCollection",
      "path": "/socialaccounts/findNeedsAttention",
      "method": "POST"
    },
    {
      "kind": "cli",
      "name": "socialaccountcollection_findActive",
      "operation": "findActive",
      "objectName": "@happyvertical/smrt-social:SocialAccountCollection"
    },
    {
      "kind": "cli",
      "name": "socialaccountcollection_findReady",
      "operation": "findReady",
      "objectName": "@happyvertical/smrt-social:SocialAccountCollection"
    },
    {
      "kind": "cli",
      "name": "socialaccountcollection_findNeedsAttention",
      "operation": "findNeedsAttention",
      "objectName": "@happyvertical/smrt-social:SocialAccountCollection"
    },
    {
      "kind": "mcp",
      "name": "socialaccountcollection_findactive",
      "operation": "findActive",
      "objectName": "@happyvertical/smrt-social:SocialAccountCollection"
    },
    {
      "kind": "mcp",
      "name": "socialaccountcollection_findready",
      "operation": "findReady",
      "objectName": "@happyvertical/smrt-social:SocialAccountCollection"
    },
    {
      "kind": "mcp",
      "name": "socialaccountcollection_findneedsattention",
      "operation": "findNeedsAttention",
      "objectName": "@happyvertical/smrt-social:SocialAccountCollection"
    },
    {
      "kind": "api",
      "name": "socialpostanalyticssnapshots.findForPost",
      "operation": "findForPost",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection",
      "path": "/socialpostanalyticssnapshots/findForPost",
      "method": "POST"
    },
    {
      "kind": "api",
      "name": "socialpostanalyticssnapshots.findLatestForPost",
      "operation": "findLatestForPost",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection",
      "path": "/socialpostanalyticssnapshots/findLatestForPost",
      "method": "POST"
    },
    {
      "kind": "cli",
      "name": "socialpostanalyticssnapshotcollection_recordSnapshot",
      "operation": "recordSnapshot",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
    },
    {
      "kind": "cli",
      "name": "socialpostanalyticssnapshotcollection_findForPost",
      "operation": "findForPost",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
    },
    {
      "kind": "cli",
      "name": "socialpostanalyticssnapshotcollection_findLatestForPost",
      "operation": "findLatestForPost",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
    },
    {
      "kind": "mcp",
      "name": "socialpostanalyticssnapshotcollection_recordsnapshot",
      "operation": "recordSnapshot",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
    },
    {
      "kind": "mcp",
      "name": "socialpostanalyticssnapshotcollection_findforpost",
      "operation": "findForPost",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
    },
    {
      "kind": "mcp",
      "name": "socialpostanalyticssnapshotcollection_findlatestforpost",
      "operation": "findLatestForPost",
      "objectName": "@happyvertical/smrt-social:SocialPostAnalyticsSnapshotCollection"
    },
    {
      "kind": "api",
      "name": "socialposts.createDraft",
      "operation": "createDraft",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection",
      "path": "/socialposts/createDraft",
      "method": "POST"
    },
    {
      "kind": "api",
      "name": "socialposts.findByStatus",
      "operation": "findByStatus",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection",
      "path": "/socialposts/findByStatus",
      "method": "POST"
    },
    {
      "kind": "api",
      "name": "socialposts.findForAccount",
      "operation": "findForAccount",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection",
      "path": "/socialposts/findForAccount",
      "method": "POST"
    },
    {
      "kind": "api",
      "name": "socialposts.findDueForPublish",
      "operation": "findDueForPublish",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection",
      "path": "/socialposts/findDueForPublish",
      "method": "POST"
    },
    {
      "kind": "cli",
      "name": "socialpostcollection_createDraft",
      "operation": "createDraft",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "cli",
      "name": "socialpostcollection_findByStatus",
      "operation": "findByStatus",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "cli",
      "name": "socialpostcollection_findForAccount",
      "operation": "findForAccount",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "cli",
      "name": "socialpostcollection_findDueForPublish",
      "operation": "findDueForPublish",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "cli",
      "name": "socialpostcollection_recordPublishSuccess",
      "operation": "recordPublishSuccess",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "cli",
      "name": "socialpostcollection_recordPublishFailure",
      "operation": "recordPublishFailure",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "cli",
      "name": "socialpostcollection_updateLatestAnalytics",
      "operation": "updateLatestAnalytics",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "mcp",
      "name": "socialpostcollection_createdraft",
      "operation": "createDraft",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "mcp",
      "name": "socialpostcollection_findbystatus",
      "operation": "findByStatus",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "mcp",
      "name": "socialpostcollection_findforaccount",
      "operation": "findForAccount",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "mcp",
      "name": "socialpostcollection_finddueforpublish",
      "operation": "findDueForPublish",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "mcp",
      "name": "socialpostcollection_recordpublishsuccess",
      "operation": "recordPublishSuccess",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "mcp",
      "name": "socialpostcollection_recordpublishfailure",
      "operation": "recordPublishFailure",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    },
    {
      "kind": "mcp",
      "name": "socialpostcollection_updatelatestanalytics",
      "operation": "updateLatestAnalytics",
      "objectName": "@happyvertical/smrt-social:SocialPostCollection"
    }
  ],
  "prompts": [],
  "relationshipsV2": {
    "foreignKeyFields": 2,
    "crossPackageRefFields": 2,
    "junctionCollections": 0,
    "hierarchicalObjects": 0,
    "polymorphicAssociations": 0,
    "uuidColumns": 16
  },
  "agentDoc": "# @happyvertical/smrt-social\n\nSocial media account management with OAuth and post scheduling. Supports YouTube, Threads, X (Twitter), Bluesky.\n\n## Models\n\n- **SocialAccount** (STI): `platform`, `accessToken`/`refreshToken`, `tokenExpiresAt`, `status` (connected/expired/error), `linkBehavior` (description/reply/none). `isTokenExpired` checks with 5-min buffer. `isReady` gate checks active + connected + token present + not expired.\n- **SocialPost**: `scheduledAt`, `publishedAt`, `status` (draft/scheduled/publishing/published/failed), `analytics` JSON (views/likes/comments/shares/clicks).\n- **OAuthState** (STI): CSRF token + PKCE `codeVerifier` with 10-min TTL.\n\n## Gotchas\n\n- **Tokens not encrypted**: OAuth tokens stored as plaintext — TODO for smrt-secrets integration\n- **No auto-publishing**: `scheduledAt` is metadata only — app must implement job runner to trigger publishing\n- **Analytics manual**: `analytics` field must be updated by platform sync, not auto-populated\n- **Platform enum hardcoded**: youtube/threads/x/bluesky — extending requires code changes\n- **OAuthState TTL**: 10 minutes, app must clean up expired states\n- **Optional tenancy** on all models\n- **Relationship targets**: `SocialPost.socialAccountId` and\n  `SocialPostAnalyticsSnapshot.socialPostId` are same-package `@foreignKey`\n  columns; `SocialPost.videoContentId` is a `@crossPackageRef` to\n  `@happyvertical/smrt-video:VideoContent` (no value import back into this\n  package). They previously used `@foreignKey(() => X)`, whose target resolved\n  to `''`, so none of them carried a relationship edge (#2379).\n"
}