{
  "lexicon": 1,
  "id": "tickets.atmosphere.listPublicConfig",
  "defs": {
    "publicConfigRecord": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "organizer",
        "collection",
        "rkey",
        "event",
        "archived",
        "indexedAt"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT URI of the indexed ticket config record."
        },
        "cid": {
          "type": "string",
          "format": "cid",
          "description": "CID of the exact indexed ticket config record revision."
        },
        "organizer": {
          "type": "string",
          "format": "did",
          "description": "DID of the organizer repository containing the record."
        },
        "collection": {
          "type": "string",
          "format": "nsid",
          "knownValues": [
            "tickets.atmosphere.ticketType",
            "tickets.atmosphere.ticketedEvent"
          ],
          "description": "NSID of the indexed ticket config record collection."
        },
        "rkey": {
          "type": "string",
          "format": "record-key",
          "description": "Repository record key of the indexed ticket config record."
        },
        "event": {
          "type": "ref",
          "ref": "com.atproto.repo.strongRef",
          "description": "CID-pinned strongRef to the public event this ticket config describes."
        },
        "title": {
          "type": "string",
          "maxGraphemes": 100,
          "maxLength": 1000
        },
        "description": {
          "type": "string",
          "maxGraphemes": 1000,
          "maxLength": 10000
        },
        "currency": {
          "type": "string",
          "minLength": 3,
          "maxLength": 3,
          "description": "Lowercase ISO 4217 alphabetic code matching money.atmosphere.price. Chargeability is enforced separately by the configured processor allowlist. Asset-denominated value uses the money.atmosphere.payment.defs value union, never this field."
        },
        "unitAmount": {
          "type": "integer",
          "minimum": 0
        },
        "quantityTotal": {
          "type": "integer",
          "minimum": 1,
          "maximum": 250000,
          "description": "Display hint from the ticketType record. Omitted when uncapped or undisclosed."
        },
        "maxPerOrder": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50
        },
        "defaultPrice": {
          "type": "ref",
          "ref": "com.atproto.repo.strongRef",
          "description": "CID-pinned strongRef to the ticket type's current money.atmosphere.price, when published."
        },
        "saleStartsAt": {
          "type": "string",
          "format": "datetime"
        },
        "saleEndsAt": {
          "type": "string",
          "format": "datetime"
        },
        "ticketTypes": {
          "type": "array",
          "maxLength": 250,
          "items": {
            "type": "ref",
            "ref": "com.atproto.repo.strongRef"
          },
          "description": "Display-ordered CID-pinned strongRefs advertised by a ticketed-event record."
        },
        "startsAt": {
          "type": "string",
          "format": "datetime"
        },
        "endsAt": {
          "type": "string",
          "format": "datetime"
        },
        "archived": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "updatedAt": {
          "type": "string",
          "format": "datetime"
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the AppView indexed this public ticket config record."
        }
      }
    },
    "main": {
      "type": "query",
      "description": "List indexed public tickets.atmosphere ticket config records. Requires organizer; eventUri is an optional same-organizer filter. Public read; no authentication required and responses are not personalized. Live availability, holds, issued tickets, attendee data, and scan state remain private ATM service state.",
      "parameters": {
        "type": "params",
        "required": [
          "organizer"
        ],
        "properties": {
          "organizer": {
            "type": "string",
            "format": "at-identifier",
            "description": "DID or handle of the organizer. Handles are resolved to a DID before the indexed read."
          },
          "eventUri": {
            "type": "string",
            "format": "at-uri"
          },
          "collections": {
            "type": "array",
            "maxLength": 3,
            "items": {
              "type": "string",
              "format": "nsid",
              "knownValues": [
                "tickets.atmosphere.ticketType",
                "tickets.atmosphere.ticketedEvent"
              ]
            }
          },
          "includeArchived": {
            "type": "boolean",
            "default": false
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 50
          },
          "cursor": {
            "type": "string",
            "maxLength": 1024
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "records"
          ],
          "properties": {
            "records": {
              "type": "array",
              "items": {
                "type": "ref",
                "ref": "#publicConfigRecord"
              }
            },
            "cursor": {
              "type": "string",
              "maxLength": 1024
            }
          }
        }
      },
      "errors": [
        {
          "name": "InvalidRequest",
          "description": "The query must include organizer, eventUri (if provided) must belong to that organizer, and only supported ticket config collections may be requested."
        }
      ]
    }
  }
}
