{
  "lexicon": 1,
  "id": "org.tangled.temp.repo.listWebhookDeliveries",
  "defs": {
    "main": {
      "type": "query",
      "description": "List recent delivery attempts for a webhook.",
      "parameters": {
        "type": "params",
        "required": ["repoDid", "id"],
        "properties": {
          "repoDid": {
            "type": "string",
            "format": "did",
            "description": "DID of the repository as minted by the knot."
          },
          "id": {
            "type": "integer",
            "description": "Webhook ID."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["deliveries"],
          "properties": {
            "deliveries": {
              "type": "array",
              "items": {
                "type": "ref",
                "ref": "#delivery"
              }
            }
          }
        }
      }
    },
    "delivery": {
      "type": "object",
      "required": ["id", "deliveryId", "event", "url", "success", "createdAt"],
      "properties": {
        "id": {
          "type": "integer"
        },
        "deliveryId": {
          "type": "string",
          "description": "UUID for tracking this delivery attempt."
        },
        "event": {
          "type": "string",
          "description": "Event type that triggered the delivery."
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "requestBody": {
          "type": "string"
        },
        "responseCode": {
          "type": "integer"
        },
        "responseBody": {
          "type": "string"
        },
        "success": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        }
      }
    }
  }
}
