{
  "lexicon": 1,
  "id": "tools.ozone.inbox.claimPushNotifications",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["notifications", "processed", "expired", "suppressed"],
          "properties": {
            "processed": { "type": "integer", "minimum": 0, "maximum": 100 },
            "expired": { "type": "integer", "minimum": 0, "maximum": 100 },
            "suppressed": { "type": "integer", "minimum": 0, "maximum": 100 },
            "notifications": {
              "type": "array",
              "items": { "type": "ref", "ref": "#item" }
            }
          }
        }
      }
    },
    "item": {
      "type": "object",
      "required": [
        "id",
        "leaseToken",
        "recipientDid",
        "reason",
        "target",
        "createdAt",
        "category"
      ],
      "properties": {
        "id": { "type": "integer" },
        "leaseToken": { "type": "string" },
        "recipientDid": { "type": "string", "format": "did" },
        "reason": { "type": "string" },
        "category": {
          "type": "string",
          "knownValues": ["reports", "account", "labels"]
        },
        "target": {
          "type": "union",
          "refs": [
            "tools.ozone.inbox.defs#reportRef",
            "tools.ozone.inbox.defs#subjectRef",
            "tools.ozone.inbox.defs#standingRef"
          ]
        },
        "createdAt": { "type": "string", "format": "datetime" }
      }
    }
  }
}

