{
  "repo": "tidbcloud/agent-jira",
  "binary": "lark",
  "binary_path": "netlify/functions/lark.mts",
  "dependencies": {
    "HTTP POST /.netlify/functions/lark": {
      "infrastructure": {},
      "services": [
        {
          "name": "lark-background",
          "target_interface": "HTTP POST /.netlify/functions/lark-background",
          "operation_type": "http_post",
          "conditions": [
            "Only for im.message.receive_v1 events"
          ],
          "operations": [
            {
              "operation": "DISPATCH BACKGROUND MESSAGE HANDLER",
              "trigger": "Forward IM messages to the internal background function with retry",
              "conditions": [
                "body.header.event_type == \"im.message.receive_v1\""
              ],
              "implementation": "lark function -> fetch(workerUrl, { method: POST, headers: X-Internal-API-Key, body: {event,eventId} })"
            }
          ]
        },
        {
          "name": "lark-bitable",
          "target_interface": "bitable record changed event",
          "operation_type": "event",
          "conditions": [
            "Only for drive.file.bitable_record_changed_v1 events"
          ],
          "operations": [
            {
              "operation": "SYNC BITABLE CHANGES",
              "trigger": "Handle async bitable synchronization",
              "conditions": [
                "isRelevantBitableEvent(body)"
              ],
              "implementation": "lark function -> handleBitableSync(event)"
            }
          ]
        }
      ]
    }
  }
}
