diff --git a/lexicons.json b/lexicons.json new file mode 100644 index 0000000..a74c41b --- /dev/null +++ b/lexicons.json @@ -0,0 +1,17 @@ +{ + "lexicons": [ + "app.bsky.actor.defs", + "com.atproto.repo.uploadBlob", + "com.atproto.repo.strongRef", + "com.atproto.repo.putRecord", + "com.atproto.repo.listRecords", + "com.atproto.repo.listMissingBlobs", + "com.atproto.repo.importRepo", + "com.atproto.repo.getRecord", + "com.atproto.repo.describeRepo", + "com.atproto.repo.deleteRecord", + "com.atproto.repo.defs", + "com.atproto.repo.createRecord", + "com.atproto.repo.applyWrites" + ] +} \ No newline at end of file diff --git a/lexicons/app/bsky/actor/defs.json b/lexicons/app/bsky/actor/defs.json index b2ce1f5..4da390f 100644 --- a/lexicons/app/bsky/actor/defs.json +++ b/lexicons/app/bsky/actor/defs.json @@ -2,30 +2,694 @@ "lexicon": 1, "id": "app.bsky.actor.defs", "defs": { + "nux": { + "type": "object", + "required": [ + "id", + "completed" + ], + "properties": { + "id": { + "type": "string", + "maxLength": 100 + }, + "data": { + "type": "string", + "maxLength": 3000, + "description": "Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.", + "maxGraphemes": 300 + }, + "completed": { + "type": "boolean", + "default": false + }, + "expiresAt": { + "type": "string", + "format": "datetime", + "description": "The date and time at which the NUX will expire and should be considered completed." + } + }, + "description": "A new user experiences (NUX) storage object" + }, + "mutedWord": { + "type": "object", + "required": [ + "value", + "targets" + ], + "properties": { + "id": { + "type": "string" + }, + "value": { + "type": "string", + "maxLength": 10000, + "description": "The muted word itself.", + "maxGraphemes": 1000 + }, + "targets": { + "type": "array", + "items": { + "ref": "app.bsky.actor.defs#mutedWordTarget", + "type": "ref" + }, + "description": "The intended targets of the muted word." + }, + "expiresAt": { + "type": "string", + "format": "datetime", + "description": "The date and time at which the muted word will expire and no longer be applied." + }, + "actorTarget": { + "type": "string", + "default": "all", + "description": "Groups of users to apply the muted word to. If undefined, applies to all users.", + "knownValues": [ + "all", + "exclude-following" + ] + } + }, + "description": "A word that the account owner has muted." + }, + "savedFeed": { + "type": "object", + "required": [ + "id", + "type", + "value", + "pinned" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "knownValues": [ + "feed", + "list", + "timeline" + ] + }, + "value": { + "type": "string" + }, + "pinned": { + "type": "boolean" + } + } + }, + "preferences": { + "type": "array", + "items": { + "refs": [ + "#adultContentPref", + "#contentLabelPref", + "#savedFeedsPref", + "#savedFeedsPrefV2", + "#personalDetailsPref", + "#feedViewPref", + "#threadViewPref", + "#interestsPref", + "#mutedWordsPref", + "#hiddenPostsPref", + "#bskyAppStatePref", + "#labelersPref", + "#postInteractionSettingsPref" + ], + "type": "union" + } + }, "profileView": { "type": "object", - "required": ["did", "handle"], + "required": [ + "did", + "handle" + ], "properties": { - "did": { "type": "string", "format": "did" }, - "handle": { "type": "string", "format": "handle" }, - "displayName": { + "did": { + "type": "string", + "format": "did" + }, + "avatar": { + "type": "string", + "format": "uri" + }, + "handle": { + "type": "string", + "format": "handle" + }, + "labels": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#label", + "type": "ref" + } + }, + "viewer": { + "ref": "#viewerState", + "type": "ref" + }, + "createdAt": { "type": "string", - "maxGraphemes": 64, - "maxLength": 640 + "format": "datetime" + }, + "indexedAt": { + "type": "string", + "format": "datetime" + }, + "associated": { + "ref": "#profileAssociated", + "type": "ref" }, "description": { "type": "string", - "maxGraphemes": 256, - "maxLength": 2560 + "maxLength": 2560, + "maxGraphemes": 256 + }, + "displayName": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64 + } + } + }, + "viewerState": { + "type": "object", + "properties": { + "muted": { + "type": "boolean" + }, + "blocking": { + "type": "string", + "format": "at-uri" + }, + "blockedBy": { + "type": "boolean" + }, + "following": { + "type": "string", + "format": "at-uri" + }, + "followedBy": { + "type": "string", + "format": "at-uri" + }, + "mutedByList": { + "ref": "app.bsky.graph.defs#listViewBasic", + "type": "ref" + }, + "blockingByList": { + "ref": "app.bsky.graph.defs#listViewBasic", + "type": "ref" + }, + "knownFollowers": { + "ref": "#knownFollowers", + "type": "ref" + } + }, + "description": "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests." + }, + "feedViewPref": { + "type": "object", + "required": [ + "feed" + ], + "properties": { + "feed": { + "type": "string", + "description": "The URI of the feed, or an identifier which describes the feed." + }, + "hideReplies": { + "type": "boolean", + "description": "Hide replies in the feed." + }, + "hideReposts": { + "type": "boolean", + "description": "Hide reposts in the feed." + }, + "hideQuotePosts": { + "type": "boolean", + "description": "Hide quote posts in the feed." + }, + "hideRepliesByLikeCount": { + "type": "integer", + "description": "Hide replies in the feed if they do not have this number of likes." + }, + "hideRepliesByUnfollowed": { + "type": "boolean", + "default": true, + "description": "Hide replies in the feed if they are not by followed users." + } + } + }, + "labelersPref": { + "type": "object", + "required": [ + "labelers" + ], + "properties": { + "labelers": { + "type": "array", + "items": { + "ref": "#labelerPrefItem", + "type": "ref" + } + } + } + }, + "interestsPref": { + "type": "object", + "required": [ + "tags" + ], + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64 + }, + "maxLength": 100, + "description": "A list of tags which describe the account owner's interests gathered during onboarding." + } + } + }, + "knownFollowers": { + "type": "object", + "required": [ + "count", + "followers" + ], + "properties": { + "count": { + "type": "integer" + }, + "followers": { + "type": "array", + "items": { + "ref": "#profileViewBasic", + "type": "ref" + }, + "maxLength": 5, + "minLength": 0 + } + }, + "description": "The subject's followers whom you also follow" + }, + "mutedWordsPref": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "ref": "app.bsky.actor.defs#mutedWord", + "type": "ref" + }, + "description": "A list of words the account owner has muted." + } + } + }, + "savedFeedsPref": { + "type": "object", + "required": [ + "pinned", + "saved" + ], + "properties": { + "saved": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + } + }, + "pinned": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + } + }, + "timelineIndex": { + "type": "integer" + } + } + }, + "threadViewPref": { + "type": "object", + "properties": { + "sort": { + "type": "string", + "description": "Sorting mode for threads.", + "knownValues": [ + "oldest", + "newest", + "most-likes", + "random", + "hotness" + ] + }, + "prioritizeFollowedUsers": { + "type": "boolean", + "description": "Show followed users at the top of all replies." + } + } + }, + "hiddenPostsPref": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + }, + "description": "A list of URIs of posts the account owner has hidden." + } + } + }, + "labelerPrefItem": { + "type": "object", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + } + } + }, + "mutedWordTarget": { + "type": "string", + "maxLength": 640, + "knownValues": [ + "content", + "tag" + ], + "maxGraphemes": 64 + }, + "adultContentPref": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean", + "default": false + } + } + }, + "bskyAppStatePref": { + "type": "object", + "properties": { + "nuxs": { + "type": "array", + "items": { + "ref": "app.bsky.actor.defs#nux", + "type": "ref" + }, + "maxLength": 100, + "description": "Storage for NUXs the user has encountered." + }, + "queuedNudges": { + "type": "array", + "items": { + "type": "string", + "maxLength": 100 + }, + "maxLength": 1000, + "description": "An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user." + }, + "activeProgressGuide": { + "ref": "#bskyAppProgressGuide", + "type": "ref" + } + }, + "description": "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this." + }, + "contentLabelPref": { + "type": "object", + "required": [ + "label", + "visibility" + ], + "properties": { + "label": { + "type": "string" + }, + "labelerDid": { + "type": "string", + "format": "did", + "description": "Which labeler does this preference apply to? If undefined, applies globally." + }, + "visibility": { + "type": "string", + "knownValues": [ + "ignore", + "show", + "warn", + "hide" + ] + } + } + }, + "profileViewBasic": { + "type": "object", + "required": [ + "did", + "handle" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "avatar": { + "type": "string", + "format": "uri" + }, + "handle": { + "type": "string", + "format": "handle" + }, + "labels": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#label", + "type": "ref" + } + }, + "viewer": { + "ref": "#viewerState", + "type": "ref" + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "associated": { + "ref": "#profileAssociated", + "type": "ref" + }, + "displayName": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64 + } + } + }, + "savedFeedsPrefV2": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "ref": "app.bsky.actor.defs#savedFeed", + "type": "ref" + } + } + } + }, + "profileAssociated": { + "type": "object", + "properties": { + "chat": { + "ref": "#profileAssociatedChat", + "type": "ref" + }, + "lists": { + "type": "integer" + }, + "labeler": { + "type": "boolean" + }, + "feedgens": { + "type": "integer" + }, + "starterPacks": { + "type": "integer" + } + } + }, + "personalDetailsPref": { + "type": "object", + "properties": { + "birthDate": { + "type": "string", + "format": "datetime", + "description": "The birth date of account owner." + } + } + }, + "profileViewDetailed": { + "type": "object", + "required": [ + "did", + "handle" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "avatar": { + "type": "string", + "format": "uri" + }, + "banner": { + "type": "string", + "format": "uri" + }, + "handle": { + "type": "string", + "format": "handle" }, - "avatar": { "type": "string", "format": "uri" }, - "indexedAt": { "type": "string", "format": "datetime" }, - "createdAt": { "type": "string", "format": "datetime" }, "labels": { "type": "array", - "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + "items": { + "ref": "com.atproto.label.defs#label", + "type": "ref" + } + }, + "viewer": { + "ref": "#viewerState", + "type": "ref" + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "indexedAt": { + "type": "string", + "format": "datetime" + }, + "associated": { + "ref": "#profileAssociated", + "type": "ref" + }, + "pinnedPost": { + "ref": "com.atproto.repo.strongRef", + "type": "ref" + }, + "postsCount": { + "type": "integer" + }, + "description": { + "type": "string", + "maxLength": 2560, + "maxGraphemes": 256 + }, + "displayName": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64 + }, + "followsCount": { + "type": "integer" + }, + "followersCount": { + "type": "integer" + }, + "joinedViaStarterPack": { + "ref": "app.bsky.graph.defs#starterPackViewBasic", + "type": "ref" + } + } + }, + "bskyAppProgressGuide": { + "type": "object", + "required": [ + "guide" + ], + "properties": { + "guide": { + "type": "string", + "maxLength": 100 + } + }, + "description": "If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress." + }, + "profileAssociatedChat": { + "type": "object", + "required": [ + "allowIncoming" + ], + "properties": { + "allowIncoming": { + "type": "string", + "knownValues": [ + "all", + "none", + "following" + ] } } + }, + "postInteractionSettingsPref": { + "type": "object", + "required": [], + "properties": { + "threadgateAllowRules": { + "type": "array", + "items": { + "refs": [ + "app.bsky.feed.threadgate#mentionRule", + "app.bsky.feed.threadgate#followerRule", + "app.bsky.feed.threadgate#followingRule", + "app.bsky.feed.threadgate#listRule" + ], + "type": "union" + }, + "maxLength": 5, + "description": "Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply." + }, + "postgateEmbeddingRules": { + "type": "array", + "items": { + "refs": [ + "app.bsky.feed.postgate#disableRule" + ], + "type": "union" + }, + "maxLength": 5, + "description": "Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed." + } + }, + "description": "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly." } } -} +} \ No newline at end of file diff --git a/lexicons/app/bsky/embed/defs.json b/lexicons/app/bsky/embed/defs.json new file mode 100644 index 0000000..ad4c4c1 --- /dev/null +++ b/lexicons/app/bsky/embed/defs.json @@ -0,0 +1,24 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.defs", + "defs": { + "aspectRatio": { + "type": "object", + "required": [ + "width", + "height" + ], + "properties": { + "width": { + "type": "integer", + "minimum": 1 + }, + "height": { + "type": "integer", + "minimum": 1 + } + }, + "description": "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit." + } + } +} \ No newline at end of file diff --git a/lexicons/app/bsky/embed/external.json b/lexicons/app/bsky/embed/external.json new file mode 100644 index 0000000..b71f4b2 --- /dev/null +++ b/lexicons/app/bsky/embed/external.json @@ -0,0 +1,82 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.external", + "defs": { + "main": { + "type": "object", + "required": [ + "external" + ], + "properties": { + "external": { + "ref": "#external", + "type": "ref" + } + }, + "description": "A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post)." + }, + "view": { + "type": "object", + "required": [ + "external" + ], + "properties": { + "external": { + "ref": "#viewExternal", + "type": "ref" + } + } + }, + "external": { + "type": "object", + "required": [ + "uri", + "title", + "description" + ], + "properties": { + "uri": { + "type": "string", + "format": "uri" + }, + "thumb": { + "type": "blob", + "accept": [ + "image/*" + ], + "maxSize": 1000000 + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "viewExternal": { + "type": "object", + "required": [ + "uri", + "title", + "description" + ], + "properties": { + "uri": { + "type": "string", + "format": "uri" + }, + "thumb": { + "type": "string", + "format": "uri" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/lexicons/app/bsky/embed/images.json b/lexicons/app/bsky/embed/images.json new file mode 100644 index 0000000..2d9bc52 --- /dev/null +++ b/lexicons/app/bsky/embed/images.json @@ -0,0 +1,91 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.images", + "description": "A set of images embedded in a Bluesky record (eg, a post).", + "defs": { + "main": { + "type": "object", + "required": [ + "images" + ], + "properties": { + "images": { + "type": "array", + "items": { + "ref": "#image", + "type": "ref" + }, + "maxLength": 4 + } + } + }, + "view": { + "type": "object", + "required": [ + "images" + ], + "properties": { + "images": { + "type": "array", + "items": { + "ref": "#viewImage", + "type": "ref" + }, + "maxLength": 4 + } + } + }, + "image": { + "type": "object", + "required": [ + "image", + "alt" + ], + "properties": { + "alt": { + "type": "string", + "description": "Alt text description of the image, for accessibility." + }, + "image": { + "type": "blob", + "accept": [ + "image/*" + ], + "maxSize": 1000000 + }, + "aspectRatio": { + "ref": "app.bsky.embed.defs#aspectRatio", + "type": "ref" + } + } + }, + "viewImage": { + "type": "object", + "required": [ + "thumb", + "fullsize", + "alt" + ], + "properties": { + "alt": { + "type": "string", + "description": "Alt text description of the image, for accessibility." + }, + "thumb": { + "type": "string", + "format": "uri", + "description": "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View." + }, + "fullsize": { + "type": "string", + "format": "uri", + "description": "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View." + }, + "aspectRatio": { + "ref": "app.bsky.embed.defs#aspectRatio", + "type": "ref" + } + } + } + } +} \ No newline at end of file diff --git a/lexicons/app/bsky/embed/record.json b/lexicons/app/bsky/embed/record.json new file mode 100644 index 0000000..713e5dd --- /dev/null +++ b/lexicons/app/bsky/embed/record.json @@ -0,0 +1,160 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.record", + "description": "A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.", + "defs": { + "main": { + "type": "object", + "required": [ + "record" + ], + "properties": { + "record": { + "ref": "com.atproto.repo.strongRef", + "type": "ref" + } + } + }, + "view": { + "type": "object", + "required": [ + "record" + ], + "properties": { + "record": { + "refs": [ + "#viewRecord", + "#viewNotFound", + "#viewBlocked", + "#viewDetached", + "app.bsky.feed.defs#generatorView", + "app.bsky.graph.defs#listView", + "app.bsky.labeler.defs#labelerView", + "app.bsky.graph.defs#starterPackViewBasic" + ], + "type": "union" + } + } + }, + "viewRecord": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "value", + "indexedAt" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, + "value": { + "type": "unknown", + "description": "The record data itself." + }, + "author": { + "ref": "app.bsky.actor.defs#profileViewBasic", + "type": "ref" + }, + "embeds": { + "type": "array", + "items": { + "refs": [ + "app.bsky.embed.images#view", + "app.bsky.embed.video#view", + "app.bsky.embed.external#view", + "app.bsky.embed.record#view", + "app.bsky.embed.recordWithMedia#view" + ], + "type": "union" + } + }, + "labels": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#label", + "type": "ref" + } + }, + "indexedAt": { + "type": "string", + "format": "datetime" + }, + "likeCount": { + "type": "integer" + }, + "quoteCount": { + "type": "integer" + }, + "replyCount": { + "type": "integer" + }, + "repostCount": { + "type": "integer" + } + } + }, + "viewBlocked": { + "type": "object", + "required": [ + "uri", + "blocked", + "author" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "author": { + "ref": "app.bsky.feed.defs#blockedAuthor", + "type": "ref" + }, + "blocked": { + "type": "boolean", + "const": true + } + } + }, + "viewDetached": { + "type": "object", + "required": [ + "uri", + "detached" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "detached": { + "type": "boolean", + "const": true + } + } + }, + "viewNotFound": { + "type": "object", + "required": [ + "uri", + "notFound" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "notFound": { + "type": "boolean", + "const": true + } + } + } + } +} \ No newline at end of file diff --git a/lexicons/app/bsky/embed/recordWithMedia.json b/lexicons/app/bsky/embed/recordWithMedia.json new file mode 100644 index 0000000..4a06d84 --- /dev/null +++ b/lexicons/app/bsky/embed/recordWithMedia.json @@ -0,0 +1,49 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.recordWithMedia", + "description": "A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.", + "defs": { + "main": { + "type": "object", + "required": [ + "record", + "media" + ], + "properties": { + "media": { + "refs": [ + "app.bsky.embed.images", + "app.bsky.embed.video", + "app.bsky.embed.external" + ], + "type": "union" + }, + "record": { + "ref": "app.bsky.embed.record", + "type": "ref" + } + } + }, + "view": { + "type": "object", + "required": [ + "record", + "media" + ], + "properties": { + "media": { + "refs": [ + "app.bsky.embed.images#view", + "app.bsky.embed.video#view", + "app.bsky.embed.external#view" + ], + "type": "union" + }, + "record": { + "ref": "app.bsky.embed.record#view", + "type": "ref" + } + } + } + } +} \ No newline at end of file diff --git a/lexicons/app/bsky/embed/video.json b/lexicons/app/bsky/embed/video.json new file mode 100644 index 0000000..675a020 --- /dev/null +++ b/lexicons/app/bsky/embed/video.json @@ -0,0 +1,90 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.video", + "description": "A video embedded in a Bluesky record (eg, a post).", + "defs": { + "main": { + "type": "object", + "required": [ + "video" + ], + "properties": { + "alt": { + "type": "string", + "maxLength": 10000, + "description": "Alt text description of the video, for accessibility.", + "maxGraphemes": 1000 + }, + "video": { + "type": "blob", + "accept": [ + "video/mp4" + ], + "maxSize": 50000000 + }, + "captions": { + "type": "array", + "items": { + "ref": "#caption", + "type": "ref" + }, + "maxLength": 20 + }, + "aspectRatio": { + "ref": "app.bsky.embed.defs#aspectRatio", + "type": "ref" + } + } + }, + "view": { + "type": "object", + "required": [ + "cid", + "playlist" + ], + "properties": { + "alt": { + "type": "string", + "maxLength": 10000, + "maxGraphemes": 1000 + }, + "cid": { + "type": "string", + "format": "cid" + }, + "playlist": { + "type": "string", + "format": "uri" + }, + "thumbnail": { + "type": "string", + "format": "uri" + }, + "aspectRatio": { + "ref": "app.bsky.embed.defs#aspectRatio", + "type": "ref" + } + } + }, + "caption": { + "type": "object", + "required": [ + "lang", + "file" + ], + "properties": { + "file": { + "type": "blob", + "accept": [ + "text/vtt" + ], + "maxSize": 20000 + }, + "lang": { + "type": "string", + "format": "language" + } + } + } + } +} \ No newline at end of file diff --git a/lexicons/app/bsky/feed/defs.json b/lexicons/app/bsky/feed/defs.json new file mode 100644 index 0000000..2f8aab7 --- /dev/null +++ b/lexicons/app/bsky/feed/defs.json @@ -0,0 +1,515 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.defs", + "defs": { + "postView": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "record", + "indexedAt" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, + "embed": { + "refs": [ + "app.bsky.embed.images#view", + "app.bsky.embed.video#view", + "app.bsky.embed.external#view", + "app.bsky.embed.record#view", + "app.bsky.embed.recordWithMedia#view" + ], + "type": "union" + }, + "author": { + "ref": "app.bsky.actor.defs#profileViewBasic", + "type": "ref" + }, + "labels": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#label", + "type": "ref" + } + }, + "record": { + "type": "unknown" + }, + "viewer": { + "ref": "#viewerState", + "type": "ref" + }, + "indexedAt": { + "type": "string", + "format": "datetime" + }, + "likeCount": { + "type": "integer" + }, + "quoteCount": { + "type": "integer" + }, + "replyCount": { + "type": "integer" + }, + "threadgate": { + "ref": "#threadgateView", + "type": "ref" + }, + "repostCount": { + "type": "integer" + } + } + }, + "replyRef": { + "type": "object", + "required": [ + "root", + "parent" + ], + "properties": { + "root": { + "refs": [ + "#postView", + "#notFoundPost", + "#blockedPost" + ], + "type": "union" + }, + "parent": { + "refs": [ + "#postView", + "#notFoundPost", + "#blockedPost" + ], + "type": "union" + }, + "grandparentAuthor": { + "ref": "app.bsky.actor.defs#profileViewBasic", + "type": "ref", + "description": "When parent is a reply to another post, this is the author of that post." + } + } + }, + "reasonPin": { + "type": "object", + "properties": {} + }, + "blockedPost": { + "type": "object", + "required": [ + "uri", + "blocked", + "author" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "author": { + "ref": "#blockedAuthor", + "type": "ref" + }, + "blocked": { + "type": "boolean", + "const": true + } + } + }, + "interaction": { + "type": "object", + "properties": { + "item": { + "type": "string", + "format": "at-uri" + }, + "event": { + "type": "string", + "knownValues": [ + "app.bsky.feed.defs#requestLess", + "app.bsky.feed.defs#requestMore", + "app.bsky.feed.defs#clickthroughItem", + "app.bsky.feed.defs#clickthroughAuthor", + "app.bsky.feed.defs#clickthroughReposter", + "app.bsky.feed.defs#clickthroughEmbed", + "app.bsky.feed.defs#interactionSeen", + "app.bsky.feed.defs#interactionLike", + "app.bsky.feed.defs#interactionRepost", + "app.bsky.feed.defs#interactionReply", + "app.bsky.feed.defs#interactionQuote", + "app.bsky.feed.defs#interactionShare" + ] + }, + "feedContext": { + "type": "string", + "maxLength": 2000, + "description": "Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton." + } + } + }, + "requestLess": { + "type": "token", + "description": "Request that less content like the given feed item be shown in the feed" + }, + "requestMore": { + "type": "token", + "description": "Request that more content like the given feed item be shown in the feed" + }, + "viewerState": { + "type": "object", + "properties": { + "like": { + "type": "string", + "format": "at-uri" + }, + "pinned": { + "type": "boolean" + }, + "repost": { + "type": "string", + "format": "at-uri" + }, + "threadMuted": { + "type": "boolean" + }, + "replyDisabled": { + "type": "boolean" + }, + "embeddingDisabled": { + "type": "boolean" + } + }, + "description": "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests." + }, + "feedViewPost": { + "type": "object", + "required": [ + "post" + ], + "properties": { + "post": { + "ref": "#postView", + "type": "ref" + }, + "reply": { + "ref": "#replyRef", + "type": "ref" + }, + "reason": { + "refs": [ + "#reasonRepost", + "#reasonPin" + ], + "type": "union" + }, + "feedContext": { + "type": "string", + "maxLength": 2000, + "description": "Context provided by feed generator that may be passed back alongside interactions." + } + } + }, + "notFoundPost": { + "type": "object", + "required": [ + "uri", + "notFound" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "notFound": { + "type": "boolean", + "const": true + } + } + }, + "reasonRepost": { + "type": "object", + "required": [ + "by", + "indexedAt" + ], + "properties": { + "by": { + "ref": "app.bsky.actor.defs#profileViewBasic", + "type": "ref" + }, + "indexedAt": { + "type": "string", + "format": "datetime" + } + } + }, + "blockedAuthor": { + "type": "object", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "viewer": { + "ref": "app.bsky.actor.defs#viewerState", + "type": "ref" + } + } + }, + "generatorView": { + "type": "object", + "required": [ + "uri", + "cid", + "did", + "creator", + "displayName", + "indexedAt" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "did": { + "type": "string", + "format": "did" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, + "avatar": { + "type": "string", + "format": "uri" + }, + "labels": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#label", + "type": "ref" + } + }, + "viewer": { + "ref": "#generatorViewerState", + "type": "ref" + }, + "creator": { + "ref": "app.bsky.actor.defs#profileView", + "type": "ref" + }, + "indexedAt": { + "type": "string", + "format": "datetime" + }, + "likeCount": { + "type": "integer", + "minimum": 0 + }, + "contentMode": { + "type": "string", + "knownValues": [ + "app.bsky.feed.defs#contentModeUnspecified", + "app.bsky.feed.defs#contentModeVideo" + ] + }, + "description": { + "type": "string", + "maxLength": 3000, + "maxGraphemes": 300 + }, + "displayName": { + "type": "string" + }, + "descriptionFacets": { + "type": "array", + "items": { + "ref": "app.bsky.richtext.facet", + "type": "ref" + } + }, + "acceptsInteractions": { + "type": "boolean" + } + } + }, + "threadContext": { + "type": "object", + "properties": { + "rootAuthorLike": { + "type": "string", + "format": "at-uri" + } + }, + "description": "Metadata about this post within the context of the thread it is in." + }, + "threadViewPost": { + "type": "object", + "required": [ + "post" + ], + "properties": { + "post": { + "ref": "#postView", + "type": "ref" + }, + "parent": { + "refs": [ + "#threadViewPost", + "#notFoundPost", + "#blockedPost" + ], + "type": "union" + }, + "replies": { + "type": "array", + "items": { + "refs": [ + "#threadViewPost", + "#notFoundPost", + "#blockedPost" + ], + "type": "union" + } + }, + "threadContext": { + "ref": "#threadContext", + "type": "ref" + } + } + }, + "threadgateView": { + "type": "object", + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, + "lists": { + "type": "array", + "items": { + "ref": "app.bsky.graph.defs#listViewBasic", + "type": "ref" + } + }, + "record": { + "type": "unknown" + } + } + }, + "interactionLike": { + "type": "token", + "description": "User liked the feed item" + }, + "interactionSeen": { + "type": "token", + "description": "Feed item was seen by user" + }, + "clickthroughItem": { + "type": "token", + "description": "User clicked through to the feed item" + }, + "contentModeVideo": { + "type": "token", + "description": "Declares the feed generator returns posts containing app.bsky.embed.video embeds." + }, + "interactionQuote": { + "type": "token", + "description": "User quoted the feed item" + }, + "interactionReply": { + "type": "token", + "description": "User replied to the feed item" + }, + "interactionShare": { + "type": "token", + "description": "User shared the feed item" + }, + "skeletonFeedPost": { + "type": "object", + "required": [ + "post" + ], + "properties": { + "post": { + "type": "string", + "format": "at-uri" + }, + "reason": { + "refs": [ + "#skeletonReasonRepost", + "#skeletonReasonPin" + ], + "type": "union" + }, + "feedContext": { + "type": "string", + "maxLength": 2000, + "description": "Context that will be passed through to client and may be passed to feed generator back alongside interactions." + } + } + }, + "clickthroughEmbed": { + "type": "token", + "description": "User clicked through to the embedded content of the feed item" + }, + "interactionRepost": { + "type": "token", + "description": "User reposted the feed item" + }, + "skeletonReasonPin": { + "type": "object", + "properties": {} + }, + "clickthroughAuthor": { + "type": "token", + "description": "User clicked through to the author of the feed item" + }, + "clickthroughReposter": { + "type": "token", + "description": "User clicked through to the reposter of the feed item" + }, + "generatorViewerState": { + "type": "object", + "properties": { + "like": { + "type": "string", + "format": "at-uri" + } + } + }, + "skeletonReasonRepost": { + "type": "object", + "required": [ + "repost" + ], + "properties": { + "repost": { + "type": "string", + "format": "at-uri" + } + } + }, + "contentModeUnspecified": { + "type": "token", + "description": "Declares the feed generator returns any types of posts." + } + } +} \ No newline at end of file diff --git a/lexicons/app/bsky/feed/postgate.json b/lexicons/app/bsky/feed/postgate.json new file mode 100644 index 0000000..e9ff60a --- /dev/null +++ b/lexicons/app/bsky/feed/postgate.json @@ -0,0 +1,54 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.postgate", + "defs": { + "main": { + "key": "tid", + "type": "record", + "record": { + "type": "object", + "required": [ + "post", + "createdAt" + ], + "properties": { + "post": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the post record." + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "embeddingRules": { + "type": "array", + "items": { + "refs": [ + "#disableRule" + ], + "type": "union" + }, + "maxLength": 5, + "description": "List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed." + }, + "detachedEmbeddingUris": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + }, + "maxLength": 50, + "description": "List of AT-URIs embedding this post that the author has detached from." + } + } + }, + "description": "Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository." + }, + "disableRule": { + "type": "object", + "properties": {}, + "description": "Disables embedding of this post." + } + } +} \ No newline at end of file diff --git a/lexicons/app/bsky/feed/threadgate.json b/lexicons/app/bsky/feed/threadgate.json new file mode 100644 index 0000000..99eba88 --- /dev/null +++ b/lexicons/app/bsky/feed/threadgate.json @@ -0,0 +1,80 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.threadgate", + "defs": { + "main": { + "key": "tid", + "type": "record", + "record": { + "type": "object", + "required": [ + "post", + "createdAt" + ], + "properties": { + "post": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the post record." + }, + "allow": { + "type": "array", + "items": { + "refs": [ + "#mentionRule", + "#followerRule", + "#followingRule", + "#listRule" + ], + "type": "union" + }, + "maxLength": 5, + "description": "List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply." + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "hiddenReplies": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + }, + "maxLength": 50, + "description": "List of hidden reply URIs." + } + } + }, + "description": "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository." + }, + "listRule": { + "type": "object", + "required": [ + "list" + ], + "properties": { + "list": { + "type": "string", + "format": "at-uri" + } + }, + "description": "Allow replies from actors on a list." + }, + "mentionRule": { + "type": "object", + "properties": {}, + "description": "Allow replies from actors mentioned in your post." + }, + "followerRule": { + "type": "object", + "properties": {}, + "description": "Allow replies from actors who follow you." + }, + "followingRule": { + "type": "object", + "properties": {}, + "description": "Allow replies from actors you follow." + } + } +} \ No newline at end of file diff --git a/lexicons/app/bsky/graph/defs.json b/lexicons/app/bsky/graph/defs.json new file mode 100644 index 0000000..d72069c --- /dev/null +++ b/lexicons/app/bsky/graph/defs.json @@ -0,0 +1,332 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.defs", + "defs": { + "modlist": { + "type": "token", + "description": "A list of actors to apply an aggregate moderation action (mute/block) on." + }, + "listView": { + "type": "object", + "required": [ + "uri", + "cid", + "creator", + "name", + "purpose", + "indexedAt" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1 + }, + "avatar": { + "type": "string", + "format": "uri" + }, + "labels": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#label", + "type": "ref" + } + }, + "viewer": { + "ref": "#listViewerState", + "type": "ref" + }, + "creator": { + "ref": "app.bsky.actor.defs#profileView", + "type": "ref" + }, + "purpose": { + "ref": "#listPurpose", + "type": "ref" + }, + "indexedAt": { + "type": "string", + "format": "datetime" + }, + "description": { + "type": "string", + "maxLength": 3000, + "maxGraphemes": 300 + }, + "listItemCount": { + "type": "integer", + "minimum": 0 + }, + "descriptionFacets": { + "type": "array", + "items": { + "ref": "app.bsky.richtext.facet", + "type": "ref" + } + } + } + }, + "curatelist": { + "type": "token", + "description": "A list of actors used for curation purposes such as list feeds or interaction gating." + }, + "listPurpose": { + "type": "string", + "knownValues": [ + "app.bsky.graph.defs#modlist", + "app.bsky.graph.defs#curatelist", + "app.bsky.graph.defs#referencelist" + ] + }, + "listItemView": { + "type": "object", + "required": [ + "uri", + "subject" + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri" + }, + "subject": { + "ref": "app.bsky.actor.defs#profileView", + "type": "ref" + } + } + }, + "relationship": { + "type": "object", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "following": { + "type": "string", + "format": "at-uri", + "description": "if the actor follows this DID, this is the AT-URI of the follow record" + }, + "followedBy": { + "type": "string", + "format": "at-uri", + "description": "if the actor is followed by this DID, contains the AT-URI of the follow record" + } + }, + "description": "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)" + }, + "listViewBasic": { + "type": "object", + "required": [ + "uri", + "cid", + "name", + "purpose" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1 + }, + "avatar": { + "type": "string", + "format": "uri" + }, + "labels": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#label", + "type": "ref" + } + }, + "viewer": { + "ref": "#listViewerState", + "type": "ref" + }, + "purpose": { + "ref": "#listPurpose", + "type": "ref" + }, + "indexedAt": { + "type": "string", + "format": "datetime" + }, + "listItemCount": { + "type": "integer", + "minimum": 0 + } + } + }, + "notFoundActor": { + "type": "object", + "required": [ + "actor", + "notFound" + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier" + }, + "notFound": { + "type": "boolean", + "const": true + } + }, + "description": "indicates that a handle or DID could not be resolved" + }, + "referencelist": { + "type": "token", + "description": "A list of actors used for only for reference purposes such as within a starter pack." + }, + "listViewerState": { + "type": "object", + "properties": { + "muted": { + "type": "boolean" + }, + "blocked": { + "type": "string", + "format": "at-uri" + } + } + }, + "starterPackView": { + "type": "object", + "required": [ + "uri", + "cid", + "record", + "creator", + "indexedAt" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, + "list": { + "ref": "#listViewBasic", + "type": "ref" + }, + "feeds": { + "type": "array", + "items": { + "ref": "app.bsky.feed.defs#generatorView", + "type": "ref" + }, + "maxLength": 3 + }, + "labels": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#label", + "type": "ref" + } + }, + "record": { + "type": "unknown" + }, + "creator": { + "ref": "app.bsky.actor.defs#profileViewBasic", + "type": "ref" + }, + "indexedAt": { + "type": "string", + "format": "datetime" + }, + "joinedWeekCount": { + "type": "integer", + "minimum": 0 + }, + "listItemsSample": { + "type": "array", + "items": { + "ref": "#listItemView", + "type": "ref" + }, + "maxLength": 12 + }, + "joinedAllTimeCount": { + "type": "integer", + "minimum": 0 + } + } + }, + "starterPackViewBasic": { + "type": "object", + "required": [ + "uri", + "cid", + "record", + "creator", + "indexedAt" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, + "labels": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#label", + "type": "ref" + } + }, + "record": { + "type": "unknown" + }, + "creator": { + "ref": "app.bsky.actor.defs#profileViewBasic", + "type": "ref" + }, + "indexedAt": { + "type": "string", + "format": "datetime" + }, + "listItemCount": { + "type": "integer", + "minimum": 0 + }, + "joinedWeekCount": { + "type": "integer", + "minimum": 0 + }, + "joinedAllTimeCount": { + "type": "integer", + "minimum": 0 + } + } + } + } +} \ No newline at end of file diff --git a/lexicons/app/bsky/labeler/defs.json b/lexicons/app/bsky/labeler/defs.json new file mode 100644 index 0000000..36ea462 --- /dev/null +++ b/lexicons/app/bsky/labeler/defs.json @@ -0,0 +1,128 @@ +{ + "lexicon": 1, + "id": "app.bsky.labeler.defs", + "defs": { + "labelerView": { + "type": "object", + "required": [ + "uri", + "cid", + "creator", + "indexedAt" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, + "labels": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#label", + "type": "ref" + } + }, + "viewer": { + "ref": "#labelerViewerState", + "type": "ref" + }, + "creator": { + "ref": "app.bsky.actor.defs#profileView", + "type": "ref" + }, + "indexedAt": { + "type": "string", + "format": "datetime" + }, + "likeCount": { + "type": "integer", + "minimum": 0 + } + } + }, + "labelerPolicies": { + "type": "object", + "required": [ + "labelValues" + ], + "properties": { + "labelValues": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#labelValue", + "type": "ref" + }, + "description": "The label values which this labeler publishes. May include global or custom labels." + }, + "labelValueDefinitions": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#labelValueDefinition", + "type": "ref" + }, + "description": "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler." + } + } + }, + "labelerViewerState": { + "type": "object", + "properties": { + "like": { + "type": "string", + "format": "at-uri" + } + } + }, + "labelerViewDetailed": { + "type": "object", + "required": [ + "uri", + "cid", + "creator", + "policies", + "indexedAt" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, + "labels": { + "type": "array", + "items": { + "ref": "com.atproto.label.defs#label", + "type": "ref" + } + }, + "viewer": { + "ref": "#labelerViewerState", + "type": "ref" + }, + "creator": { + "ref": "app.bsky.actor.defs#profileView", + "type": "ref" + }, + "policies": { + "ref": "app.bsky.labeler.defs#labelerPolicies", + "type": "ref" + }, + "indexedAt": { + "type": "string", + "format": "datetime" + }, + "likeCount": { + "type": "integer", + "minimum": 0 + } + } + } + } +} \ No newline at end of file diff --git a/lexicons/app/bsky/richtext/facet.json b/lexicons/app/bsky/richtext/facet.json new file mode 100644 index 0000000..6a8ca31 --- /dev/null +++ b/lexicons/app/bsky/richtext/facet.json @@ -0,0 +1,89 @@ +{ + "lexicon": 1, + "id": "app.bsky.richtext.facet", + "defs": { + "tag": { + "type": "object", + "required": [ + "tag" + ], + "properties": { + "tag": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64 + } + }, + "description": "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags')." + }, + "link": { + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "format": "uri" + } + }, + "description": "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL." + }, + "main": { + "type": "object", + "required": [ + "index", + "features" + ], + "properties": { + "index": { + "ref": "#byteSlice", + "type": "ref" + }, + "features": { + "type": "array", + "items": { + "refs": [ + "#mention", + "#link", + "#tag" + ], + "type": "union" + } + } + }, + "description": "Annotation of a sub-string within rich text." + }, + "mention": { + "type": "object", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + } + }, + "description": "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID." + }, + "byteSlice": { + "type": "object", + "required": [ + "byteStart", + "byteEnd" + ], + "properties": { + "byteEnd": { + "type": "integer", + "minimum": 0 + }, + "byteStart": { + "type": "integer", + "minimum": 0 + } + }, + "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets." + } + } +} \ No newline at end of file diff --git a/lexicons/com/atproto/label/defs.json b/lexicons/com/atproto/label/defs.json index 6f4c1ab..b355113 100644 --- a/lexicons/com/atproto/label/defs.json +++ b/lexicons/com/atproto/label/defs.json @@ -4,37 +4,18 @@ "defs": { "label": { "type": "object", - "description": "Metadata tag on an atproto resource (eg, repo or record).", - "required": ["src", "uri", "val", "cts"], + "required": [ + "src", + "uri", + "val", + "cts" + ], "properties": { - "ver": { - "type": "integer", - "description": "The AT Protocol version of the label object." - }, - "src": { - "type": "string", - "format": "did", - "description": "DID of the actor who created this label." - }, - "uri": { - "type": "string", - "format": "uri", - "description": "AT URI of the record, repository (account), or other resource that this label applies to." - }, "cid": { "type": "string", "format": "cid", "description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to." }, - "val": { - "type": "string", - "maxLength": 128, - "description": "The short string name of the value or type of this label." - }, - "neg": { - "type": "boolean", - "description": "If true, this is a negation label, overwriting a previous label." - }, "cts": { "type": "string", "format": "datetime", @@ -45,112 +26,167 @@ "format": "datetime", "description": "Timestamp at which this label expires (no longer applies)." }, + "neg": { + "type": "boolean", + "description": "If true, this is a negation label, overwriting a previous label." + }, "sig": { "type": "bytes", "description": "Signature of dag-cbor encoded label." + }, + "src": { + "type": "string", + "format": "did", + "description": "DID of the actor who created this label." + }, + "uri": { + "type": "string", + "format": "uri", + "description": "AT URI of the record, repository (account), or other resource that this label applies to." + }, + "val": { + "type": "string", + "maxLength": 128, + "description": "The short string name of the value or type of this label." + }, + "ver": { + "type": "integer", + "description": "The AT Protocol version of the label object." } - } - }, - "selfLabels": { - "type": "object", - "description": "Metadata tags on an atproto record, published by the author within the record.", - "required": ["values"], - "properties": { - "values": { - "type": "array", - "items": { "type": "ref", "ref": "#selfLabel" }, - "maxLength": 10 - } - } + }, + "description": "Metadata tag on an atproto resource (eg, repo or record)." }, "selfLabel": { "type": "object", - "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.", - "required": ["val"], + "required": [ + "val" + ], "properties": { "val": { "type": "string", "maxLength": 128, "description": "The short string name of the value or type of this label." } - } + }, + "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel." + }, + "labelValue": { + "type": "string", + "knownValues": [ + "!hide", + "!no-promote", + "!warn", + "!no-unauthenticated", + "dmca-violation", + "doxxing", + "porn", + "sexual", + "nudity", + "nsfl", + "gore" + ] + }, + "selfLabels": { + "type": "object", + "required": [ + "values" + ], + "properties": { + "values": { + "type": "array", + "items": { + "ref": "#selfLabel", + "type": "ref" + }, + "maxLength": 10 + } + }, + "description": "Metadata tags on an atproto record, published by the author within the record." }, "labelValueDefinition": { "type": "object", - "description": "Declares a label value and its expected interpretations and behaviors.", - "required": ["identifier", "severity", "blurs", "locales"], + "required": [ + "identifier", + "severity", + "blurs", + "locales" + ], "properties": { - "identifier": { + "blurs": { "type": "string", - "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).", - "maxLength": 100, - "maxGraphemes": 100 + "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" + ] + }, + "locales": { + "type": "array", + "items": { + "ref": "#labelValueDefinitionStrings", + "type": "ref" + } }, "severity": { "type": "string", "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"] + "knownValues": [ + "inform", + "alert", + "none" + ] }, - "blurs": { + "adultOnly": { + "type": "boolean", + "description": "Does the user need to have adult content enabled in order to configure this label?" + }, + "identifier": { "type": "string", - "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"] + "maxLength": 100, + "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).", + "maxGraphemes": 100 }, "defaultSetting": { "type": "string", + "default": "warn", "description": "The default setting for this label.", - "knownValues": ["ignore", "warn", "hide"], - "default": "warn" - }, - "adultOnly": { - "type": "boolean", - "description": "Does the user need to have adult content enabled in order to configure this label?" - }, - "locales": { - "type": "array", - "items": { "type": "ref", "ref": "#labelValueDefinitionStrings" } + "knownValues": [ + "ignore", + "warn", + "hide" + ] } - } + }, + "description": "Declares a label value and its expected interpretations and behaviors." }, "labelValueDefinitionStrings": { "type": "object", - "description": "Strings which describe the label in the UI, localized into a specific language.", - "required": ["lang", "name", "description"], + "required": [ + "lang", + "name", + "description" + ], "properties": { "lang": { "type": "string", - "description": "The code of the language these strings are written in.", - "format": "language" + "format": "language", + "description": "The code of the language these strings are written in." }, "name": { "type": "string", + "maxLength": 640, "description": "A short human-readable name for the label.", - "maxGraphemes": 64, - "maxLength": 640 + "maxGraphemes": 64 }, "description": { "type": "string", + "maxLength": 100000, "description": "A longer description of what the label means and why it might be applied.", - "maxGraphemes": 10000, - "maxLength": 100000 + "maxGraphemes": 10000 } - } - }, - "labelValue": { - "type": "string", - "knownValues": [ - "!hide", - "!no-promote", - "!warn", - "!no-unauthenticated", - "dmca-violation", - "doxxing", - "porn", - "sexual", - "nudity", - "nsfl", - "gore" - ] + }, + "description": "Strings which describe the label in the UI, localized into a specific language." } } -} +} \ No newline at end of file diff --git a/lexicons/com/atproto/repo/applyWrites.json b/lexicons/com/atproto/repo/applyWrites.json index 11a1f1f..8b9334a 100644 --- a/lexicons/com/atproto/repo/applyWrites.json +++ b/lexicons/com/atproto/repo/applyWrites.json @@ -4,128 +4,192 @@ "defs": { "main": { "type": "procedure", - "description": "Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.", "input": { - "encoding": "application/json", "schema": { "type": "object", - "required": ["repo", "writes"], + "required": [ + "repo", + "writes" + ], "properties": { "repo": { "type": "string", "format": "at-identifier", "description": "The handle or DID of the repo (aka, current account)." }, - "validate": { - "type": "boolean", - "description": "Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons." - }, "writes": { "type": "array", "items": { + "refs": [ + "#create", + "#update", + "#delete" + ], "type": "union", - "refs": ["#create", "#update", "#delete"], "closed": true } }, + "validate": { + "type": "boolean", + "description": "Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons." + }, "swapCommit": { "type": "string", - "description": "If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.", - "format": "cid" + "format": "cid", + "description": "If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations." } } - } + }, + "encoding": "application/json" }, + "errors": [ + { + "name": "InvalidSwap", + "description": "Indicates that the 'swapCommit' parameter did not match current commit." + } + ], "output": { - "encoding": "application/json", "schema": { "type": "object", "required": [], "properties": { "commit": { - "type": "ref", - "ref": "com.atproto.repo.defs#commitMeta" + "ref": "com.atproto.repo.defs#commitMeta", + "type": "ref" }, "results": { "type": "array", "items": { + "refs": [ + "#createResult", + "#updateResult", + "#deleteResult" + ], "type": "union", - "refs": ["#createResult", "#updateResult", "#deleteResult"], "closed": true } } } - } + }, + "encoding": "application/json" }, - "errors": [ - { - "name": "InvalidSwap", - "description": "Indicates that the 'swapCommit' parameter did not match current commit." - } - ] + "description": "Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS." }, "create": { "type": "object", - "description": "Operation which creates a new record.", - "required": ["collection", "value"], + "required": [ + "collection", + "value" + ], "properties": { - "collection": { "type": "string", "format": "nsid" }, "rkey": { "type": "string", - "maxLength": 512, "format": "record-key", + "maxLength": 512, "description": "NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility." }, - "value": { "type": "unknown" } - } + "value": { + "type": "unknown" + }, + "collection": { + "type": "string", + "format": "nsid" + } + }, + "description": "Operation which creates a new record." }, - "update": { + "delete": { "type": "object", - "description": "Operation which updates an existing record.", - "required": ["collection", "rkey", "value"], + "required": [ + "collection", + "rkey" + ], "properties": { - "collection": { "type": "string", "format": "nsid" }, - "rkey": { "type": "string", "format": "record-key" }, - "value": { "type": "unknown" } - } + "rkey": { + "type": "string", + "format": "record-key" + }, + "collection": { + "type": "string", + "format": "nsid" + } + }, + "description": "Operation which deletes an existing record." }, - "delete": { + "update": { "type": "object", - "description": "Operation which deletes an existing record.", - "required": ["collection", "rkey"], + "required": [ + "collection", + "rkey", + "value" + ], "properties": { - "collection": { "type": "string", "format": "nsid" }, - "rkey": { "type": "string", "format": "record-key" } - } + "rkey": { + "type": "string", + "format": "record-key" + }, + "value": { + "type": "unknown" + }, + "collection": { + "type": "string", + "format": "nsid" + } + }, + "description": "Operation which updates an existing record." }, "createResult": { "type": "object", - "required": ["uri", "cid"], + "required": [ + "uri", + "cid" + ], "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, "validationStatus": { "type": "string", - "knownValues": ["valid", "unknown"] + "knownValues": [ + "valid", + "unknown" + ] } } }, + "deleteResult": { + "type": "object", + "required": [], + "properties": {} + }, "updateResult": { "type": "object", - "required": ["uri", "cid"], + "required": [ + "uri", + "cid" + ], "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, "validationStatus": { "type": "string", - "knownValues": ["valid", "unknown"] + "knownValues": [ + "valid", + "unknown" + ] } } - }, - "deleteResult": { - "type": "object", - "required": [], - "properties": {} } } -} +} \ No newline at end of file diff --git a/lexicons/com/atproto/repo/createRecord.json b/lexicons/com/atproto/repo/createRecord.json index de5f408..9b5e1de 100644 --- a/lexicons/com/atproto/repo/createRecord.json +++ b/lexicons/com/atproto/repo/createRecord.json @@ -4,36 +4,38 @@ "defs": { "main": { "type": "procedure", - "description": "Create a single new repository record. Requires auth, implemented by PDS.", "input": { - "encoding": "application/json", "schema": { "type": "object", - "required": ["repo", "collection", "record"], + "required": [ + "repo", + "collection", + "record" + ], "properties": { "repo": { "type": "string", "format": "at-identifier", "description": "The handle or DID of the repo (aka, current account)." }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record collection." - }, "rkey": { "type": "string", "format": "record-key", - "description": "The Record Key.", - "maxLength": 512 + "maxLength": 512, + "description": "The Record Key." + }, + "record": { + "type": "unknown", + "description": "The record itself. Must contain a $type field." }, "validate": { "type": "boolean", "description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons." }, - "record": { - "type": "unknown", - "description": "The record itself. Must contain a $type field." + "collection": { + "type": "string", + "format": "nsid", + "description": "The NSID of the record collection." }, "swapCommit": { "type": "string", @@ -41,33 +43,47 @@ "description": "Compare and swap with the previous commit by CID." } } - } + }, + "encoding": "application/json" }, + "errors": [ + { + "name": "InvalidSwap", + "description": "Indicates that 'swapCommit' didn't match current repo commit." + } + ], "output": { - "encoding": "application/json", "schema": { "type": "object", - "required": ["uri", "cid"], + "required": [ + "uri", + "cid" + ], "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, "commit": { - "type": "ref", - "ref": "com.atproto.repo.defs#commitMeta" + "ref": "com.atproto.repo.defs#commitMeta", + "type": "ref" }, "validationStatus": { "type": "string", - "knownValues": ["valid", "unknown"] + "knownValues": [ + "valid", + "unknown" + ] } } - } + }, + "encoding": "application/json" }, - "errors": [ - { - "name": "InvalidSwap", - "description": "Indicates that 'swapCommit' didn't match current repo commit." - } - ] + "description": "Create a single new repository record. Requires auth, implemented by PDS." } } -} +} \ No newline at end of file diff --git a/lexicons/com/atproto/repo/defs.json b/lexicons/com/atproto/repo/defs.json index 8752599..407e84a 100644 --- a/lexicons/com/atproto/repo/defs.json +++ b/lexicons/com/atproto/repo/defs.json @@ -4,11 +4,20 @@ "defs": { "commitMeta": { "type": "object", - "required": ["cid", "rev"], + "required": [ + "cid", + "rev" + ], "properties": { - "cid": { "type": "string", "format": "cid" }, - "rev": { "type": "string", "format": "tid" } + "cid": { + "type": "string", + "format": "cid" + }, + "rev": { + "type": "string", + "format": "tid" + } } } } -} +} \ No newline at end of file diff --git a/lexicons/com/atproto/repo/deleteRecord.json b/lexicons/com/atproto/repo/deleteRecord.json index 9831da1..fce9135 100644 --- a/lexicons/com/atproto/repo/deleteRecord.json +++ b/lexicons/com/atproto/repo/deleteRecord.json @@ -4,54 +4,62 @@ "defs": { "main": { "type": "procedure", - "description": "Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.", "input": { - "encoding": "application/json", "schema": { "type": "object", - "required": ["repo", "collection", "rkey"], + "required": [ + "repo", + "collection", + "rkey" + ], "properties": { "repo": { "type": "string", "format": "at-identifier", "description": "The handle or DID of the repo (aka, current account)." }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record collection." - }, "rkey": { "type": "string", "format": "record-key", "description": "The Record Key." }, - "swapRecord": { + "collection": { "type": "string", - "format": "cid", - "description": "Compare and swap with the previous record by CID." + "format": "nsid", + "description": "The NSID of the record collection." }, "swapCommit": { "type": "string", "format": "cid", "description": "Compare and swap with the previous commit by CID." + }, + "swapRecord": { + "type": "string", + "format": "cid", + "description": "Compare and swap with the previous record by CID." } } - } + }, + "encoding": "application/json" }, + "errors": [ + { + "name": "InvalidSwap" + } + ], "output": { - "encoding": "application/json", "schema": { "type": "object", "properties": { "commit": { - "type": "ref", - "ref": "com.atproto.repo.defs#commitMeta" + "ref": "com.atproto.repo.defs#commitMeta", + "type": "ref" } } - } + }, + "encoding": "application/json" }, - "errors": [{ "name": "InvalidSwap" }] + "description": "Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS." } } -} +} \ No newline at end of file diff --git a/lexicons/com/atproto/repo/describeRepo.json b/lexicons/com/atproto/repo/describeRepo.json index b1ce2b6..0fb1343 100644 --- a/lexicons/com/atproto/repo/describeRepo.json +++ b/lexicons/com/atproto/repo/describeRepo.json @@ -4,20 +4,7 @@ "defs": { "main": { "type": "query", - "description": "Get information about an account and repository, including the list of collections. Does not require auth.", - "parameters": { - "type": "params", - "required": ["repo"], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": "The handle or DID of the repo." - } - } - }, "output": { - "encoding": "application/json", "schema": { "type": "object", "required": [ @@ -28,24 +15,48 @@ "handleIsCorrect" ], "properties": { - "handle": { "type": "string", "format": "handle" }, - "did": { "type": "string", "format": "did" }, + "did": { + "type": "string", + "format": "did" + }, "didDoc": { "type": "unknown", "description": "The complete DID document for this account." }, + "handle": { + "type": "string", + "format": "handle" + }, "collections": { "type": "array", - "description": "List of all the collections (NSIDs) for which this repo contains at least one record.", - "items": { "type": "string", "format": "nsid" } + "items": { + "type": "string", + "format": "nsid" + }, + "description": "List of all the collections (NSIDs) for which this repo contains at least one record." }, "handleIsCorrect": { "type": "boolean", "description": "Indicates if handle is currently valid (resolves bi-directionally)" } } + }, + "encoding": "application/json" + }, + "parameters": { + "type": "params", + "required": [ + "repo" + ], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo." + } } - } + }, + "description": "Get information about an account and repository, including the list of collections. Does not require auth." } } -} +} \ No newline at end of file diff --git a/lexicons/com/atproto/repo/getRecord.json b/lexicons/com/atproto/repo/getRecord.json index 388b9c5..f7a9ce1 100644 --- a/lexicons/com/atproto/repo/getRecord.json +++ b/lexicons/com/atproto/repo/getRecord.json @@ -4,46 +4,65 @@ "defs": { "main": { "type": "query", - "description": "Get a single record from a repository. Does not require auth.", + "errors": [ + { + "name": "RecordNotFound" + } + ], + "output": { + "schema": { + "type": "object", + "required": [ + "uri", + "value" + ], + "properties": { + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, + "value": { + "type": "unknown" + } + } + }, + "encoding": "application/json" + }, "parameters": { "type": "params", - "required": ["repo", "collection", "rkey"], + "required": [ + "repo", + "collection", + "rkey" + ], "properties": { + "cid": { + "type": "string", + "format": "cid", + "description": "The CID of the version of the record. If not specified, then return the most recent version." + }, "repo": { "type": "string", "format": "at-identifier", "description": "The handle or DID of the repo." }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record collection." - }, "rkey": { "type": "string", - "description": "The Record Key.", - "format": "record-key" + "format": "record-key", + "description": "The Record Key." }, - "cid": { + "collection": { "type": "string", - "format": "cid", - "description": "The CID of the version of the record. If not specified, then return the most recent version." - } - } - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["uri", "value"], - "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, - "value": { "type": "unknown" } + "format": "nsid", + "description": "The NSID of the record collection." } } }, - "errors": [{ "name": "RecordNotFound" }] + "description": "Get a single record from a repository. Does not require auth." } } -} +} \ No newline at end of file diff --git a/lexicons/com/atproto/repo/importRepo.json b/lexicons/com/atproto/repo/importRepo.json index fc850b1..4fed17f 100644 --- a/lexicons/com/atproto/repo/importRepo.json +++ b/lexicons/com/atproto/repo/importRepo.json @@ -4,10 +4,10 @@ "defs": { "main": { "type": "procedure", - "description": "Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.", "input": { "encoding": "application/vnd.ipld.car" - } + }, + "description": "Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set." } } -} +} \ No newline at end of file diff --git a/lexicons/com/atproto/repo/listMissingBlobs.json b/lexicons/com/atproto/repo/listMissingBlobs.json index c39913d..3dbca63 100644 --- a/lexicons/com/atproto/repo/listMissingBlobs.json +++ b/lexicons/com/atproto/repo/listMissingBlobs.json @@ -4,41 +4,59 @@ "defs": { "main": { "type": "query", - "description": "Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 1000, - "default": 500 - }, - "cursor": { "type": "string" } - } - }, "output": { - "encoding": "application/json", "schema": { "type": "object", - "required": ["blobs"], + "required": [ + "blobs" + ], "properties": { - "cursor": { "type": "string" }, "blobs": { "type": "array", - "items": { "type": "ref", "ref": "#recordBlob" } + "items": { + "ref": "#recordBlob", + "type": "ref" + } + }, + "cursor": { + "type": "string" } } + }, + "encoding": "application/json" + }, + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "default": 500, + "maximum": 1000, + "minimum": 1 + }, + "cursor": { + "type": "string" + } } - } + }, + "description": "Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow." }, "recordBlob": { "type": "object", - "required": ["cid", "recordUri"], + "required": [ + "cid", + "recordUri" + ], "properties": { - "cid": { "type": "string", "format": "cid" }, - "recordUri": { "type": "string", "format": "at-uri" } + "cid": { + "type": "string", + "format": "cid" + }, + "recordUri": { + "type": "string", + "format": "at-uri" + } } } } -} +} \ No newline at end of file diff --git a/lexicons/com/atproto/repo/listRecords.json b/lexicons/com/atproto/repo/listRecords.json index bc91c95..8a01d9f 100644 --- a/lexicons/com/atproto/repo/listRecords.json +++ b/lexicons/com/atproto/repo/listRecords.json @@ -4,66 +4,82 @@ "defs": { "main": { "type": "query", - "description": "List a range of records in a repository, matching a specific collection. Does not require auth.", + "output": { + "schema": { + "type": "object", + "required": [ + "records" + ], + "properties": { + "cursor": { + "type": "string" + }, + "records": { + "type": "array", + "items": { + "ref": "#record", + "type": "ref" + } + } + } + }, + "encoding": "application/json" + }, "parameters": { "type": "params", - "required": ["repo", "collection"], + "required": [ + "repo", + "collection" + ], "properties": { "repo": { "type": "string", "format": "at-identifier", "description": "The handle or DID of the repo." }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record type." - }, "limit": { "type": "integer", - "minimum": 1, - "maximum": 100, "default": 50, + "maximum": 100, + "minimum": 1, "description": "The number of records to return." }, - "cursor": { "type": "string" }, - "rkeyStart": { - "type": "string", - "description": "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)" - }, - "rkeyEnd": { - "type": "string", - "description": "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)" + "cursor": { + "type": "string" }, "reverse": { "type": "boolean", "description": "Flag to reverse the order of the returned records." + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "The NSID of the record type." } } }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["records"], - "properties": { - "cursor": { "type": "string" }, - "records": { - "type": "array", - "items": { "type": "ref", "ref": "#record" } - } - } - } - } + "description": "List a range of records in a repository, matching a specific collection. Does not require auth." }, "record": { "type": "object", - "required": ["uri", "cid", "value"], + "required": [ + "uri", + "cid", + "value" + ], "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, - "value": { "type": "unknown" } + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, + "value": { + "type": "unknown" + } } } } -} +} \ No newline at end of file diff --git a/lexicons/com/atproto/repo/putRecord.json b/lexicons/com/atproto/repo/putRecord.json index 830fade..55e7da0 100644 --- a/lexicons/com/atproto/repo/putRecord.json +++ b/lexicons/com/atproto/repo/putRecord.json @@ -4,71 +4,94 @@ "defs": { "main": { "type": "procedure", - "description": "Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.", "input": { - "encoding": "application/json", "schema": { "type": "object", - "required": ["repo", "collection", "rkey", "record"], - "nullable": ["swapRecord"], + "nullable": [ + "swapRecord" + ], + "required": [ + "repo", + "collection", + "rkey", + "record" + ], "properties": { "repo": { "type": "string", "format": "at-identifier", "description": "The handle or DID of the repo (aka, current account)." }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record collection." - }, "rkey": { "type": "string", "format": "record-key", - "description": "The Record Key.", - "maxLength": 512 - }, - "validate": { - "type": "boolean", - "description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons." + "maxLength": 512, + "description": "The Record Key." }, "record": { "type": "unknown", "description": "The record to write." }, - "swapRecord": { + "validate": { + "type": "boolean", + "description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons." + }, + "collection": { "type": "string", - "format": "cid", - "description": "Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation" + "format": "nsid", + "description": "The NSID of the record collection." }, "swapCommit": { "type": "string", "format": "cid", "description": "Compare and swap with the previous commit by CID." + }, + "swapRecord": { + "type": "string", + "format": "cid", + "description": "Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation" } } - } + }, + "encoding": "application/json" }, + "errors": [ + { + "name": "InvalidSwap" + } + ], "output": { - "encoding": "application/json", "schema": { "type": "object", - "required": ["uri", "cid"], + "required": [ + "uri", + "cid" + ], "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + }, "commit": { - "type": "ref", - "ref": "com.atproto.repo.defs#commitMeta" + "ref": "com.atproto.repo.defs#commitMeta", + "type": "ref" }, "validationStatus": { "type": "string", - "knownValues": ["valid", "unknown"] + "knownValues": [ + "valid", + "unknown" + ] } } - } + }, + "encoding": "application/json" }, - "errors": [{ "name": "InvalidSwap" }] + "description": "Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS." } } -} +} \ No newline at end of file diff --git a/lexicons/com/atproto/repo/strongRef.json b/lexicons/com/atproto/repo/strongRef.json index cb79625..ba1c649 100644 --- a/lexicons/com/atproto/repo/strongRef.json +++ b/lexicons/com/atproto/repo/strongRef.json @@ -5,11 +5,20 @@ "defs": { "main": { "type": "object", - "required": ["uri", "cid"], + "required": [ + "uri", + "cid" + ], "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" } + "cid": { + "type": "string", + "format": "cid" + }, + "uri": { + "type": "string", + "format": "at-uri" + } } } } -} +} \ No newline at end of file diff --git a/lexicons/com/atproto/repo/uploadBlob.json b/lexicons/com/atproto/repo/uploadBlob.json index 547a995..b988794 100644 --- a/lexicons/com/atproto/repo/uploadBlob.json +++ b/lexicons/com/atproto/repo/uploadBlob.json @@ -4,20 +4,24 @@ "defs": { "main": { "type": "procedure", - "description": "Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.", "input": { "encoding": "*/*" }, "output": { - "encoding": "application/json", "schema": { "type": "object", - "required": ["blob"], + "required": [ + "blob" + ], "properties": { - "blob": { "type": "blob" } + "blob": { + "type": "blob" + } } - } - } + }, + "encoding": "application/json" + }, + "description": "Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS." } } -} +} \ No newline at end of file