app.bsky.richtext.facet#

pydantic model atproto.xrpc_client.models.app.bsky.richtext.facet.ByteSlice#

Bases: ModelBase

Definition model for app.bsky.richtext.facet. A text segment. Start is inclusive, end is exclusive. Indices are for utf8-encoded strings.

Show JSON schema
{
   "title": "ByteSlice",
   "description": "Definition model for :obj:`app.bsky.richtext.facet`. A text segment. Start is inclusive, end is exclusive. Indices are for utf8-encoded strings.",
   "type": "object",
   "properties": {
      "byteEnd": {
         "minimum": 0,
         "title": "Byteend",
         "type": "integer"
      },
      "byteStart": {
         "minimum": 0,
         "title": "Bytestart",
         "type": "integer"
      },
      "$type": {
         "const": "app.bsky.richtext.facet#byteSlice",
         "default": "app.bsky.richtext.facet#byteSlice",
         "title": "$Type"
      }
   },
   "additionalProperties": false,
   "required": [
      "byteEnd",
      "byteStart"
   ]
}

Fields:
field byte_end: int [Required] (alias 'byteEnd')#

Byte end.

Constraints:
  • ge = 0

field byte_start: int [Required] (alias 'byteStart')#

Byte start.

Constraints:
  • ge = 0

