com.atproto.label.defs

Shared type definitions.

class atproto_client.models.com.atproto.label.defs.Label

Bases: ModelBase

Definition model for com.atproto.label.defs. Metadata tag on an atproto resource (eg, repo or record).

field cid: Cid | None = None
field cts: DateTime [Required]

Timestamp when this label was created.

field exp: DateTime | None = None

Timestamp at which this label expires (no longer applies).

field neg: bool | None = None

If true, this is a negation label, overwriting a previous label.

field sig: str | bytes | None = None

Signature of dag-cbor encoded label.

field src: Did [Required]

DID of the actor who created this label.

field uri: Uri [Required]

AT URI of the record, repository (account), or other resource that this label applies to.

field val: str [Required]

The short string name of the value or type of this label.

Constraints:
  • max_length = 128

field ver: int | None = None

The AT Protocol version of the label object.

class atproto_client.models.com.atproto.label.defs.SelfLabels

Bases: ModelBase

Definition model for com.atproto.label.defs. Metadata tags on an atproto record, published by the author within the record.

field values: List[models.ComAtprotoLabelDefs.SelfLabel] [Required]

Values.

Constraints:
  • max_length = 10

class atproto_client.models.com.atproto.label.defs.SelfLabel

Bases: ModelBase

Definition model for com.atproto.label.defs. Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.

field val: str [Required]

The short string name of the value or type of this label.

Constraints:
  • max_length = 128

class atproto_client.models.com.atproto.label.defs.LabelValueDefinition

Bases: ModelBase

Definition model for com.atproto.label.defs. Declares a label value and its expected interpretations and behaviors.

field adult_only: bool | None = None
field blurs: Literal['content', 'media', 'none'] | str [Required]

What should this label hide in the UI, if applied? ‘content’ hides all of the target; ‘media’ hides the images/video/audio; ‘none’ hides nothing.

field default_setting: Literal['ignore', 'warn', 'hide'] | str | None = 'warn'
field identifier: str [Required]

The value of the label being defined. Must only include lowercase ascii and the ‘-’ character ([a-z-]+).

Constraints:
  • max_length = 100

field locales: List[models.ComAtprotoLabelDefs.LabelValueDefinitionStrings] [Required]

Locales.

field severity: Literal['inform', 'alert', 'none'] | str [Required]

How should a client visually convey this label? ‘inform’ means neutral and informational; ‘alert’ means negative and warning; ‘none’ means show nothing.

class atproto_client.models.com.atproto.label.defs.LabelValueDefinitionStrings

Bases: ModelBase

Definition model for com.atproto.label.defs. Strings which describe the label in the UI, localized into a specific language.

field description: str [Required]

A longer description of what the label means and why it might be applied.

Constraints:
  • max_length = 100000

field lang: Language [Required]

The code of the language these strings are written in.

field name: str [Required]

A short human-readable name for the label.

Constraints:
  • max_length = 640

atproto_client.models.com.atproto.label.defs.LabelValue

Label value

alias of Literal[‘!hide’, ‘!warn’, ‘!no-unauthenticated’, ‘porn’, ‘sexual’, ‘nudity’, ‘graphic-media’, ‘bot’] | str