com.atiproto.repo.item.count

Count active (completed) items. If recordUri is provided, counts items for that record. If subject is provided, counts items received by that DID. If neither is provided, counts items sent by the authenticated user. Optionally filtered by a start/end datetime window. When the authenticated user is the subject/owner of the target, the response also includes the sum of amounts.

Repository @atiproto.com did:plc:4x5dcv6u4wlkjcssto7f22nu namespace authority
Details · query
Kindquery
Authorityitem.repo.atiproto.com
Indexed
cid bafyreiaw2hx3s573wl6xvj235tvqnwakgt5nhxasyh4b7lfx5ljzcux5ua

Checks

Valid Lint pass
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Count active (completed) items. If recordUri is provided, counts items for that record. If subject is provided, counts items received by that DID. If neither is provided, counts items sent by the authenticated user. Optionally filtered by a start/end datetime window. When the authenticated user is the subject/owner of the target, the response also includes the sum of amounts.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "amount": {
              "description": "Sum of all item amounts in cents. Only returned when the authenticated user is the subject/owner of the target (or when counting their own sent items).",
              "type": "integer"
            },
            "count": {
              "description": "Number of active (completed) items matching the filter",
              "type": "integer"
            },
            "currency": {
              "description": "Currency of the summed amount. Only returned when the authenticated user is the subject/owner of the target (or when counting their own sent items).",
              "maxLength": 3,
              "type": "string"
            }
          },
          "required": [
            "count"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "endDate": {
            "description": "Only count items completed at or before this timestamp",
            "format": "datetime",
            "type": "string"
          },
          "recordUri": {
            "description": "AT-URI of the record being tipped. Takes precedence over subject.",
            "format": "at-uri",
            "type": "string"
          },
          "startDate": {
            "description": "Only count items completed at or after this timestamp",
            "format": "datetime",
            "type": "string"
          },
          "subject": {
            "description": "DID of the item recipient. Ignored if recordUri is provided. If omitted (and recordUri is omitted), the query counts items sent by the authenticated user.",
            "format": "did",
            "type": "string"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "com.atiproto.repo.item.count",
  "lexicon": 1
}