field py_type: typing_extensions.Literal[app.bsky.richtext.facet#byteSlice] = 'app.bsky.richtext.facet#byteSlice' (alias '$type')#

Bases: ModelBase

Definition model for app.bsky.richtext.facet. A facet feature for links.

Show JSON schema
{
   "title": "Link",
   "description": "Definition model for :obj:`app.bsky.richtext.facet`. A facet feature for links.",
   "type": "object",
   "properties": {
      "uri": {
         "title": "Uri",
         "type": "string"
      },
      "$type": {
         "const": "app.bsky.richtext.facet#link",
         "default": "app.bsky.richtext.facet#link",
         "title": "$Type"
      }
   },
   "additionalProperties": false,
   "required": [
      "uri"
   ]
}

Fields:
field py_type: typing_extensions.Literal[app.bsky.richtext.facet#link] = 'app.bsky.richtext.facet#link' (alias '$type')#
field uri: str [Required]#

Uri.

pydantic model atproto.xrpc_client.models.app.bsky.richtext.facet.Main#

Bases: ModelBase

Definition model for app.bsky.richtext.facet.

Show JSON schema
{
   "title": "Main",
   "description": "Definition model for :obj:`app.bsky.richtext.facet`.",
   "type": "object",
   "properties": {
      "features": {
         "items": {
            "discriminator": {
               "mapping": {
                  "app.bsky.richtext.facet#link": "#/$defs/Link",
                  "app.bsky.richtext.facet#mention": "#/$defs/Mention",
                  "app.bsky.richtext.facet#tag": "#/$defs/Tag"
               },
               "propertyName": "$type"
            },
            "oneOf": [
               {
                  "$ref": "#/$defs/Mention"
               },
               {
                  "$ref": "#/$defs/Link"
               },
               {
                  "$ref": "#/$defs/Tag"
               }
            ]
         },
         "title": "Features",
         "type": "array"
      },
      "index": {
         "$ref": "#/$defs/ByteSlice"
      },
      "$type": {
         "const": "app.bsky.richtext.facet",
         "default": "app.bsky.richtext.facet",
         "title": "$Type"
      }
   },
   "$defs": {
      "ByteSlice": {
         "additionalProperties": false,
         "description": "Definition model for :obj:`app.bsky.richtext.facet`. A text segment. Start is inclusive, end is exclusive. Indices are for utf8-encoded strings.",
         "properties": {
            "byteEnd": {
               "minimum": 0,
               "title": "Byteend",
               "type": "integer"
            },
            "byteStart": {
               "minimum": 0,
               "title": "Bytestart",
               "type": "integer"
            },
            "$type": {
               "const": "app.bsky.richtext.facet#byteSlice",
               "default": "app.bsky.richtext.facet#byteSlice",
               "title": "$Type"
            }
         },
         "required": [
            "byteEnd",
            "byteStart"
         ],
         "title": "ByteSlice",
         "type": "object"
      },
      "Link": {
         "additionalProperties": false,
         "description": "Definition model for :obj:`app.bsky.richtext.facet`. A facet feature for links.",
         "properties": {
            "uri": {
               "title": "Uri",
               "type": "string"
            },
            "$type": {
               "const": "app.bsky.richtext.facet#link",
               "default": "app.bsky.richtext.facet#link",
               "title": "$Type"
            }
         },
         "required": [
            "uri"
         ],
         "title": "Link",
         "type": "object"
      },
      "Mention": {
         "additionalProperties": false,
         "description": "Definition model for :obj:`app.bsky.richtext.facet`. A facet feature for actor mentions.",
         "properties": {
            "did": {
               "title": "Did",
               "type": "string"
            },
            "$type": {
               "const": "app.bsky.richtext.facet#mention",
               "default": "app.bsky.richtext.facet#mention",
               "title": "$Type"
            }
         },
         "required": [
            "did"
         ],
         "title": "Mention",
         "type": "object"
      },
      "Tag": {
         "additionalProperties": false,
         "description": "Definition model for :obj:`app.bsky.richtext.facet`. A hashtag.",
         "properties": {
            "tag": {
               "maxLength": 640,
               "title": "Tag",
               "type": "string"
            },
            "$type": {
               "const": "app.bsky.richtext.facet#tag",
               "default": "app.bsky.richtext.facet#tag",
               "title": "$Type"
            }
         },
         "required": [
            "tag"
         ],
         "title": "Tag",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "features",
      "index"
   ]
}

Fields:
field features: List[Union[models.AppBskyRichtextFacet.Mention, models.AppBskyRichtextFacet.Link, models.AppBskyRichtextFacet.Tag][Union[models.AppBskyRichtextFacet.Mention, models.AppBskyRichtextFacet.Link, models.AppBskyRichtextFacet.Tag]]] [Required]#
field index: models.AppBskyRichtextFacet.ByteSlice [Required]#

Index.

field py_type: typing_extensions.Literal[app.bsky.richtext.facet] = 'app.bsky.richtext.facet' (alias '$type')#
pydantic model atproto.xrpc_client.models.app.bsky.richtext.facet.Mention#

Bases: ModelBase

Definition model for app.bsky.richtext.facet. A facet feature for actor mentions.

Show JSON schema
{
   "title": "Mention",
   "description": "Definition model for :obj:`app.bsky.richtext.facet`. A facet feature for actor mentions.",
   "type": "object",
   "properties": {
      "did": {
         "title": "Did",
         "type": "string"
      },
      "$type": {
         "const": "app.bsky.richtext.facet#mention",
         "default": "app.bsky.richtext.facet#mention",
         "title": "$Type"
      }
   },
   "additionalProperties": false,
   "required": [
      "did"
   ]
}

Fields:
field did: str [Required]#

Did.

field py_type: typing_extensions.Literal[app.bsky.richtext.facet#mention] = 'app.bsky.richtext.facet#mention' (alias '$type')#
pydantic model atproto.xrpc_client.models.app.bsky.richtext.facet.Tag#

Bases: ModelBase

Definition model for app.bsky.richtext.facet. A hashtag.

Show JSON schema
{
   "title": "Tag",
   "description": "Definition model for :obj:`app.bsky.richtext.facet`. A hashtag.",
   "type": "object",
   "properties": {
      "tag": {
         "maxLength": 640,
         "title": "Tag",
         "type": "string"
      },
      "$type": {
         "const": "app.bsky.richtext.facet#tag",
         "default": "app.bsky.richtext.facet#tag",
         "title": "$Type"
      }
   },
   "additionalProperties": false,
   "required": [
      "tag"
   ]
}

Fields:
field py_type: typing_extensions.Literal[app.bsky.richtext.facet#tag] = 'app.bsky.richtext.facet#tag' (alias '$type')#
field tag: str [Required]#

Tag.

Constraints:
  • max_length = 640