diff --git a/lexicons/app/bsky/actor/defs.json b/lexicons/app/bsky/actor/defs.json index 913957f1291..9dbf4ae3de4 100644 --- a/lexicons/app/bsky/actor/defs.json +++ b/lexicons/app/bsky/actor/defs.json @@ -199,6 +199,42 @@ "description": "Show followed users at the top of all replies." } } + }, + "labelersPref": { + "type": "object", + "required": ["labelers"], + "properties": { + "labelers": { + "type": "array", + "items": { + "type": "object", + "required": ["uri", "enabled", "labelGroupSettings"], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "enabled": { + "type": "boolean" + }, + "labelGroupSettings": { + "type": "array", + "items": { + "type": "object", + "required": ["labelGroup", "visibility"], + "properties": { + "labelGroup": { "type": "string" }, + "visibility": { + "type": "string", + "knownValues": ["show", "warn", "hide"] + } + } + } + } + } + } + } + } } } } diff --git a/lexicons/app/bsky/label/defs.json b/lexicons/app/bsky/label/defs.json new file mode 100644 index 00000000000..84b5ab384cb --- /dev/null +++ b/lexicons/app/bsky/label/defs.json @@ -0,0 +1,103 @@ +{ + "lexicon": 1, + "id": "app.bsky.label.defs", + "defs": { + "labelerView": { + "type": "object", + "required": ["uri", "cid", "did", "creator", "displayName", "indexedAt"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "did": { "type": "string", "format": "did" }, + "creator": { "type": "ref", "ref": "app.bsky.actor.defs#profileView" }, + "displayName": { "type": "string" }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000 + }, + "descriptionFacets": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.richtext.facet" } + }, + "avatar": { "type": "string" }, + "policies": {"type": "ref", "ref": "app.bsky.label.defs#labelerPolicies"}, + "likeCount": { "type": "integer", "minimum": 0 }, + "viewer": { "type": "ref", "ref": "#labelerViewerState" }, + "indexedAt": { "type": "string", "format": "datetime" } + } + }, + "labelerViewerState": { + "type": "object", + "properties": { + "like": { "type": "string", "format": "at-uri" } + } + }, + "labelerPolicies": { + "type": "object", + "required": ["reportReasons", "labelValues"], + "properties": { + "description": { + "type": "string", + "maxGraphemes": 10000, + "maxLength": 100000 + }, + "descriptionFacets": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.richtext.facet" } + }, + "reportReasons": { + "type": "array", + "items": { + "type": "string", + "knownValues": [ + "com.atproto.moderation.defs#reasonSpam", + "com.atproto.moderation.defs#reasonViolation", + "com.atproto.moderation.defs#reasonMisleading", + "com.atproto.moderation.defs#reasonSexual", + "com.atproto.moderation.defs#reasonRude", + "com.atproto.moderation.defs#reasonOther", + "com.atproto.moderation.defs#reasonAppeal" + ] + } + }, + "labelValues": { + "type": "array", + "items": { + "type": "string", + "knownValues": [ + "!hide", + "!no-promote", + "!warn", + "!no-unauthenticated", + "dmca-violation", + "doxxing", + "porn", + "sexual", + "nudity", + "nsfl", + "corpse", + "gore", + "torture", + "self-harm", + "intolerant-race", + "intolerant-gender", + "intolerant-sexual-orientation", + "intolerant-religion", + "intolerant", + "icon-intolerant", + "threat", + "spoiler", + "spam", + "account-security", + "net-abuse", + "impersonation", + "scam", + "misleading" + ] + } + } + } + } + } +} diff --git a/lexicons/app/bsky/label/getLabeler.json b/lexicons/app/bsky/label/getLabeler.json new file mode 100644 index 00000000000..feb26f6bdef --- /dev/null +++ b/lexicons/app/bsky/label/getLabeler.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "app.bsky.label.getLabeler", + "defs": { + "main": { + "type": "query", + "description": "Get information about a labeler.", + "parameters": { + "type": "params", + "required": ["labeler"], + "properties": { + "labeler": { "type": "string", "format": "at-uri" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["view"], + "properties": { + "view": { + "type": "ref", + "ref": "app.bsky.label.defs#labelerView" + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/label/getLabelers.json b/lexicons/app/bsky/label/getLabelers.json new file mode 100644 index 00000000000..1d69cfd7ea4 --- /dev/null +++ b/lexicons/app/bsky/label/getLabelers.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "app.bsky.label.getLabelers", + "defs": { + "main": { + "type": "query", + "description": "Get information about a list of labelers.", + "parameters": { + "type": "params", + "required": ["labelers"], + "properties": { + "labelers": { + "type": "array", + "items": { "type": "string", "format": "at-uri" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["labelers"], + "properties": { + "labelers": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.label.defs#labelerView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/label/labeler.json b/lexicons/app/bsky/label/labeler.json new file mode 100644 index 00000000000..5c8b82143d4 --- /dev/null +++ b/lexicons/app/bsky/label/labeler.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "app.bsky.label.laneler", + "defs": { + "main": { + "type": "record", + "description": "A declaration of the existence of labeler.", + "key": "any", + "record": { + "type": "object", + "required": ["did", "displayName", "policies", "createdAt"], + "properties": { + "did": { "type": "string", "format": "did" }, + "displayName": { + "type": "string", + "maxGraphemes": 24, + "maxLength": 240 + }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000 + }, + "descriptionFacets": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.richtext.facet" } + }, + "avatar": { + "type": "blob", + "accept": ["image/png", "image/jpeg"], + "maxSize": 1000000 + }, + "policies": {"type": "ref", "ref": "app.bsky.label.defs#labelerPolicies"}, + "labels": { + "type": "union", + "refs": ["com.atproto.label.defs#selfLabels"] + }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + } + } +}