ai.newnal.trustsquare.defs

bezalel-newnal.bsky.social

{
  "id": "ai.newnal.trustsquare.defs",
  "defs": {
    "replyRef": {
      "type": "object",
      "required": [
        "root",
        "parent"
      ],
      "properties": {
        "root": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "parent": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        }
      }
    },
    "actorView": {
      "type": "object",
      "required": [
        "did",
        "handle",
        "displayName",
        "verificationStatus"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        },
        "avatar": {
          "type": "string",
          "format": "uri"
        },
        "gender": {
          "type": "string"
        },
        "handle": {
          "type": "string",
          "format": "handle"
        },
        "ageBand": {
          "type": "string"
        },
        "realName": {
          "type": "boolean"
        },
        "occupation": {
          "type": "string"
        },
        "affiliation": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "verificationStatus": {
          "type": "string",
          "knownValues": [
            "active",
            "expired",
            "revoked",
            "invalid",
            "none"
          ]
        }
      }
    },
    "proofView": {
      "type": "object",
      "required": [
        "uri",
        "did",
        "pdsEndpoint",
        "signingKey",
        "checks",
        "checkedAt"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid",
          "description": "Record CID from the PDS proof; absent when the record no longer exists."
        },
        "did": {
          "type": "string",
          "format": "did"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "error": {
          "type": "string"
        },
        "checks": {
          "ref": "#proofChecks",
          "type": "ref"
        },
        "commit": {
          "ref": "#commitView",
          "type": "ref"
        },
        "record": {
          "type": "unknown"
        },
        "checkedAt": {
          "type": "string",
          "format": "datetime"
        },
        "indexedCid": {
          "type": "string",
          "format": "cid"
        },
        "signingKey": {
          "type": "string",
          "description": "did:key of the repository signing key from the DID document."
        },
        "pdsEndpoint": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "syncState": {
      "type": "string",
      "description": "AppView knowledge about a record: written to PDS but not yet seen on the network, or confirmed from the firehose.",
      "knownValues": [
        "optimistic",
        "confirmed"
      ]
    },
    "videoMeta": {
      "type": "object",
      "required": [
        "videoId",
        "url"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "title": {
          "type": "string"
        },
        "videoId": {
          "type": "string"
        },
        "channelId": {
          "type": "string"
        },
        "channelTitle": {
          "type": "string"
        },
        "thumbnailUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "actorStats": {
      "type": "object",
      "required": [
        "comments",
        "chatMessages",
        "squaresCreated",
        "likesReceived"
      ],
      "properties": {
        "comments": {
          "type": "integer"
        },
        "firstSeenAt": {
          "type": "string",
          "format": "datetime"
        },
        "chatMessages": {
          "type": "integer"
        },
        "likesReceived": {
          "type": "integer"
        },
        "squaresCreated": {
          "type": "integer"
        }
      }
    },
    "commitView": {
      "type": "object",
      "required": [
        "cid",
        "rev",
        "sig",
        "data"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "rev": {
          "type": "string",
          "format": "tid"
        },
        "sig": {
          "type": "string",
          "description": "Base64 signature bytes."
        },
        "data": {
          "type": "string",
          "format": "cid",
          "description": "MST root CID."
        }
      }
    },
    "disclosure": {
      "type": "object",
      "required": [
        "displayName",
        "realName"
      ],
      "properties": {
        "gender": {
          "type": "string",
          "description": "Attested: as supplied by the identity provider.",
          "knownValues": [
            "male",
            "female",
            "other"
          ]
        },
        "ageBand": {
          "type": "string",
          "description": "Attested: derived from the verified birth date.",
          "knownValues": [
            "teens",
            "20s",
            "30s",
            "40s",
            "50s",
            "60s",
            "70plus"
          ]
        },
        "realName": {
          "type": "boolean",
          "description": "Whether `displayName` is the full verified name."
        },
        "occupation": {
          "type": "string",
          "maxLength": 1000,
          "description": "Self-declared.",
          "maxGraphemes": 100
        },
        "affiliation": {
          "type": "string",
          "maxLength": 1000,
          "description": "Self-declared.",
          "maxGraphemes": 100
        },
        "displayName": {
          "type": "string",
          "maxLength": 640,
          "description": "The verified name when `realName` is true, otherwise its masked form.",
          "maxGraphemes": 64
        }
      },
      "description": "What the account holder chose to reveal, signed by the verifier. `ageBand` and `gender` are derived from the verified identity and are therefore attested; `occupation` and `affiliation` are self-declared. With nothing disclosed, `displayName` is the masked form of the verified name."
    },
    "liveStatus": {
      "type": "object",
      "required": [
        "state"
      ],
      "properties": {
        "state": {
          "type": "string",
          "knownValues": [
            "none",
            "upcoming",
            "live",
            "ended"
          ]
        },
        "endedAt": {
          "type": "string",
          "format": "datetime"
        },
        "startedAt": {
          "type": "string",
          "format": "datetime"
        }
      }
    },
    "squareView": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "id",
        "creator",
        "subject",
        "mode",
        "settings",
        "pinned",
        "stats",
        "liveStatus",
        "createdAt",
        "indexedAt",
        "syncState"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Short public id used in /s/{id} links."
        },
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "mode": {
          "type": "string",
          "knownValues": [
            "vod",
            "live"
          ]
        },
        "stats": {
          "ref": "#squareStats",
          "type": "ref"
        },
        "title": {
          "type": "string"
        },
        "pinned": {
          "type": "array",
          "items": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          }
        },
        "creator": {
          "ref": "#actorView",
          "type": "ref"
        },
        "subject": {
          "ref": "#videoMeta",
          "type": "ref"
        },
        "settings": {
          "ref": "#squareSettings",
          "type": "ref"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime"
        },
        "syncState": {
          "ref": "#syncState",
          "type": "ref"
        },
        "liveStatus": {
          "ref": "#liveStatus",
          "type": "ref"
        },
        "description": {
          "type": "string"
        }
      }
    },
    "threadView": {
      "type": "object",
      "required": [
        "comment",
        "replies",
        "hasMoreReplies"
      ],
      "properties": {
        "comment": {
          "ref": "#commentView",
          "type": "ref"
        },
        "replies": {
          "type": "array",
          "items": {
            "ref": "#commentView",
            "type": "ref"
          }
        },
        "hasMoreReplies": {
          "type": "boolean"
        }
      }
    },
    "commentView": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "author",
        "squareUri",
        "text",
        "likeCount",
        "dislikeCount",
        "replyCount",
        "edited",
        "hidden",
        "pinned",
        "deleted",
        "createdAt",
        "indexedAt",
        "syncState"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "text": {
          "type": "string"
        },
        "reply": {
          "ref": "#replyRef",
          "type": "ref"
        },
        "author": {
          "ref": "#actorView",
          "type": "ref"
        },
        "edited": {
          "type": "boolean"
        },
        "hidden": {
          "type": "boolean",
          "description": "Hidden by the Square creator or an operator. Only returned to the creator or the author."
        },
        "pinned": {
          "type": "boolean"
        },
        "viewer": {
          "ref": "#viewerState",
          "type": "ref"
        },
        "deleted": {
          "type": "boolean",
          "description": "Tombstone for a comment the author deleted; text is empty."
        },
        "editedAt": {
          "type": "string",
          "format": "datetime"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime"
        },
        "likeCount": {
          "type": "integer"
        },
        "squareUri": {
          "type": "string",
          "format": "at-uri"
        },
        "syncState": {
          "ref": "#syncState",
          "type": "ref"
        },
        "replyCount": {
          "type": "integer"
        },
        "trustScore": {
          "type": "string",
          "description": "Debug only; present when the AppView runs with ranking debug enabled."
        },
        "dislikeCount": {
          "type": "integer"
        }
      }
    },
    "historyItem": {
      "type": "object",
      "required": [
        "kind",
        "square"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "knownValues": [
            "comment",
            "chat"
          ]
        },
        "square": {
          "ref": "#squareView",
          "type": "ref"
        },
        "comment": {
          "ref": "#commentView",
          "type": "ref"
        },
        "chatMessage": {
          "ref": "#chatMessageView",
          "type": "ref"
        }
      }
    },
    "proofChecks": {
      "type": "object",
      "required": [
        "signatureValid",
        "inclusionValid",
        "cidMatchesIndex",
        "didDocFresh"
      ],
      "properties": {
        "didDocFresh": {
          "type": "boolean"
        },
        "inclusionValid": {
          "type": "boolean"
        },
        "signatureValid": {
          "type": "boolean"
        },
        "cidMatchesIndex": {
          "type": "boolean"
        }
      }
    },
    "squareStats": {
      "type": "object",
      "required": [
        "comments",
        "chatMessages",
        "participants"
      ],
      "properties": {
        "comments": {
          "type": "integer"
        },
        "chatMessages": {
          "type": "integer"
        },
        "participants": {
          "type": "integer"
        }
      }
    },
    "viewerState": {
      "type": "object",
      "properties": {
        "reaction": {
          "type": "string",
          "knownValues": [
            "like",
            "dislike"
          ]
        },
        "reactionUri": {
          "type": "string",
          "format": "at-uri"
        }
      }
    },
    "youtubeVideo": {
      "type": "object",
      "required": [
        "videoId",
        "url"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Canonical https://www.youtube.com/watch?v=... URL."
        },
        "videoId": {
          "type": "string",
          "maxLength": 16,
          "minLength": 11,
          "description": "YouTube video id."
        },
        "channelId": {
          "type": "string",
          "maxLength": 64
        }
      },
      "description": "A YouTube video or live stream that a Square is attached to."
    },
    "squareSettings": {
      "type": "object",
      "properties": {
        "allowChat": {
          "type": "boolean",
          "default": true
        },
        "allowComments": {
          "type": "boolean",
          "default": true
        },
        "requireRealName": {
          "type": "boolean",
          "default": false,
          "description": "When true, only accounts disclosing their full verified name may write in this Square."
        },
        "slowModeSeconds": {
          "type": "integer",
          "default": 3,
          "maximum": 600,
          "minimum": 0
        }
      }
    },
    "chatMessageView": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "author",
        "squareUri",
        "text",
        "hidden",
        "createdAt",
        "indexedAt",
        "syncState"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "text": {
          "type": "string"
        },
        "author": {
          "ref": "#actorView",
          "type": "ref"
        },
        "hidden": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime"
        },
        "squareUri": {
          "type": "string",
          "format": "at-uri"
        },
        "syncState": {
          "ref": "#syncState",
          "type": "ref"
        }
      }
    },
    "actorProfileView": {
      "type": "object",
      "required": [
        "actor",
        "verification",
        "stats",
        "historyVisible"
      ],
      "properties": {
        "actor": {
          "ref": "#actorView",
          "type": "ref"
        },
        "stats": {
          "ref": "#actorStats",
          "type": "ref"
        },
        "pdsEndpoint": {
          "type": "string",
          "format": "uri"
        },
        "verification": {
          "ref": "#verificationView",
          "type": "ref"
        },
        "historyVisible": {
          "type": "boolean"
        }
      }
    },
    "verificationView": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "issuer": {
          "type": "string",
          "format": "did"
        },
        "status": {
          "type": "string",
          "knownValues": [
            "active",
            "expired",
            "revoked",
            "invalid",
            "none"
          ]
        },
        "provider": {
          "type": "string"
        },
        "expiresAt": {
          "type": "string",
          "format": "datetime"
        },
        "disclosure": {
          "ref": "#disclosure",
          "type": "ref"
        },
        "verifiedAt": {
          "type": "string",
          "format": "datetime"
        },
        "verificationId": {
          "type": "string"
        },
        "attestationValid": {
          "type": "boolean"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}

Validate Record

Validate a record against ai.newnal.trustsquare.defs

Validation Options
Treat any remaining unresolved references as valid

Metadata

DID
did:plc:75qhtany5zmo7d3i2ni5d7nf
CID
bafyreig6hqcjofl3kcwze4aamaf4vd5xjh3yrslnkoaahgcrtvxvjegoam
Indexed At
2026-09-14 10:06 UTC
AT-URI
at://did:plc:75qhtany5zmo7d3i2ni5d7nf/com.atproto.lexicon.schema/ai.newnal.trustsquare.defs

Version History (4 versions)

Lexicon Garden

@