{
  "repo": "tidbcloud/serverless-credits-campaign",
  "binary": "serverless-credits-campaign",
  "binary_path": "src/app.ts",
  "dependencies": {
    "Runtime ServerlessCreditsCampaign.APIRuntime": {
      "description": "Fastify routes validate Auth0 identities, look up TiDB Cloud tenant metadata, and check or claim serverless credit rewards.",
      "infrastructure": {
        "mysql_database": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Persist and query campaign metadata via Kysely-backed MySQL connections",
              "trigger": "creditsClaimService and related plugins",
              "implementation": "src/app.ts"
            }
          ]
        },
        "github_api": {
          "conditions": [
            "GITHUB_ACCESS_TOKEN configured"
          ],
          "operations": [
            {
              "operation": "Inspect contributor GitHub metadata for reward eligibility",
              "trigger": "Octokit-backed plugins",
              "implementation": "src/plugins/octokit/index.ts"
            }
          ]
        }
      },
      "services": [
        {
          "name": "auth0",
          "target_repo": "external/auth0",
          "target_interface": "user validation",
          "protocol": "oauth",
          "description": "Authenticates users before protected endpoints execute."
        },
        {
          "name": "account-service",
          "target_repo": "tidbcloud/account",
          "target_interface": "tenant metadata APIs",
          "protocol": "http",
          "description": "Reads tenant and requester metadata through the TiDB Cloud account client."
        },
        {
          "name": "billing-service",
          "target_repo": "tidbcloud/billing",
          "target_interface": "credit grant APIs",
          "protocol": "http",
          "description": "Claims and checks serverless credit rewards through the TiDB Cloud billing client."
        }
      ]
    }
  }
}
