···1+{
2+ "lexicon": 1,
3+ "id": "com.atproto.label.defs",
4+ "defs": {
5+ "label": {
6+ "type": "object",
7+ "description": "Metadata tag on an atproto resource (eg, repo or record).",
8+ "required": ["src", "uri", "val", "cts"],
9+ "properties": {
10+ "ver": {
11+ "type": "integer",
12+ "description": "The AT Protocol version of the label object."
13+ },
14+ "src": {
15+ "type": "string",
16+ "format": "did",
17+ "description": "DID of the actor who created this label."
18+ },
19+ "uri": {
20+ "type": "string",
21+ "format": "uri",
22+ "description": "AT URI of the record, repository (account), or other resource that this label applies to."
23+ },
24+ "cid": {
25+ "type": "string",
26+ "format": "cid",
27+ "description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to."
28+ },
29+ "val": {
30+ "type": "string",
31+ "maxLength": 128,
32+ "description": "The short string name of the value or type of this label."
33+ },
34+ "neg": {
35+ "type": "boolean",
36+ "description": "If true, this is a negation label, overwriting a previous label."
37+ },
38+ "cts": {
39+ "type": "string",
40+ "format": "datetime",
41+ "description": "Timestamp when this label was created."
42+ },
43+ "exp": {
44+ "type": "string",
45+ "format": "datetime",
46+ "description": "Timestamp at which this label expires (no longer applies)."
47+ },
48+ "sig": {
49+ "type": "bytes",
50+ "description": "Signature of dag-cbor encoded label."
51+ }
52+ }
53+ },
54+ "selfLabels": {
55+ "type": "object",
56+ "description": "Metadata tags on an atproto record, published by the author within the record.",
57+ "required": ["values"],
58+ "properties": {
59+ "values": {
60+ "type": "array",
61+ "items": { "type": "ref", "ref": "#selfLabel" },
62+ "maxLength": 10
63+ }
64+ }
65+ },
66+ "selfLabel": {
67+ "type": "object",
68+ "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.",
69+ "required": ["val"],
70+ "properties": {
71+ "val": {
72+ "type": "string",
73+ "maxLength": 128,
74+ "description": "The short string name of the value or type of this label."
75+ }
76+ }
77+ },
78+ "labelValueDefinition": {
79+ "type": "object",
80+ "description": "Declares a label value and its expected interpretations and behaviors.",
81+ "required": ["identifier", "severity", "blurs", "locales"],
82+ "properties": {
83+ "identifier": {
84+ "type": "string",
85+ "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
86+ "maxLength": 100,
87+ "maxGraphemes": 100
88+ },
89+ "severity": {
90+ "type": "string",
91+ "description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
92+ "knownValues": ["inform", "alert", "none"]
93+ },
94+ "blurs": {
95+ "type": "string",
96+ "description": "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.",
97+ "knownValues": ["content", "media", "none"]
98+ },
99+ "defaultSetting": {
100+ "type": "string",
101+ "description": "The default setting for this label.",
102+ "knownValues": ["ignore", "warn", "hide"],
103+ "default": "warn"
104+ },
105+ "adultOnly": {
106+ "type": "boolean",
107+ "description": "Does the user need to have adult content enabled in order to configure this label?"
108+ },
109+ "locales": {
110+ "type": "array",
111+ "items": { "type": "ref", "ref": "#labelValueDefinitionStrings" }
112+ }
113+ }
114+ },
115+ "labelValueDefinitionStrings": {
116+ "type": "object",
117+ "description": "Strings which describe the label in the UI, localized into a specific language.",
118+ "required": ["lang", "name", "description"],
119+ "properties": {
120+ "lang": {
121+ "type": "string",
122+ "description": "The code of the language these strings are written in.",
123+ "format": "language"
124+ },
125+ "name": {
126+ "type": "string",
127+ "description": "A short human-readable name for the label.",
128+ "maxGraphemes": 64,
129+ "maxLength": 640
130+ },
131+ "description": {
132+ "type": "string",
133+ "description": "A longer description of what the label means and why it might be applied.",
134+ "maxGraphemes": 10000,
135+ "maxLength": 100000
136+ }
137+ }
138+ },
139+ "labelValue": {
140+ "type": "string",
141+ "knownValues": [
142+ "!hide",
143+ "!no-promote",
144+ "!warn",
145+ "!no-unauthenticated",
146+ "dmca-violation",
147+ "doxxing",
148+ "porn",
149+ "sexual",
150+ "nudity",
151+ "nsfl",
152+ "gore"
153+ ]
154+ }
155+ }
156+}
···1+/**
2+ * GENERATED CODE - DO NOT MODIFY
3+ */
4+import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5+import { CID } from 'multiformats/cid'
6+import { validate as _validate } from '../../../../lexicons'
7+import {
8+ type $Typed,
9+ is$typed as _is$typed,
10+ type OmitKey,
11+} from '../../../../util'
12+13+const is$typed = _is$typed,
14+ validate = _validate
15+const id = 'com.atproto.label.defs'
16+17+/** Metadata tag on an atproto resource (eg, repo or record). */
18+export interface Label {
19+ $type?: 'com.atproto.label.defs#label'
20+ /** The AT Protocol version of the label object. */
21+ ver?: number
22+ /** DID of the actor who created this label. */
23+ src: string
24+ /** AT URI of the record, repository (account), or other resource that this label applies to. */
25+ uri: string
26+ /** Optionally, CID specifying the specific version of 'uri' resource this label applies to. */
27+ cid?: string
28+ /** The short string name of the value or type of this label. */
29+ val: string
30+ /** If true, this is a negation label, overwriting a previous label. */
31+ neg?: boolean
32+ /** Timestamp when this label was created. */
33+ cts: string
34+ /** Timestamp at which this label expires (no longer applies). */
35+ exp?: string
36+ /** Signature of dag-cbor encoded label. */
37+ sig?: Uint8Array
38+}
39+40+const hashLabel = 'label'
41+42+export function isLabel<V>(v: V) {
43+ return is$typed(v, id, hashLabel)
44+}
45+46+export function validateLabel<V>(v: V) {
47+ return validate<Label & V>(v, id, hashLabel)
48+}
49+50+/** Metadata tags on an atproto record, published by the author within the record. */
51+export interface SelfLabels {
52+ $type?: 'com.atproto.label.defs#selfLabels'
53+ values: SelfLabel[]
54+}
55+56+const hashSelfLabels = 'selfLabels'
57+58+export function isSelfLabels<V>(v: V) {
59+ return is$typed(v, id, hashSelfLabels)
60+}
61+62+export function validateSelfLabels<V>(v: V) {
63+ return validate<SelfLabels & V>(v, id, hashSelfLabels)
64+}
65+66+/** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. */
67+export interface SelfLabel {
68+ $type?: 'com.atproto.label.defs#selfLabel'
69+ /** The short string name of the value or type of this label. */
70+ val: string
71+}
72+73+const hashSelfLabel = 'selfLabel'
74+75+export function isSelfLabel<V>(v: V) {
76+ return is$typed(v, id, hashSelfLabel)
77+}
78+79+export function validateSelfLabel<V>(v: V) {
80+ return validate<SelfLabel & V>(v, id, hashSelfLabel)
81+}
82+83+/** Declares a label value and its expected interpretations and behaviors. */
84+export interface LabelValueDefinition {
85+ $type?: 'com.atproto.label.defs#labelValueDefinition'
86+ /** The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). */
87+ identifier: string
88+ /** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. */
89+ severity: 'inform' | 'alert' | 'none' | (string & {})
90+ /** 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. */
91+ blurs: 'content' | 'media' | 'none' | (string & {})
92+ /** The default setting for this label. */
93+ defaultSetting: 'ignore' | 'warn' | 'hide' | (string & {})
94+ /** Does the user need to have adult content enabled in order to configure this label? */
95+ adultOnly?: boolean
96+ locales: LabelValueDefinitionStrings[]
97+}
98+99+const hashLabelValueDefinition = 'labelValueDefinition'
100+101+export function isLabelValueDefinition<V>(v: V) {
102+ return is$typed(v, id, hashLabelValueDefinition)
103+}
104+105+export function validateLabelValueDefinition<V>(v: V) {
106+ return validate<LabelValueDefinition & V>(v, id, hashLabelValueDefinition)
107+}
108+109+/** Strings which describe the label in the UI, localized into a specific language. */
110+export interface LabelValueDefinitionStrings {
111+ $type?: 'com.atproto.label.defs#labelValueDefinitionStrings'
112+ /** The code of the language these strings are written in. */
113+ lang: string
114+ /** A short human-readable name for the label. */
115+ name: string
116+ /** A longer description of what the label means and why it might be applied. */
117+ description: string
118+}
119+120+const hashLabelValueDefinitionStrings = 'labelValueDefinitionStrings'
121+122+export function isLabelValueDefinitionStrings<V>(v: V) {
123+ return is$typed(v, id, hashLabelValueDefinitionStrings)
124+}
125+126+export function validateLabelValueDefinitionStrings<V>(v: V) {
127+ return validate<LabelValueDefinitionStrings & V>(
128+ v,
129+ id,
130+ hashLabelValueDefinitionStrings,
131+ )
132+}
133+134+export type LabelValue =
135+ | '!hide'
136+ | '!no-promote'
137+ | '!warn'
138+ | '!no-unauthenticated'
139+ | 'dmca-violation'
140+ | 'doxxing'
141+ | 'porn'
142+ | 'sexual'
143+ | 'nudity'
144+ | 'nsfl'
145+ | 'gore'
146+ | (string & {})
+31
src/lexicon/types/com/atproto/repo/strongRef.ts
···0000000000000000000000000000000
···1+/**
2+ * GENERATED CODE - DO NOT MODIFY
3+ */
4+import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5+import { CID } from 'multiformats/cid'
6+import { validate as _validate } from '../../../../lexicons'
7+import {
8+ type $Typed,
9+ is$typed as _is$typed,
10+ type OmitKey,
11+} from '../../../../util'
12+13+const is$typed = _is$typed,
14+ validate = _validate
15+const id = 'com.atproto.repo.strongRef'
16+17+export interface Main {
18+ $type?: 'com.atproto.repo.strongRef'
19+ uri: string
20+ cid: string
21+}
22+23+const hashMain = 'main'
24+25+export function isMain<V>(v: V) {
26+ return is$typed(v, id, hashMain)
27+}
28+29+export function validateMain<V>(v: V) {
30+ return validate<Main & V>(v, id, hashMain)
31+}
+42
src/lexicon/types/org/atmosphereconf/profile.ts
···000000000000000000000000000000000000000000
···1+/**
2+ * GENERATED CODE - DO NOT MODIFY
3+ */
4+import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5+import { CID } from 'multiformats/cid'
6+import { validate as _validate } from '../../../lexicons'
7+import { type $Typed, is$typed as _is$typed, type OmitKey } from '../../../util'
8+import type * as ComAtprotoLabelDefs from '../../com/atproto/label/defs.js'
9+10+const is$typed = _is$typed,
11+ validate = _validate
12+const id = 'org.atmosphereconf.profile'
13+14+export interface Main {
15+ $type: 'org.atmosphereconf.profile'
16+ displayName?: string
17+ /** Free-form profile description text. */
18+ description?: string
19+ /** Profile picture for conference attendee */
20+ avatar?: BlobRef
21+ /** Larger horizontal image to display behind profile view. */
22+ banner?: BlobRef
23+ labels?: $Typed<ComAtprotoLabelDefs.SelfLabels> | { $type: string }
24+ createdAt?: string
25+ [k: string]: unknown
26+}
27+28+const hashMain = 'main'
29+30+export function isMain<V>(v: V) {
31+ return is$typed(v, id, hashMain)
32+}
33+34+export function validateMain<V>(v: V) {
35+ return validate<Main & V>(v, id, hashMain, true)
36+}
37+38+export {
39+ type Main as Record,
40+ isMain as isRecord,
41+ validateMain as validateRecord,
42+}