{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "curation": {
      "properties": {
        "curated": {
          "description": "With `curated`: the curated record listed for it (itself when it is that record).",
          "format": "at-uri",
          "type": "string"
        },
        "reason": {
          "description": "With `notCurated`: why, in words for people (a moderation verdict value such as `spam`, `obscene` or `!takedown`, the index's refusal, or `not curated: no lexicon` / `not curated: no curator`).",
          "type": "string"
        },
        "status": {
          "description": "`pending`: not listed for others yet (the curator or moderation has not answered). `curated`: listed in public as `curated`. `notCurated`: it will not be listed, for `reason` (moderation declined it, the index refused the version, a type with no lexicon, or a type no curator is endorsed for).",
          "knownValues": [
            "pending",
            "curated",
            "notCurated"
          ],
          "type": "string"
        },
        "uri": {
          "description": "The URI asked.",
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "status"
      ],
      "type": "object"
    },
    "default": {
      "properties": {
        "uri": {
          "description": "The URI asked: a record of the caller's own, missing.",
          "format": "at-uri",
          "type": "string"
        },
        "value": {
          "description": "The record value the platform reads in its place.",
          "type": "unknown"
        }
      },
      "required": [
        "uri",
        "value"
      ],
      "type": "object"
    },
    "handle": {
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "handle": {
          "format": "handle",
          "type": "string"
        },
        "linked": {
          "description": "The other accounts linked to this one now (the same person; links are public, alsoKnownAs on both DIDs). Absent when none, and while a sign-in method of any account of the person is frozen (a freeze pauses the link). A linked account that is not active or is suspended is left out.",
          "items": {
            "ref": "#linkedHandle",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "did",
        "handle"
      ],
      "type": "object"
    },
    "linkedHandle": {
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "displayName": {
          "description": "The linked account's public profile name, when it has one.",
          "type": "string"
        },
        "handle": {
          "format": "handle",
          "type": "string"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    },
    "main": {
      "description": "Records by URI, as listRecords answers them: the query `{\"view\": \"asWritten\", \"where\": {\"uri\": {\"in\": uris}}}`, as written (a read scoped to named records), each only if the caller may read it. A URI the caller may not read, or that names nothing, is left out: as in every generic read, that includes a record whose author is blocked either way with a signed-in caller (see `includeBlockedByMe`), or whose account is hidden or suspended. In the order asked. With `curated`, each URI answers as the curated record it resolves to instead (see `curated`). Draft tier.",
      "errors": [
        {
          "description": "HTTP 400. No URIs, more than 100, one that is not an AT-URI, or `handles`, `curated`, `curation` or `defaults` not true or false.",
          "name": "InvalidRequest"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "curation": {
              "description": "Only when asked with `curation`, signed in: the curation status of each asked URI (once, in the order first asked) that is the caller's own. Absent when none.",
              "items": {
                "ref": "#curation",
                "type": "ref"
              },
              "type": "array"
            },
            "defaults": {
              "description": "Only when asked with `defaults`, signed in: each asked URI (once, in the order first asked) naming a missing record of the caller's own that the platform reads a starting value for, and that value. A client shows it as the record's value until the caller writes the record. Absent when none.",
              "items": {
                "ref": "#default",
                "type": "ref"
              },
              "type": "array"
            },
            "handles": {
              "description": "Only when asked with `handles`: the public handle of each repo the asked URIs name, whether or not its record was found or readable (handles are public directory data), in the order first asked, so a client can name a person whose profile has no name. A repo whose account is not active or is suspended, or that has no handle, is not named, nor, to a signed-in caller, one across a block either way (see `includeBlockedByMe`). Absent when none.",
              "items": {
                "ref": "#handle",
                "type": "ref"
              },
              "type": "array"
            },
            "records": {
              "items": {
                "ref": "pub.techne.draft.query.listRecords#record",
                "type": "ref"
              },
              "type": "array"
            },
            "resolved": {
              "description": "Only when asked with `curated`: each asked URI (once) that answered as another record, and that curated record. Absent when none.",
              "items": {
                "ref": "#resolved",
                "type": "ref"
              },
              "type": "array"
            },
            "withheld": {
              "description": "The asked URIs of indexed public records moderation holds back from this caller, their author's account active and not suspended (a trusted verdict or a takedown, or a curated record every source of which is held back or by an account not active or suspended): they answer not found, and a client must not show another copy (the curated record they resolve to) in their place, as it may for a record that is gone or merged away. A caller's own commons post held back is answered to them instead (their own source, or the record it resolves to; not another author's source merged into it). A record whose author's account is not active or is suspended is not found and never named here; to a signed-in caller, neither is a record by an author blocked either way, or a curated record every source of which is by an author blocked either way, not active or suspended. Absent when none.",
              "items": {
                "format": "at-uri",
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "records"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "curated": {
            "description": "Answer each asked URI as the curated record it resolves to (a source copy, or a record merged into another, answers as the curated record that claims it), when that record is listed in public now (curated, moderated, not held back); otherwise the URI answers as itself, as written. `resolved` names each one answered as another record. A URI moderation holds back is `withheld` and never resolved; the caller's own held-back post is answered to them as itself. A source whose account is not active still resolves: the claim is the curated record's public provenance, not the source row. A source of a suspended account, or, to a signed-in caller, one whose author is across a block either way (see `includeBlockedByMe`), is not resolved: it answers as itself, and so is left out. Records come once each, in the order first asked. Default false: as written.",
            "type": "boolean"
          },
          "curation": {
            "description": "Also answer `curation`, signed in: the curation status of each asked URI that is the caller's own record (in their repo, a commons post they made, or the curated record standing for one), the answer a write's `put` gives, read back later. Nobody else's record is answered, nor one held privately (private records are never curated). Default false.",
            "type": "boolean"
          },
          "defaults": {
            "description": "Also answer `defaults`, signed in: each asked URI naming a record of the caller's own that is missing, for which the platform reads a starting value in its place. Today that is a subjectPrefs record for a circle someone outside the caller's People added them to: Notifications start off (Show in my feed on) until the caller writes the record. Nobody else's is answered. Default false.",
            "type": "boolean"
          },
          "handles": {
            "description": "Also answer `handles`: the public handle of each repo the asked URIs name. Default false.",
            "type": "boolean"
          },
          "includeBlockedByMe": {
            "description": "Signed in: lift the caller's OWN blocks for this read, so records and `handles` of people the caller blocked are answered (a client's list of the people its user blocked, to name them). Every generic read otherwise leaves out, for a signed-in caller, the records and handles of an account blocked either way, and for everyone those of a hidden or suspended account. A block made against the caller is never lifted, nor is a hidden or suspended account shown. Default false.",
            "type": "boolean"
          },
          "uris": {
            "items": {
              "format": "at-uri",
              "type": "string"
            },
            "maxLength": 100,
            "type": "array"
          }
        },
        "required": [
          "uris"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "resolved": {
      "properties": {
        "curated": {
          "description": "The curated record that answered for it.",
          "format": "at-uri",
          "type": "string"
        },
        "uri": {
          "description": "The URI asked.",
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "curated"
      ],
      "type": "object"
    }
  },
  "id": "pub.techne.draft.query.getRecords",
  "lexicon": 1
}
