diff --git a/lexicons/com.atproto/label.defs b/lexicons/com.atproto/label.defs new file mode 100644 index 0000000..503aae9 --- /dev/null +++ b/lexicons/com.atproto/label.defs @@ -0,0 +1,193 @@ +{ + "$type": "com.atproto.lexicon.schema", + "defs": { + "label": { + "description": "Metadata tag on an atproto resource (eg, repo or record).", + "properties": { + "cid": { + "description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to.", + "format": "cid", + "type": "string" + }, + "cts": { + "description": "Timestamp when this label was created.", + "format": "datetime", + "type": "string" + }, + "exp": { + "description": "Timestamp at which this label expires (no longer applies).", + "format": "datetime", + "type": "string" + }, + "neg": { + "description": "If true, this is a negation label, overwriting a previous label.", + "type": "boolean" + }, + "sig": { + "description": "Signature of dag-cbor encoded label.", + "type": "bytes" + }, + "src": { + "description": "DID of the actor who created this label.", + "format": "did", + "type": "string" + }, + "uri": { + "description": "AT URI of the record, repository (account), or other resource that this label applies to.", + "format": "uri", + "type": "string" + }, + "val": { + "description": "The short string name of the value or type of this label.", + "maxLength": 128, + "type": "string" + }, + "ver": { + "description": "The AT Protocol version of the label object.", + "type": "integer" + } + }, + "required": [ + "src", + "uri", + "val", + "cts" + ], + "type": "object" + }, + "labelValue": { + "knownValues": [ + "!hide", + "!no-promote", + "!warn", + "!no-unauthenticated", + "dmca-violation", + "doxxing", + "porn", + "sexual", + "nudity", + "nsfl", + "gore" + ], + "type": "string" + }, + "labelValueDefinition": { + "description": "Declares a label value and its expected interpretations and behaviors.", + "properties": { + "adultOnly": { + "description": "Does the user need to have adult content enabled in order to configure this label?", + "type": "boolean" + }, + "blurs": { + "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.", + "knownValues": [ + "content", + "media", + "none" + ], + "type": "string" + }, + "defaultSetting": { + "default": "warn", + "description": "The default setting for this label.", + "knownValues": [ + "ignore", + "warn", + "hide" + ], + "type": "string" + }, + "identifier": { + "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).", + "maxGraphemes": 100, + "maxLength": 100, + "type": "string" + }, + "locales": { + "items": { + "ref": "#labelValueDefinitionStrings", + "type": "ref" + }, + "type": "array" + }, + "severity": { + "description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.", + "knownValues": [ + "inform", + "alert", + "none" + ], + "type": "string" + } + }, + "required": [ + "identifier", + "severity", + "blurs", + "locales" + ], + "type": "object" + }, + "labelValueDefinitionStrings": { + "description": "Strings which describe the label in the UI, localized into a specific language.", + "properties": { + "description": { + "description": "A longer description of what the label means and why it might be applied.", + "maxGraphemes": 10000, + "maxLength": 100000, + "type": "string" + }, + "lang": { + "description": "The code of the language these strings are written in.", + "format": "language", + "type": "string" + }, + "name": { + "description": "A short human-readable name for the label.", + "maxGraphemes": 64, + "maxLength": 640, + "type": "string" + } + }, + "required": [ + "lang", + "name", + "description" + ], + "type": "object" + }, + "selfLabel": { + "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.", + "properties": { + "val": { + "description": "The short string name of the value or type of this label.", + "maxLength": 128, + "type": "string" + } + }, + "required": [ + "val" + ], + "type": "object" + }, + "selfLabels": { + "description": "Metadata tags on an atproto record, published by the author within the record.", + "properties": { + "values": { + "items": { + "ref": "#selfLabel", + "type": "ref" + }, + "maxLength": 10, + "type": "array" + } + }, + "required": [ + "values" + ], + "type": "object" + } + }, + "id": "com.atproto.label.defs", + "lexicon": 1 +} diff --git a/lexicons/social.grain/actor.profile.json b/lexicons/social.grain/actor.profile.json new file mode 100644 index 0000000..07ad3ff --- /dev/null +++ b/lexicons/social.grain/actor.profile.json @@ -0,0 +1,41 @@ +{ + "$type": "com.atproto.lexicon.schema", + "defs": { + "main": { + "description": "A declaration of a basic account profile.", + "key": "literal:self", + "record": { + "properties": { + "avatar": { + "accept": [ + "image/png", + "image/jpeg" + ], + "description": "Small image to be displayed next to posts from account. AKA, 'profile picture'", + "maxSize": 1000000, + "type": "blob" + }, + "createdAt": { + "format": "datetime", + "type": "string" + }, + "description": { + "description": "Free-form profile description text.", + "maxGraphemes": 256, + "maxLength": 2560, + "type": "string" + }, + "displayName": { + "maxGraphemes": 64, + "maxLength": 640, + "type": "string" + } + }, + "type": "object" + }, + "type": "record" + } + }, + "id": "social.grain.actor.profile", + "lexicon": 1 +} diff --git a/lexicons/social.grain/defs.json b/lexicons/social.grain/defs.json new file mode 100644 index 0000000..e53bdb1 --- /dev/null +++ b/lexicons/social.grain/defs.json @@ -0,0 +1,25 @@ +{ + "$type": "com.atproto.lexicon.schema", + "defs": { + "aspectRatio": { + "description": "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.", + "properties": { + "height": { + "minimum": 1, + "type": "integer" + }, + "width": { + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "width", + "height" + ], + "type": "object" + } + }, + "id": "social.grain.defs", + "lexicon": 1 +} diff --git a/lexicons/social.grain/favorite.json b/lexicons/social.grain/favorite.json new file mode 100644 index 0000000..24b5953 --- /dev/null +++ b/lexicons/social.grain/favorite.json @@ -0,0 +1,28 @@ +{ + "$type": "com.atproto.lexicon.schema", + "defs": { + "main": { + "key": "tid", + "record": { + "properties": { + "createdAt": { + "format": "datetime", + "type": "string" + }, + "subject": { + "format": "at-uri", + "type": "string" + } + }, + "required": [ + "createdAt", + "subject" + ], + "type": "object" + }, + "type": "record" + } + }, + "id": "social.grain.favorite", + "lexicon": 1 +} diff --git a/lexicons/social.grain/gallery.item.json b/lexicons/social.grain/gallery.item.json new file mode 100644 index 0000000..7fe7458 --- /dev/null +++ b/lexicons/social.grain/gallery.item.json @@ -0,0 +1,37 @@ +{ + "$type": "com.atproto.lexicon.schema", + "defs": { + "main": { + "key": "tid", + "record": { + "properties": { + "createdAt": { + "format": "datetime", + "type": "string" + }, + "gallery": { + "format": "at-uri", + "type": "string" + }, + "item": { + "format": "at-uri", + "type": "string" + }, + "position": { + "default": 0, + "type": "integer" + } + }, + "required": [ + "createdAt", + "gallery", + "item" + ], + "type": "object" + }, + "type": "record" + } + }, + "id": "social.grain.gallery.item", + "lexicon": 1 +} diff --git a/lexicons/social.grain/gallery.json b/lexicons/social.grain/gallery.json new file mode 100644 index 0000000..faf77f1 --- /dev/null +++ b/lexicons/social.grain/gallery.json @@ -0,0 +1,39 @@ +{ + "$type": "com.atproto.lexicon.schema", + "defs": { + "main": { + "key": "tid", + "record": { + "properties": { + "createdAt": { + "format": "datetime", + "type": "string" + }, + "description": { + "maxLength": 1000, + "type": "string" + }, + "labels": { + "description": "Self-label values for this post. Effectively content warnings.", + "refs": [ + "com.atproto.label.defs#selfLabels" + ], + "type": "union" + }, + "title": { + "maxLength": 100, + "type": "string" + } + }, + "required": [ + "title", + "createdAt" + ], + "type": "object" + }, + "type": "record" + } + }, + "id": "social.grain.gallery", + "lexicon": 1 +} diff --git a/lexicons/social.grain/photo.json b/lexicons/social.grain/photo.json new file mode 100644 index 0000000..175a1e1 --- /dev/null +++ b/lexicons/social.grain/photo.json @@ -0,0 +1,39 @@ +{ + "$type": "com.atproto.lexicon.schema", + "defs": { + "main": { + "key": "tid", + "record": { + "properties": { + "alt": { + "description": "Alt text description of the image, for accessibility.", + "type": "string" + }, + "aspectRatio": { + "ref": "social.grain.defs#aspectRatio", + "type": "ref" + }, + "createdAt": { + "format": "datetime", + "type": "string" + }, + "photo": { + "accept": [ + "image/*" + ], + "maxSize": 1000000, + "type": "blob" + } + }, + "required": [ + "photo", + "alt" + ], + "type": "object" + }, + "type": "record" + } + }, + "id": "social.grain.photo", + "lexicon": 1 +}